Documentation ¶
Index ¶
- Constants
- Variables
- type Cache
- func (c *Cache) Close() error
- func (c *Cache) Load(hash string, data json.Unmarshaler) error
- func (c *Cache) Range(f func(key, value string) bool)
- func (c *Cache) Store(hash string, data json.Marshaler) error
- func (c *Cache) Update(hash string, up CacheUpdater) error
- func (c *Cache) UpdateBytes(hash string, b []byte) error
- type CacheUpdater
- type Cacher
- type DataHashInfo
- type HashCache
- type Linker
- type PeerCache
- func (c *PeerCache) AddPeerAddress(addr peer.AddrInfo) (b bool)
- func (c *PeerCache) CheckPeerAddress(id peer.ID) (b bool)
- func (c *PeerCache) GetAddress(id peer.ID) (ai peer.AddrInfo, b bool)
- func (c *PeerCache) LoadAddress(ctx context.Context) (<-chan peer.AddrInfo, error)
- func (c *PeerCache) Peers() (ids []peer.ID)
- func (c *PeerCache) SaveAddress(ctx context.Context) (err error)
- func (c *PeerCache) UpdatePeerAddress(new peer.AddrInfo) bool
- type Pinning
Constants ¶
View Source
const LinkAddress = "/link" + "/address/" + Version
View Source
const LinkHash = "/link" + "/hash/" + Version
View Source
const LinkPeers = "/link" + "/peers/" + Version
View Source
const Version = "0.0.1"
Variables ¶
View Source
var NewLine = []byte{'\n'}
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) UpdateBytes ¶
type CacheUpdater ¶
type CacheUpdater interface { json.Unmarshaler Do() json.Marshaler }
type Cacher ¶
type Cacher interface { Load(hash string, data json.Unmarshaler) error Store(hash string, data json.Marshaler) error Update(hash string, up CacheUpdater) error Close() error Range(f func(hash string, value string) bool) }
Cacher ...
type DataHashInfo ¶
type DataHashInfo struct {
DataHash string `json:"data_hash"`
}
DataHashInfo ...
type HashCache ¶
type HashCache struct {
// contains filtered or unexported fields
}
func (*HashCache) CheckHashPeer ¶
type PeerCache ¶
type PeerCache struct {
// contains filtered or unexported fields
}
func (*PeerCache) GetAddress ¶
func (*PeerCache) LoadAddress ¶
func (*PeerCache) SaveAddress ¶
SaveNode ...
Click to show internal directories.
Click to hide internal directories.