Documentation ¶
Index ¶
- Variables
- type ADNL
- type Client
- func (c *Client) Close()
- func (c *Client) FindAddresses(ctx context.Context, key []byte) (*address.List, ed25519.PublicKey, error)
- func (c *Client) FindValue(ctx context.Context, key *Key) (*Value, error)
- func (c *Client) Store(ctx context.Context, name []byte, index int32, value []byte, ttl time.Duration, ...) (copiesMade int, idKey []byte, err error)
- func (c *Client) StoreAddress(ctx context.Context, addresses address.List, ttl time.Duration, ...) (int, []byte, error)
- type FindNode
- type FindValue
- type Key
- type KeyDescription
- type Node
- type NodeInfo
- type NodesList
- type Ping
- type Pong
- type Query
- type SignedAddressListQuery
- type Store
- type Stored
- type UpdateRuleAnybody
- type UpdateRuleOverlayNodes
- type UpdateRuleSignature
- type Value
- type ValueFoundResult
- type ValueNotFoundResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDHTValueIsNotFound = errors.New("value is not found")
View Source
var Logger = func(v ...any) {}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientFromConfig ¶
func NewClientFromConfig(ctx context.Context, cfg *liteclient.GlobalConfig) (*Client, error)
func NewClientFromConfigUrl ¶
func (*Client) FindAddresses ¶
type KeyDescription ¶
type SignedAddressListQuery ¶
type SignedAddressListQuery struct{}
type UpdateRuleAnybody ¶
type UpdateRuleAnybody struct{}
type UpdateRuleOverlayNodes ¶
type UpdateRuleOverlayNodes struct{}
type UpdateRuleSignature ¶
type UpdateRuleSignature struct{}
type Value ¶
type Value struct { KeyDescription KeyDescription `tl:"struct"` Data []byte `tl:"bytes"` TTL int32 `tl:"int"` Signature []byte `tl:"bytes"` }
type ValueFoundResult ¶
type ValueFoundResult struct {
Value Value `tl:"struct boxed"`
}
type ValueNotFoundResult ¶
type ValueNotFoundResult struct {
Nodes NodesList `tl:"struct"`
}
Click to show internal directories.
Click to hide internal directories.