Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface {
// Run is used to begin processing the provider work
Run()
// Provide takes a cid and makes an attempt to announce it to the network
Provide(cid.Cid) error
// Close stops the provider
Close() error
}
Provider announces blocks to the network
type Reprovider ¶
type Reprovider interface {
// Run is used to begin processing the reprovider work and waiting for reprovide triggers
Run()
// Trigger a reprovide
Trigger(context.Context) error
// Close stops the reprovider
Close() error
}
Reprovider reannounces blocks to the network
type System ¶
type System interface {
Run()
Close() error
Provide(cid.Cid) error
Reprovide(context.Context) error
}
System defines the interface for interacting with the value provider system
func NewOfflineProvider ¶
func NewOfflineProvider() System
NewOfflineProvider creates a ProviderSystem that does nothing
func NewSystem ¶
func NewSystem(provider Provider, reprovider Reprovider) System
NewSystem constructs a new provider system from a provider and reprovider
Directories
¶
| Path | Synopsis |
|---|---|
|
Package simple implements structures and methods to provide blocks, keep track of which blocks are provided, and to allow those blocks to be reprovided.
|
Package simple implements structures and methods to provide blocks, keep track of which blocks are provided, and to allow those blocks to be reprovided. |
Click to show internal directories.
Click to hide internal directories.