Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = log.Logger("downloadserver")
Functions ¶
func GetMetadata ¶
func GetMetadata( ctx context.Context, api string, config map[string]string, clientConfig model.ClientConfig, pieceCid string) (*contentprovider.PieceMetadata, int, error)
Types ¶
type DownloadServer ¶
type DownloadServer struct {
// contains filtered or unexported fields
}
func NewDownloadServer ¶
func NewDownloadServer(bind string, api string, config map[string]string, clientConfig model.ClientConfig) *DownloadServer
func (*DownloadServer) Name ¶
func (d *DownloadServer) Name() string
type UsageCache ¶
type UsageCache[C any] struct { // contains filtered or unexported fields }
func NewUsageCache ¶
func NewUsageCache[C any](ttl time.Duration) *UsageCache[C]
func (*UsageCache[C]) Close ¶
func (c *UsageCache[C]) Close()
func (*UsageCache[C]) Done ¶
func (c *UsageCache[C]) Done(key string)
func (*UsageCache[C]) Get ¶
func (c *UsageCache[C]) Get(key string) (*C, bool)
func (*UsageCache[C]) Set ¶
func (c *UsageCache[C]) Set(key string, item C)
Click to show internal directories.
Click to hide internal directories.