Documentation ¶
Index ¶
Constants ¶
View Source
const ( PartitionCount = 3000 ReplicationFactor = 3 )
View Source
const CName = "common.nodeconf"
View Source
const CNameSource = "common.nodeconf.source"
View Source
const CNameStore = "common.nodeconf.store"
Variables ¶
View Source
var (
ErrConfigurationNotChanged = errors.New("configuration not changed")
)
View Source
var (
ErrConfigurationNotFound = errors.New("node nodeConf not found")
)
Functions ¶
Types ¶
type ConfigGetter ¶
type ConfigGetter interface {
GetNodeConf() Configuration
}
type ConfigUpdateGetter ¶
type ConfigUpdateGetter interface {
GetNodeConfUpdateInterval() int
}
type Configuration ¶
type NetworkCompatibilityStatus ¶
type NetworkCompatibilityStatus int
const ( NetworkCompatibilityStatusUnknown NetworkCompatibilityStatus = iota NetworkCompatibilityStatusOk NetworkCompatibilityStatusError NetworkCompatibilityStatusIncompatible )
type Node ¶
type NodeConf ¶
type NodeConf interface { // Id returns current nodeconf id Id() string // Configuration returns configuration struct Configuration() Configuration // NodeIds returns list of peerId for given spaceId NodeIds(spaceId string) []string // IsResponsible checks if current account responsible for given spaceId IsResponsible(spaceId string) bool // FilePeers returns list of filenodes FilePeers() []string // ConsensusPeers returns list of consensusnodes ConsensusPeers() []string // CoordinatorPeers returns list of coordinator nodes CoordinatorPeers() []string // Please see any-ns-node repo for details // Usually one network has only 1 naming node, but we support array of NNs NamingNodePeers() []string // Please see any-pp-node repo for details PaymentProcessingNodePeers() []string // PeerAddresses returns peer addresses by peer id PeerAddresses(peerId string) (addrs []string, ok bool) // CHash returns nodes consistent table CHash() chash.CHash // Partition returns partition number by spaceId Partition(spaceId string) (part int) // NodeTypes returns list of known nodeTypes by nodeId, if node not registered in configuration will return empty list NodeTypes(nodeId string) []NodeType }
type Service ¶
type Service interface { NodeConf NetworkCompatibilityStatus() NetworkCompatibilityStatus app.ComponentRunnable }
Directories ¶
Path | Synopsis |
---|---|
Package mock_nodeconf is a generated GoMock package.
|
Package mock_nodeconf is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.