Documentation ¶
Index ¶
- type AccountingStreamMsg
- type AddressesStreamMsg
- type BalancesStreamMsg
- type Cluster
- func (c *Cluster) Accounting(ctx context.Context) (accounting orchestration.ClusterAccounting, err error)
- func (c *Cluster) AddNodeGroup(name string, o orchestration.NodeGroupOptions)
- func (c *Cluster) Addresses(ctx context.Context) (addrs map[string]orchestration.NodeGroupAddresses, err error)
- func (c *Cluster) Balances(ctx context.Context) (balances orchestration.ClusterBalances, err error)
- func (c *Cluster) FlattenAccounting(ctx context.Context) (accounting orchestration.NodeGroupAccounting, err error)
- func (c *Cluster) FlattenBalances(ctx context.Context) (balances orchestration.NodeGroupBalances, err error)
- func (c *Cluster) FlattenOverlays(ctx context.Context, exclude ...string) (map[string]swarm.Address, error)
- func (c *Cluster) FlattenSettlements(ctx context.Context) (settlements orchestration.NodeGroupSettlements, err error)
- func (c *Cluster) FlattenTopologies(ctx context.Context) (topologies map[string]bee.Topology, err error)
- func (c *Cluster) FullNodeNames() (names []string)
- func (c *Cluster) GlobalReplicationFactor(ctx context.Context, a swarm.Address) (grf int, err error)
- func (c *Cluster) LightNodeNames() (names []string)
- func (c *Cluster) Name() string
- func (c *Cluster) NodeGroup(name string) (ng orchestration.NodeGroup, err error)
- func (c *Cluster) NodeGroups() (l map[string]orchestration.NodeGroup)
- func (c *Cluster) NodeGroupsSorted() (l []string)
- func (c *Cluster) NodeNames() (names []string)
- func (c *Cluster) Nodes() map[string]orchestration.Node
- func (c *Cluster) NodesClients(ctx context.Context) (map[string]*bee.Client, error)
- func (c *Cluster) NodesClientsAll(ctx context.Context) (map[string]*bee.Client, error)
- func (c *Cluster) Overlays(ctx context.Context, exclude ...string) (overlays orchestration.ClusterOverlays, err error)
- func (c *Cluster) Peers(ctx context.Context, exclude ...string) (peers orchestration.ClusterPeers, err error)
- func (c *Cluster) RandomNode(ctx context.Context, r *rand.Rand) (node orchestration.Node, err error)
- func (c *Cluster) Settlements(ctx context.Context) (settlements orchestration.ClusterSettlements, err error)
- func (c *Cluster) Size() (size int)
- func (c *Cluster) Topologies(ctx context.Context) (topologies orchestration.ClusterTopologies, err error)
- type HasChunkStreamMsg
- type Node
- func (n Node) Client() *bee.Client
- func (n Node) Config() *orchestration.Config
- func (n Node) Create(ctx context.Context, o orchestration.CreateOptions) (err error)
- func (n Node) Delete(ctx context.Context, namespace string) (err error)
- func (n Node) LibP2PKey() string
- func (n Node) Name() string
- func (n Node) Ready(ctx context.Context, namespace string) (ready bool, err error)
- func (n Node) SetSwarmKey(key string) orchestration.Node
- func (n Node) Start(ctx context.Context, namespace string) (err error)
- func (n Node) Stop(ctx context.Context, namespace string) (err error)
- func (n Node) SwarmKey() string
- type NodeGroup
- func (g *NodeGroup) Accounting(ctx context.Context) (accounting orchestration.NodeGroupAccounting, err error)
- func (g *NodeGroup) AccountingStream(ctx context.Context) (<-chan AccountingStreamMsg, error)
- func (g *NodeGroup) AddNode(ctx context.Context, name string, o orchestration.NodeOptions, ...) (err error)
- func (g *NodeGroup) Addresses(ctx context.Context) (addrs orchestration.NodeGroupAddresses, err error)
- func (g *NodeGroup) AddressesStream(ctx context.Context) (<-chan AddressesStreamMsg, error)
- func (g *NodeGroup) Balances(ctx context.Context) (balances orchestration.NodeGroupBalances, err error)
- func (g *NodeGroup) BalancesStream(ctx context.Context) (<-chan BalancesStreamMsg, error)
- func (g *NodeGroup) CreateNode(ctx context.Context, name string) (err error)
- func (g *NodeGroup) DeleteNode(ctx context.Context, name string) (err error)
- func (ng *NodeGroup) GetEthAddress(ctx context.Context, name string, o orchestration.NodeOptions) (string, error)
- func (g *NodeGroup) GroupReplicationFactor(ctx context.Context, a swarm.Address) (grf int, err error)
- func (g *NodeGroup) HasChunkStream(ctx context.Context, a swarm.Address) (<-chan HasChunkStreamMsg, error)
- func (g *NodeGroup) Name() string
- func (g *NodeGroup) Node(name string) (orchestration.Node, error)
- func (g *NodeGroup) NodeClient(name string) (*bee.Client, error)
- func (g *NodeGroup) NodeReady(ctx context.Context, name string) (ok bool, err error)
- func (g *NodeGroup) Nodes() map[string]orchestration.Node
- func (g *NodeGroup) NodesClients(ctx context.Context) (map[string]*bee.Client, error)
- func (g *NodeGroup) NodesClientsAll(ctx context.Context) map[string]*bee.Client
- func (g *NodeGroup) NodesSorted() []string
- func (g *NodeGroup) Overlays(ctx context.Context) (overlays orchestration.NodeGroupOverlays, err error)
- func (g *NodeGroup) OverlaysStream(ctx context.Context) (<-chan OverlaysStreamMsg, error)
- func (g *NodeGroup) Peers(ctx context.Context) (peers orchestration.NodeGroupPeers, err error)
- func (g *NodeGroup) PeersStream(ctx context.Context) (<-chan PeersStreamMsg, error)
- func (g *NodeGroup) PregenerateSwarmKey(ctx context.Context, name string) (err error)
- func (g *NodeGroup) RunningNodes(ctx context.Context) (running []string, err error)
- func (g *NodeGroup) Settlements(ctx context.Context) (settlements orchestration.NodeGroupSettlements, err error)
- func (g *NodeGroup) SettlementsStream(ctx context.Context) (<-chan SettlementsStreamMsg, error)
- func (g *NodeGroup) SetupNode(ctx context.Context, name string, o orchestration.NodeOptions) (ethAddress string, err error)
- func (g *NodeGroup) Size() int
- func (g *NodeGroup) StartNode(ctx context.Context, name string) (err error)
- func (g *NodeGroup) StopNode(ctx context.Context, name string) (err error)
- func (g *NodeGroup) StoppedNodes(ctx context.Context) (stopped []string, err error)
- func (g *NodeGroup) Topologies(ctx context.Context) (topologies orchestration.NodeGroupTopologies, err error)
- func (g *NodeGroup) TopologyStream(ctx context.Context) (<-chan TopologyStreamMsg, error)
- type OverlaysStreamMsg
- type PeersStreamMsg
- type SettlementsStreamMsg
- type TopologyStreamMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountingStreamMsg ¶ added in v0.11.4
type AccountingStreamMsg struct { Name string Accounting bee.Accounting Error error }
AccountingStreamMsg represents message sent over the BalancesStream channel
type AddressesStreamMsg ¶
AddressesStreamMsg represents message sent over the AddressStream channel
type BalancesStreamMsg ¶
BalancesStreamMsg represents message sent over the BalancesStream channel
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster represents cluster of Bee nodes
func NewCluster ¶
func NewCluster(name string, o orchestration.ClusterOptions, log logging.Logger) *Cluster
NewCluster returns new cluster
func (*Cluster) Accounting ¶ added in v0.11.4
func (c *Cluster) Accounting(ctx context.Context) (accounting orchestration.ClusterAccounting, err error)
Accounting returns ClusterAccounting
func (*Cluster) AddNodeGroup ¶
func (c *Cluster) AddNodeGroup(name string, o orchestration.NodeGroupOptions)
AddNodeGroup adds new node group to the cluster
func (*Cluster) Addresses ¶
func (c *Cluster) Addresses(ctx context.Context) (addrs map[string]orchestration.NodeGroupAddresses, err error)
Addresses returns ClusterAddresses
func (*Cluster) Balances ¶
func (c *Cluster) Balances(ctx context.Context) (balances orchestration.ClusterBalances, err error)
Balances returns ClusterBalances
func (*Cluster) FlattenAccounting ¶ added in v0.11.4
func (c *Cluster) FlattenAccounting(ctx context.Context) (accounting orchestration.NodeGroupAccounting, err error)
FlattenBalances returns aggregated NodeGroupBalances
func (*Cluster) FlattenBalances ¶
func (c *Cluster) FlattenBalances(ctx context.Context) (balances orchestration.NodeGroupBalances, err error)
FlattenBalances returns aggregated NodeGroupBalances
func (*Cluster) FlattenOverlays ¶
func (c *Cluster) FlattenOverlays(ctx context.Context, exclude ...string) (map[string]swarm.Address, error)
FlattenOverlays returns aggregated ClusterOverlays excluding the provided node group names
func (*Cluster) FlattenSettlements ¶
func (c *Cluster) FlattenSettlements(ctx context.Context) (settlements orchestration.NodeGroupSettlements, err error)
FlattenSettlements returns aggregated NodeGroupSettlements
func (*Cluster) FlattenTopologies ¶
func (c *Cluster) FlattenTopologies(ctx context.Context) (topologies map[string]bee.Topology, err error)
FlattenTopologies returns an aggregate of Topologies
func (*Cluster) FullNodeNames ¶
FullNodeNames returns a list of full node names
func (*Cluster) GlobalReplicationFactor ¶
func (c *Cluster) GlobalReplicationFactor(ctx context.Context, a swarm.Address) (grf int, err error)
GlobalReplicationFactor returns the total number of nodes in the cluster that contain given chunk
func (*Cluster) LightNodeNames ¶
LightNodeNames returns a list of light node names
func (*Cluster) NodeGroup ¶
func (c *Cluster) NodeGroup(name string) (ng orchestration.NodeGroup, err error)
NodeGroup returns node group
func (*Cluster) NodeGroups ¶
func (c *Cluster) NodeGroups() (l map[string]orchestration.NodeGroup)
NodeGroups returns map of node groups in the cluster
func (*Cluster) NodeGroupsSorted ¶
NodeGroupsSorted returns sorted list of node names in the node group
func (*Cluster) NodeNames ¶
NodeNamess returns a list of node names in the cluster across all node groups
func (*Cluster) Nodes ¶
func (c *Cluster) Nodes() map[string]orchestration.Node
Nodes returns map of nodes in the cluster
func (*Cluster) NodesClients ¶
NodesClients returns map of node's clients in the cluster excluding stopped nodes
func (*Cluster) NodesClientsAll ¶
NodesClientsAll returns map of node's clients in the cluster
func (*Cluster) Overlays ¶
func (c *Cluster) Overlays(ctx context.Context, exclude ...string) (overlays orchestration.ClusterOverlays, err error)
Overlays returns ClusterOverlays excluding the provided node group names
func (*Cluster) Peers ¶
func (c *Cluster) Peers(ctx context.Context, exclude ...string) (peers orchestration.ClusterPeers, err error)
Peers returns peers of all nodes in the cluster
func (*Cluster) RandomNode ¶
func (c *Cluster) RandomNode(ctx context.Context, r *rand.Rand) (node orchestration.Node, err error)
RandomNode returns random running node from a cluster
func (*Cluster) Settlements ¶
func (c *Cluster) Settlements(ctx context.Context) (settlements orchestration.ClusterSettlements, err error)
Settlements returns
func (*Cluster) Topologies ¶
func (c *Cluster) Topologies(ctx context.Context) (topologies orchestration.ClusterTopologies, err error)
Topologies returns ClusterTopologies
type HasChunkStreamMsg ¶
HasChunkStreamMsg represents message sent over the HasChunkStream channel
type Node ¶
type Node struct { orchestration.NodeOrchestrator // contains filtered or unexported fields }
Node represents Bee node
func NewNode ¶
func NewNode(name string, opts orchestration.NodeOptions, no orchestration.NodeOrchestrator, log logging.Logger) (n *Node)
NewNode returns Bee node
func (Node) Create ¶
func (n Node) Create(ctx context.Context, o orchestration.CreateOptions) (err error)
Create implements orchestration.Node. Subtle: this method shadows the method (NodeOrchestrator).Create of Node.NodeOrchestrator.
func (Node) Delete ¶
Delete implements orchestration.Node. Subtle: this method shadows the method (NodeOrchestrator).Delete of Node.NodeOrchestrator.
func (Node) Ready ¶
Ready implements orchestration.Node. Subtle: this method shadows the method (NodeOrchestrator).Ready of Node.NodeOrchestrator.
func (Node) SetSwarmKey ¶ added in v0.9.0
func (n Node) SetSwarmKey(key string) orchestration.Node
SetSwarmKey sets node's Swarm key
func (Node) Start ¶
Start implements orchestration.Node. Subtle: this method shadows the method (NodeOrchestrator).Start of Node.NodeOrchestrator.
type NodeGroup ¶
type NodeGroup struct {
// contains filtered or unexported fields
}
NodeGroup represents group of Bee nodes
func NewNodeGroup ¶
func NewNodeGroup(name string, copts orchestration.ClusterOptions, no orchestration.NodeOrchestrator, ngopts orchestration.NodeGroupOptions, log logging.Logger) *NodeGroup
NewNodeGroup returns new node group
func (*NodeGroup) Accounting ¶ added in v0.11.4
func (g *NodeGroup) Accounting(ctx context.Context) (accounting orchestration.NodeGroupAccounting, err error)
Accounting returns NodeGroupAccounting
func (*NodeGroup) AccountingStream ¶ added in v0.11.4
func (g *NodeGroup) AccountingStream(ctx context.Context) (<-chan AccountingStreamMsg, error)
AccountingStream returns stream of accounting of all nodes in the node group
func (*NodeGroup) AddNode ¶
func (g *NodeGroup) AddNode(ctx context.Context, name string, o orchestration.NodeOptions, opts ...orchestration.BeeClientOption) (err error)
AddNode adss new node to the node group
func (*NodeGroup) Addresses ¶
func (g *NodeGroup) Addresses(ctx context.Context) (addrs orchestration.NodeGroupAddresses, err error)
Addresses returns NodeGroupAddresses
func (*NodeGroup) AddressesStream ¶
func (g *NodeGroup) AddressesStream(ctx context.Context) (<-chan AddressesStreamMsg, error)
AddressesStream returns stream of addresses of all nodes in the node group
func (*NodeGroup) Balances ¶
func (g *NodeGroup) Balances(ctx context.Context) (balances orchestration.NodeGroupBalances, err error)
Balances returns NodeGroupBalances
func (*NodeGroup) BalancesStream ¶
func (g *NodeGroup) BalancesStream(ctx context.Context) (<-chan BalancesStreamMsg, error)
BalancesStream returns stream of balances of all nodes in the cluster
func (*NodeGroup) CreateNode ¶
CreateNode creates new node in the k8s cluster
func (*NodeGroup) DeleteNode ¶
DeleteNode deletes node from the k8s cluster and removes it from the node group
func (*NodeGroup) GetEthAddress ¶ added in v0.13.10
func (ng *NodeGroup) GetEthAddress(ctx context.Context, name string, o orchestration.NodeOptions) (string, error)
GetEthAddress returns ethereum address of the node
func (*NodeGroup) GroupReplicationFactor ¶
func (g *NodeGroup) GroupReplicationFactor(ctx context.Context, a swarm.Address) (grf int, err error)
GroupReplicationFactor returns the total number of nodes in the node group that contain given chunk
func (*NodeGroup) HasChunkStream ¶
func (g *NodeGroup) HasChunkStream(ctx context.Context, a swarm.Address) (<-chan HasChunkStreamMsg, error)
HasChunkStream returns stream of HasChunk requests for all nodes in the node group
func (*NodeGroup) Node ¶
func (g *NodeGroup) Node(name string) (orchestration.Node, error)
Node returns node
func (*NodeGroup) NodeClient ¶
NodeClient returns node's client
func (*NodeGroup) Nodes ¶
func (g *NodeGroup) Nodes() map[string]orchestration.Node
Nodes returns map of nodes in the node group
func (*NodeGroup) NodesClients ¶
NodesClients returns map of node's clients in the node group excluding stopped nodes
func (*NodeGroup) NodesClientsAll ¶
NodesClientsAll returns map of node's clients in the node group
func (*NodeGroup) NodesSorted ¶
NodesSorted returns list of nodes sorted by names from the node group.
func (*NodeGroup) Overlays ¶
func (g *NodeGroup) Overlays(ctx context.Context) (overlays orchestration.NodeGroupOverlays, err error)
Overlays returns NodeGroupOverlays
func (*NodeGroup) OverlaysStream ¶
func (g *NodeGroup) OverlaysStream(ctx context.Context) (<-chan OverlaysStreamMsg, error)
OverlaysStream returns stream of overlay addresses of all nodes in the node group TODO: add semaphore
func (*NodeGroup) Peers ¶
func (g *NodeGroup) Peers(ctx context.Context) (peers orchestration.NodeGroupPeers, err error)
Peers returns NodeGroupPeers
func (*NodeGroup) PeersStream ¶
func (g *NodeGroup) PeersStream(ctx context.Context) (<-chan PeersStreamMsg, error)
PeersStream returns stream of peers of all nodes in the node group
func (*NodeGroup) PregenerateSwarmKey ¶ added in v0.9.0
PregenerateSwarmKey for a node if needed
func (*NodeGroup) RunningNodes ¶
RunningNodes returns list of running nodes TODO: filter by labels
func (*NodeGroup) Settlements ¶
func (g *NodeGroup) Settlements(ctx context.Context) (settlements orchestration.NodeGroupSettlements, err error)
Settlements returns NodeGroupSettlements
func (*NodeGroup) SettlementsStream ¶
func (g *NodeGroup) SettlementsStream(ctx context.Context) (<-chan SettlementsStreamMsg, error)
SettlementsStream returns stream of settlements of all nodes in the cluster
func (*NodeGroup) SetupNode ¶
func (g *NodeGroup) SetupNode(ctx context.Context, name string, o orchestration.NodeOptions) (ethAddress string, err error)
SetupNode creates new node in the node group, starts it in the k8s cluster and funds it
func (*NodeGroup) StoppedNodes ¶
StoppedNodes returns list of stopped nodes TODO: filter by labels
func (*NodeGroup) Topologies ¶
func (g *NodeGroup) Topologies(ctx context.Context) (topologies orchestration.NodeGroupTopologies, err error)
Topologies returns NodeGroupTopologies
func (*NodeGroup) TopologyStream ¶
func (g *NodeGroup) TopologyStream(ctx context.Context) (<-chan TopologyStreamMsg, error)
TopologyStream returns stream of Kademlia topologies of all nodes in the node group
type OverlaysStreamMsg ¶
OverlaysStreamMsg represents message sent over the OverlaysStream channel
type PeersStreamMsg ¶
PeersStreamMsg represents message sent over the PeersStream channel
type SettlementsStreamMsg ¶
type SettlementsStreamMsg struct { Name string Settlements bee.Settlements Error error }
SettlementsStreamMsg represents message sent over the SettlementsStream channel