Documentation ¶
Index ¶
- Constants
- Variables
- type Bucket
- type Filter
- type GetParams
- type GetResult
- type NetMap
- func (n *NetMap) Add(addr string, pk []byte, st bootstrap.NodeStatus, opts ...string) error
- func (n *NetMap) AddNode(nodeInfo *bootstrap.NodeInfo, opts ...string) error
- func (n *NetMap) Copy() *NetMap
- func (n *NetMap) Equals(nm *NetMap) bool
- func (n *NetMap) FindGraph(pivot []byte, ss ...SFGroup) (c *Bucket)
- func (n *NetMap) FindNodes(pivot []byte, ss ...SFGroup) (nodes []uint32)
- func (n *NetMap) GetMaxSelection(ss []Select, fs []Filter) (r *Bucket)
- func (n *NetMap) GetNodesByOption(opts ...string) []bootstrap.NodeInfo
- func (n *NetMap) Hash() (sum [32]byte)
- func (n *NetMap) InheritWeights() *NetMap
- func (n *NetMap) Items() []bootstrap.NodeInfo
- func (n *NetMap) ItemsCopy() Nodes
- func (n *NetMap) MarshalJSON() ([]byte, error)
- func (n *NetMap) Merge(n1 *NetMap) error
- func (n *NetMap) Normalise() *NetMap
- func (n *NetMap) Root() *Bucket
- func (n *NetMap) Size() int
- func (n *NetMap) UnmarshalJSON(data []byte) error
- func (n *NetMap) Update(nxt *NetMap)
- type Nodes
- type PlacementRule
- type SFGroup
- type Select
- type SimpleFilter
- type Storage
Constants ¶
const ( // Separator separates key:value pairs in string representation of options. Separator = netmap.Separator // NodesBucket is the name for optionless bucket containing only nodes. NodesBucket = netmap.NodesBucket )
Variables ¶
var ( // FilterIn returns filter, which checks if value is in specified list. FilterIn = netmap.FilterIn // FilterNotIn returns filter, which checks if value is not in specified list. FilterNotIn = netmap.FilterNotIn // FilterOR returns OR combination of filters. FilterOR = netmap.FilterOR // FilterAND returns AND combination of filters. FilterAND = netmap.FilterAND // FilterEQ returns filter, which checks if value is equal to v. FilterEQ = netmap.FilterEQ // FilterNE returns filter, which checks if value is not equal to v. FilterNE = netmap.FilterNE // FilterGT returns filter, which checks if value is greater than v. FilterGT = netmap.FilterGT // FilterGE returns filter, which checks if value is greater or equal than v. FilterGE = netmap.FilterGE // FilterLT returns filter, which checks if value is less than v. FilterLT = netmap.FilterLT // FilterLE returns filter, which checks if value is less or equal than v. FilterLE = netmap.FilterLE )
Functions ¶
This section is empty.
Types ¶
type GetParams ¶
type GetParams struct { }
GetParams is a group of parameters for network map receiving operation.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult is a group of values returned by container receiving operation.
type NetMap ¶
type NetMap struct {
// contains filtered or unexported fields
}
NetMap is a general network map structure for NeoFS
func (*NetMap) FindNodes ¶
FindNodes finds sub-graph filtered by given SFGroup and returns all sub-graph items.
func (*NetMap) GetMaxSelection ¶
GetMaxSelection returns 'maximal container' -- subgraph which contains any other subgraph satisfying specified selects and filters.
func (*NetMap) GetNodesByOption ¶
GetNodesByOption returns slice of NodeInfo that has given option.
func (*NetMap) InheritWeights ¶
InheritWeights calculates average capacity and minimal price, then provides buckets with IQR weight.
func (*NetMap) MarshalJSON ¶
MarshalJSON custom marshaller.
func (*NetMap) Merge ¶
Merge checks if merge is possible and then add new elements from given netmap.
func (*NetMap) UnmarshalJSON ¶
UnmarshalJSON custom unmarshaller.
type PlacementRule ¶
type PlacementRule = netmap.PlacementRule
PlacementRule is an alias for github.com/nspcc-dev/netmap.Filter
type SimpleFilter ¶
type SimpleFilter = netmap.SimpleFilter
SimpleFilter is an alias for github.com/nspcc-dev/netmap.Filter