providers

package
v0.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2020 License: GPL-3.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProvideValidity = time.Hour * 24

Functions

This section is empty.

Types

type ProviderManager

type ProviderManager struct {
	// contains filtered or unexported fields
}

func NewProviderManager

func NewProviderManager(ctx context.Context, local peer.ID, dstore ds.Batching) *ProviderManager

func (*ProviderManager) AddProvider

func (pm *ProviderManager) AddProvider(ctx context.Context, k []byte, val peer.ID)

AddProvider adds a provider.

func (*ProviderManager) GetProviders

func (pm *ProviderManager) GetProviders(ctx context.Context, k []byte) []peer.ID

GetProviders returns the set of providers for the given key. This method _does not_ copy the set. Do not modify it.

func (*ProviderManager) Process

func (pm *ProviderManager) Process() goprocess.Process

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL