Documentation
¶
Index ¶
- Variables
- type Destinations
- type Manager
- func (m *Manager) AddDestination(nodeID types.NodeID, versionedName types.NodeVersionName, ...) error
- func (m *Manager) DestinationExist(targetAction types.TargetAction) bool
- func (m *Manager) Destinations() Destinations
- func (m *Manager) GetDeliveryTargetNodeID(deliveryMethod types.DeliveryMethod, targetAction types.TargetAction) (*types.NodeID, error)
- func (m *Manager) Nodes() Nodes
- func (m *Manager) RemoveNodeID(nodeID types.NodeID)
- func (m *Manager) UpdateLastSeen(nodeID types.NodeID)
- type Nodes
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoNodeFound = errors.New("can't find any available nodes for target action")
)
Functions ¶
This section is empty.
Types ¶
type Destinations ¶
type Destinations map[types.NodeVersionName]map[types.BlockName]map[types.ActionName][]types.NodeID
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager struct
func NewManager ¶
NewManager creates new Manager struct
func (*Manager) AddDestination ¶
func (m *Manager) AddDestination(nodeID types.NodeID, versionedName types.NodeVersionName, blockName types.BlockName, actions []types.ActionName) error
AddDestination adds information about topology of known nodes to manager
func (*Manager) DestinationExist ¶
func (m *Manager) DestinationExist(targetAction types.TargetAction) bool
DestinationExist return true if target action is found in the network
func (*Manager) Destinations ¶
func (m *Manager) Destinations() Destinations
Destinations returns network topology
func (*Manager) GetDeliveryTargetNodeID ¶ added in v0.1.2
func (m *Manager) GetDeliveryTargetNodeID(deliveryMethod types.DeliveryMethod, targetAction types.TargetAction) (*types.NodeID, error)
GetDeliveryTargetNodeID return NodeID for target action based on set deliveryMethod in config file
func (*Manager) RemoveNodeID ¶
RemoveNodeID removes node id from all mentions in the topology
func (*Manager) UpdateLastSeen ¶
Click to show internal directories.
Click to hide internal directories.