Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyNodes when container doesn't contains any nodes ErrEmptyNodes = internal.Error("container doesn't contains nodes") // ErrNodesBucketOmitted when in PlacementRule, Selector has not NodesBucket ErrNodesBucketOmitted = internal.Error("nodes-bucket is omitted") // ErrEmptyContainer when GetMaxSelection or GetSelection returns empty result ErrEmptyContainer = internal.Error("could not get container, it's empty") )
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface {
NetworkState() *bootstrap.SpreadMap
Neighbours(seed, epoch uint64, full bool) []peers.ID
Update(epoch uint64, nm *netmap.NetMap) error
Query(ctx context.Context, opts ...QueryOption) (Graph, error)
}
Component is interface of placement service
type FilterRule ¶
FilterRule bucket callback handler
type Graph ¶
type Graph interface {
Filter(rule FilterRule) Graph
Exclude(list []multiaddr.Multiaddr) Graph
NodeList() ([]multiaddr.Multiaddr, error)
NodeInfo() ([]bootstrap.NodeInfo, error)
}
Graph is result of request to Placement-component
type Params ¶
type Params struct {
Log *zap.Logger
Netmap *netmap.NetMap
Peerstore peers.Store
Fetcher container.Storage
ChronologyDuration uint64 // storing number of past epochs states
}
Params to create Placement component
type QueryOption ¶
type QueryOption func(*QueryOptions)
QueryOption settings closure
func ExcludeNodes ¶
func ExcludeNodes(list []multiaddr.Multiaddr) QueryOption
ExcludeNodes to ignore some nodes.
type QueryOptions ¶
QueryOptions for query request
Click to show internal directories.
Click to hide internal directories.