Documentation ¶
Index ¶
- type Cache
- func (c *Cache) AddDownloadedResource(resourceName string, resourceSize int64)
- func (c *Cache) AddOnlineNode(p peer.AddrInfo)
- func (c *Cache) GetContext() context.Context
- func (c *Cache) GetHost() host.Host
- func (c *Cache) GetOnlineNodes() []peer.AddrInfo
- func (c *Cache) GetOthersSharedResourcesInfosFilterByResourceName(resourceName string) OtherSharedFileInfo
- func (c *Cache) GetOthersSharedResourcesPeerIDList() map[string]OtherSharedFileInfo
- func (c *Cache) GetOurSharedDirectory() string
- func (c *Cache) GetSharedResourcesFromCache() []FileInfo
- func (c *Cache) InitCache(ourSharedDirectory string, ctx context.Context, peerHost host.Host) error
- func (c *Cache) ReadSharedResourcesIntoCache() error
- func (c *Cache) RemoveOfflineNode(offlineNodeID string)
- func (c *Cache) RemoveOfflineNodes(offlineNodesID []string)
- func (c *Cache) UpdateOthersSharedResources(resources []FileInfo, peerID string)
- type FileInfo
- type OtherSharedFileInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func GetCacheInstance ¶
func GetCacheInstance() *Cache
func (*Cache) AddDownloadedResource ¶
func (*Cache) AddOnlineNode ¶
func (*Cache) GetContext ¶
func (*Cache) GetOnlineNodes ¶
func (*Cache) GetOthersSharedResourcesInfosFilterByResourceName ¶
func (c *Cache) GetOthersSharedResourcesInfosFilterByResourceName(resourceName string) OtherSharedFileInfo
func (*Cache) GetOthersSharedResourcesPeerIDList ¶
func (c *Cache) GetOthersSharedResourcesPeerIDList() map[string]OtherSharedFileInfo
func (*Cache) GetOurSharedDirectory ¶
func (*Cache) GetSharedResourcesFromCache ¶
func (*Cache) ReadSharedResourcesIntoCache ¶
func (*Cache) RemoveOfflineNode ¶
func (*Cache) RemoveOfflineNodes ¶
func (*Cache) UpdateOthersSharedResources ¶
type OtherSharedFileInfo ¶
type OtherSharedFileInfo struct {}
Click to show internal directories.
Click to hide internal directories.