Documentation ¶
Index ¶
- Constants
- func EstimatePostageBatchDepth(contentLength int64) uint64
- func GenerateRandomChunkAt(rnd *rand.Rand, target swarm.Address, po uint8) swarm.Chunk
- type Addresses
- type AddressesStreamMsg
- type Balance
- type Balances
- type BalancesStreamMsg
- type Bin
- type CashoutStatusResponse
- type CashoutStatusResult
- type Cheque
- type ChequebookBalanceResponse
- type Chunk
- func (c *Chunk) Address() swarm.Address
- func (c *Chunk) ClosestNode(nodes []swarm.Address) (closest swarm.Address, err error)
- func (c *Chunk) ClosestNodeFromMap(nodes map[string]swarm.Address, skipNodes ...swarm.Address) (closestName string, closestAddress swarm.Address, err error)
- func (c *Chunk) Data() []byte
- func (c *Chunk) SetAddress() error
- func (c *Chunk) Size() int
- func (c *Chunk) Span() int
- type Client
- func (c *Client) Addresses(ctx context.Context) (resp Addresses, err error)
- func (c *Client) Balance(ctx context.Context, a swarm.Address) (resp Balance, err error)
- func (c *Client) Balances(ctx context.Context) (resp Balances, err error)
- func (c *Client) Cashout(ctx context.Context, a swarm.Address) (resp string, err error)
- func (c *Client) CashoutStatus(ctx context.Context, a swarm.Address) (resp CashoutStatusResponse, err error)
- func (c *Client) ChequebookBalance(ctx context.Context) (resp ChequebookBalanceResponse, err error)
- func (c *Client) Config() ClientOptions
- func (c *Client) CreatePostageBatch(ctx context.Context, amount int64, depth uint64, label string) (string, error)
- func (c *Client) CreateTag(ctx context.Context) (resp api.TagResponse, err error)
- func (c *Client) DownloadBytes(ctx context.Context, a swarm.Address) (data []byte, err error)
- func (c *Client) DownloadChunk(ctx context.Context, a swarm.Address, targets string) (data []byte, err error)
- func (c *Client) DownloadFile(ctx context.Context, a swarm.Address) (size int64, hash []byte, err error)
- func (c *Client) DownloadManifestFile(ctx context.Context, a swarm.Address, path string) (size int64, hash []byte, err error)
- func (c *Client) GetTag(ctx context.Context, tagUID uint32) (resp api.TagResponse, err error)
- func (c *Client) HasChunk(ctx context.Context, a swarm.Address) (bool, error)
- func (c *Client) Overlay(ctx context.Context) (o swarm.Address, err error)
- func (c *Client) Peers(ctx context.Context) (peers []swarm.Address, err error)
- func (c *Client) PinBytes(ctx context.Context, a swarm.Address) error
- func (c *Client) PinChunk(ctx context.Context, a swarm.Address) error
- func (c *Client) Ping(ctx context.Context, node swarm.Address) (rtt string, err error)
- func (c *Client) PingStream(ctx context.Context, nodes []swarm.Address) <-chan PingStreamMsg
- func (c *Client) PinnedChunk(ctx context.Context, a swarm.Address) (PinnedChunk, error)
- func (c *Client) PinnedChunks(ctx context.Context) (PinnedChunks, error)
- func (c *Client) RemoveChunk(ctx context.Context, a swarm.Address) error
- func (c *Client) ReserveState(ctx context.Context) (debugapi.ReserveState, error)
- func (c *Client) SendPSSMessage(ctx context.Context, nodeAddress swarm.Address, publicKey string, topic string, ...) error
- func (c *Client) Settlement(ctx context.Context, a swarm.Address) (resp Settlement, err error)
- func (c *Client) Settlements(ctx context.Context) (resp Settlements, err error)
- func (c *Client) Topology(ctx context.Context) (topology Topology, err error)
- func (c *Client) Underlay(ctx context.Context) ([]string, error)
- func (c *Client) UnpinChunk(ctx context.Context, a swarm.Address) error
- func (c *Client) UploadBytes(ctx context.Context, b []byte, o api.UploadOptions) (swarm.Address, error)
- func (c *Client) UploadChunk(ctx context.Context, data []byte, o api.UploadOptions) (swarm.Address, error)
- func (c *Client) UploadCollection(ctx context.Context, f *File, o api.UploadOptions) (err error)
- func (c *Client) UploadFile(ctx context.Context, f *File, o api.UploadOptions) (err error)
- func (c *Client) UploadSOC(ctx context.Context, owner, ID, signature string, data []byte, batchID string) (swarm.Address, error)
- func (c *Client) WaitSync(ctx context.Context, UId uint32) error
- type ClientOptions
- type Cluster
- func (c *Cluster) AddNodeGroup(name string, o NodeGroupOptions)
- func (c *Cluster) Addresses(ctx context.Context) (addrs map[string]NodeGroupAddresses, err error)
- func (c *Cluster) Balances(ctx context.Context) (balances ClusterBalances, err error)
- func (c *Cluster) FlattenBalances(ctx context.Context) (balances NodeGroupBalances, err error)
- func (c *Cluster) FlattenOverlays(ctx context.Context, include ...string) (map[string]swarm.Address, error)
- func (c *Cluster) FlattenSettlements(ctx context.Context) (settlements NodeGroupSettlements, err error)
- func (c *Cluster) FlattenTopologies(ctx context.Context) (topologies map[string]Topology, err error)
- func (c *Cluster) GlobalReplicationFactor(ctx context.Context, a swarm.Address) (grf int, err error)
- func (c *Cluster) Name() string
- func (c *Cluster) NodeGroup(name string) *NodeGroup
- func (c *Cluster) NodeGroups() (l map[string]*NodeGroup)
- func (c *Cluster) NodeGroupsSorted() (l []string)
- func (c *Cluster) NodeNames() (names []string)
- func (c *Cluster) Nodes() map[string]*Node
- func (c *Cluster) NodesClients(ctx context.Context) (map[string]*Client, error)
- func (c *Cluster) NodesClientsAll(ctx context.Context) (map[string]*Client, error)
- func (c *Cluster) Overlays(ctx context.Context) (overlays ClusterOverlays, err error)
- func (c *Cluster) Peers(ctx context.Context) (peers ClusterPeers, err error)
- func (c *Cluster) RandomNode(ctx context.Context, r *rand.Rand) (node *Node, err error)
- func (c *Cluster) Settlements(ctx context.Context) (settlements ClusterSettlements, err error)
- func (c *Cluster) Size() (size int)
- func (c *Cluster) Topologies(ctx context.Context) (topologies ClusterTopologies, err error)
- type ClusterAddresses
- type ClusterBalances
- type ClusterOptions
- type ClusterOverlays
- type ClusterPeers
- type ClusterSettlements
- type ClusterTopologies
- type File
- type HasChunkStreamMsg
- type Node
- type NodeGroup
- func (g *NodeGroup) AddNode(name string, o NodeOptions) (err error)
- func (g *NodeGroup) AddStartNode(ctx context.Context, name string, o NodeOptions) (err error)
- func (g *NodeGroup) Addresses(ctx context.Context) (addrs NodeGroupAddresses, err error)
- func (g *NodeGroup) AddressesStream(ctx context.Context) (<-chan AddressesStreamMsg, error)
- func (g *NodeGroup) Balances(ctx context.Context) (balances 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 (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) *Node
- func (g *NodeGroup) NodeClient(name string) *Client
- func (g *NodeGroup) NodeReady(ctx context.Context, name string) (ok bool, err error)
- func (g *NodeGroup) Nodes() map[string]*Node
- func (g *NodeGroup) NodesClients(ctx context.Context) (map[string]*Client, error)
- func (g *NodeGroup) NodesClientsAll(ctx context.Context) map[string]*Client
- func (g *NodeGroup) NodesSorted() (l []string)
- func (g *NodeGroup) Overlays(ctx context.Context) (overlays NodeGroupOverlays, err error)
- func (g *NodeGroup) OverlaysStream(ctx context.Context) (<-chan OverlaysStreamMsg, error)
- func (g *NodeGroup) Peers(ctx context.Context) (peers NodeGroupPeers, err error)
- func (g *NodeGroup) PeersStream(ctx context.Context) (<-chan PeersStreamMsg, error)
- func (g *NodeGroup) RunningNodes(ctx context.Context) (running []string, err error)
- func (g *NodeGroup) Settlements(ctx context.Context) (settlements NodeGroupSettlements, err error)
- func (g *NodeGroup) SettlementsStream(ctx context.Context) (<-chan SettlementsStreamMsg, 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 NodeGroupTopologies, err error)
- func (g *NodeGroup) TopologyStream(ctx context.Context) (<-chan TopologyStreamMsg, error)
- type NodeGroupAddresses
- type NodeGroupBalances
- type NodeGroupOptions
- type NodeGroupOverlays
- type NodeGroupPeers
- type NodeGroupSettlements
- type NodeGroupTopologies
- type NodeOptions
- type OverlaysStreamMsg
- type PeersStreamMsg
- type PingStreamMsg
- type PinnedChunk
- type PinnedChunks
- type SentReceived
- type Settlement
- type Settlements
- type SettlementsStreamMsg
- type Topology
- type TopologyStreamMsg
Constants ¶
const (
// MaxChunkSize represents max chunk size in bytes
MaxChunkSize = 4096
)
const MinimumBatchDepth = 11
Variables ¶
This section is empty.
Functions ¶
func EstimatePostageBatchDepth ¶ added in v0.5.6
Types ¶
type Addresses ¶ added in v0.2.3
type Addresses struct { Overlay swarm.Address Underlay []string Ethereum string PublicKey string PSSPublicKey string }
Addresses represents node's addresses
type AddressesStreamMsg ¶ added in v0.2.3
AddressesStreamMsg represents message sent over the AddressStream channel
type Balances ¶ added in v0.2.20
type Balances struct {
Balances []Balance
}
Balances represents Balances's response
type BalancesStreamMsg ¶ added in v0.2.20
BalancesStreamMsg represents message sent over the BalancesStream channel
type Bin ¶ added in v0.2.2
type Bin struct { Connected int ConnectedPeers []swarm.Address DisconnectedPeers []swarm.Address Population int }
Bin represents Kademlia bin
type CashoutStatusResponse ¶ added in v0.5.6
type CashoutStatusResult ¶ added in v0.5.6
type ChequebookBalanceResponse ¶ added in v0.5.6
type Chunk ¶
type Chunk struct {
// contains filtered or unexported fields
}
Chunk represents Bee chunk
func NewRandomChunk ¶
NewRandomChunk returns new pseudorandom chunk
func (*Chunk) ClosestNode ¶
ClosestNode returns chunk's closest node of a given set of nodes
func (*Chunk) ClosestNodeFromMap ¶ added in v0.4.0
func (c *Chunk) ClosestNodeFromMap(nodes map[string]swarm.Address, skipNodes ...swarm.Address) (closestName string, closestAddress swarm.Address, err error)
ClosestNodeFromMap returns chunk's closest node of a given map of nodes
func (*Chunk) SetAddress ¶ added in v0.2.17
SetAddress calculates the address of a chunk and assign's it to address field
type Client ¶ added in v0.4.0
type Client struct {
// contains filtered or unexported fields
}
Client manages communication with the Bee node
func NewClient ¶ added in v0.4.0
func NewClient(opts ClientOptions) (c *Client)
NewClient returns Bee client
func (*Client) CashoutStatus ¶ added in v0.5.6
func (*Client) ChequebookBalance ¶ added in v0.5.6
func (c *Client) ChequebookBalance(ctx context.Context) (resp ChequebookBalanceResponse, err error)
func (*Client) Config ¶ added in v0.5.0
func (c *Client) Config() ClientOptions
func (*Client) CreatePostageBatch ¶ added in v0.5.5
func (c *Client) CreatePostageBatch(ctx context.Context, amount int64, depth uint64, label string) (string, error)
CreatePostageBatchs returns the batchID of a batch of postage stamps
func (*Client) DownloadBytes ¶ added in v0.4.0
DownloadBytes downloads chunk from the node
func (*Client) DownloadChunk ¶ added in v0.4.0
func (c *Client) DownloadChunk(ctx context.Context, a swarm.Address, targets string) (data []byte, err error)
DownloadChunk downloads chunk from the node
func (*Client) DownloadFile ¶ added in v0.4.0
func (c *Client) DownloadFile(ctx context.Context, a swarm.Address) (size int64, hash []byte, err error)
DownloadFile downloads chunk from the node and returns it's size and hash
func (*Client) DownloadManifestFile ¶ added in v0.4.0
func (c *Client) DownloadManifestFile(ctx context.Context, a swarm.Address, path string) (size int64, hash []byte, err error)
DownloadManifestFile downloads manifest file from the node and returns it's size and hash
func (*Client) PinBytes ¶ added in v0.4.1
PinBytes returns true/false if bytes pinning is successful
func (*Client) PinChunk ¶ added in v0.4.0
PinChunk returns true/false if chunk pinning is successful
func (*Client) PingStream ¶ added in v0.4.0
PingStream returns stream of ping results for given nodes
func (*Client) PinnedChunk ¶ added in v0.4.0
PinnedChunk returns pinned chunk
func (*Client) PinnedChunks ¶ added in v0.4.0
func (c *Client) PinnedChunks(ctx context.Context) (PinnedChunks, error)
PinnedChunks returns pinned chunks
func (*Client) RemoveChunk ¶ added in v0.4.0
RemoveChunk removes chunk from the node
func (*Client) ReserveState ¶ added in v0.5.6
CreatePostageBatchs returns the batchID of a batch of postage stamps
func (*Client) SendPSSMessage ¶ added in v0.5.0
func (c *Client) SendPSSMessage(ctx context.Context, nodeAddress swarm.Address, publicKey string, topic string, prefix int, data []byte, batchID string) error
SendPSSMessage triggers a PSS message with a topic and recipient address
func (*Client) Settlement ¶ added in v0.4.0
Settlement returns node's settlement with a given peer
func (*Client) Settlements ¶ added in v0.4.0
func (c *Client) Settlements(ctx context.Context) (resp Settlements, err error)
Settlements returns node's settlements
func (*Client) UnpinChunk ¶ added in v0.4.0
UnpinChunk returns true/false if chunk unpinning is successful
func (*Client) UploadBytes ¶ added in v0.4.0
func (c *Client) UploadBytes(ctx context.Context, b []byte, o api.UploadOptions) (swarm.Address, error)
UploadBytes uploads bytes to the node
func (*Client) UploadChunk ¶ added in v0.4.0
func (c *Client) UploadChunk(ctx context.Context, data []byte, o api.UploadOptions) (swarm.Address, error)
UploadChunk uploads chunk to the node
func (*Client) UploadCollection ¶ added in v0.4.0
UploadCollection uploads TAR collection bytes to the node
func (*Client) UploadFile ¶ added in v0.4.0
UploadFile uploads file to the node
type ClientOptions ¶ added in v0.4.0
type ClientOptions struct { APIURL *url.URL APIInsecureTLS bool DebugAPIURL *url.URL DebugAPIInsecureTLS bool Retry int }
ClientOptions holds optional parameters for the Client.
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster represents cluster of Bee nodes
func NewCluster ¶
func NewCluster(name string, o ClusterOptions) *Cluster
NewCluster returns new cluster
func (*Cluster) AddNodeGroup ¶ added in v0.4.0
func (c *Cluster) AddNodeGroup(name string, o NodeGroupOptions)
AddNodeGroup adds new node group to the cluster
func (*Cluster) Balances ¶ added in v0.2.20
func (c *Cluster) Balances(ctx context.Context) (balances ClusterBalances, err error)
Balances returns ClusterBalances
func (*Cluster) FlattenBalances ¶ added in v0.6.0
func (c *Cluster) FlattenBalances(ctx context.Context) (balances NodeGroupBalances, err error)
FlattenBalances returns aggregated NodeGroupBalances
func (*Cluster) FlattenOverlays ¶ added in v0.6.0
func (c *Cluster) FlattenOverlays(ctx context.Context, include ...string) (map[string]swarm.Address, error)
FlattenOverlays returns aggregated ClusterOverlays
func (*Cluster) FlattenSettlements ¶ added in v0.6.0
func (c *Cluster) FlattenSettlements(ctx context.Context) (settlements NodeGroupSettlements, err error)
FlattenSettlements returns aggregated NodeGroupSettlements
func (*Cluster) FlattenTopologies ¶ added in v0.6.0
func (c *Cluster) FlattenTopologies(ctx context.Context) (topologies map[string]Topology, err error)
FlattenTopologies returns an aggregate of Topologies
func (*Cluster) GlobalReplicationFactor ¶ added in v0.2.12
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) NodeGroups ¶ added in v0.4.0
NodeGroups returns map of node groups in the cluster
func (*Cluster) NodeGroupsSorted ¶ added in v0.4.0
NodeGroupsSorted returns sorted list of node names in the node group
func (*Cluster) NodeNames ¶ added in v0.6.0
NodeNamess returns a list of node names in the cluster across all node groups
func (*Cluster) NodesClients ¶ added in v0.5.0
NodesClients returns map of node's clients in the cluster excluding stopped nodes
func (*Cluster) NodesClientsAll ¶ added in v0.5.0
NodesClientsAll returns map of node's clients in the cluster
func (*Cluster) Overlays ¶
func (c *Cluster) Overlays(ctx context.Context) (overlays ClusterOverlays, err error)
Overlays returns ClusterOverlays
func (*Cluster) Peers ¶ added in v0.2.3
func (c *Cluster) Peers(ctx context.Context) (peers ClusterPeers, err error)
Peers returns peers of all nodes in the cluster
func (*Cluster) RandomNode ¶ added in v0.5.6
RandomNode returns random running node from a cluster
func (*Cluster) Settlements ¶ added in v0.3.0
func (c *Cluster) Settlements(ctx context.Context) (settlements ClusterSettlements, err error)
Settlements returns
func (*Cluster) Topologies ¶ added in v0.2.3
func (c *Cluster) Topologies(ctx context.Context) (topologies ClusterTopologies, err error)
Topologies returns ClusterTopologies
type ClusterAddresses ¶ added in v0.4.0
type ClusterAddresses map[string]NodeGroupAddresses
ClusterAddresses represents addresses of all nodes in the cluster
type ClusterBalances ¶ added in v0.4.0
type ClusterBalances map[string]NodeGroupBalances
ClusterBalances represents balances of all nodes in the cluster
type ClusterOptions ¶
type ClusterOptions struct { Annotations map[string]string APIDomain string APIInsecureTLS bool APIScheme string DebugAPIDomain string DebugAPIInsecureTLS bool DebugAPIScheme string K8SClient *k8s.Client Labels map[string]string Namespace string DisableNamespace bool }
ClusterOptions represents Bee cluster options
type ClusterOverlays ¶ added in v0.4.0
type ClusterOverlays map[string]NodeGroupOverlays
ClusterOverlays represents overlay addresses of all nodes in the cluster
type ClusterPeers ¶ added in v0.4.0
type ClusterPeers map[string]NodeGroupPeers
ClusterPeers represents peers of all nodes in the cluster
type ClusterSettlements ¶ added in v0.4.0
type ClusterSettlements map[string]NodeGroupSettlements
ClusterSettlements represents settlements of all nodes in the cluster
type ClusterTopologies ¶ added in v0.4.0
type ClusterTopologies map[string]NodeGroupTopologies
ClusterTopologies represents Kademlia topology of all nodes in the cluster
type File ¶ added in v0.2.11
type File struct {
// contains filtered or unexported fields
}
File represents Bee file
func NewBufferFile ¶ added in v0.2.18
NewBufferFile returns new file with specified buffer
func NewRandomFile ¶ added in v0.2.11
NewRandomFile returns new pseudorandom file
func (*File) CalculateHash ¶ added in v0.2.18
CalculateHash calculates hash from dataReader. It replaces dataReader with another that will contain the data.
func (*File) ClosestNode ¶ added in v0.2.11
ClosestNode returns file's closest node of a given set of nodes
func (*File) DataReader ¶ added in v0.2.12
DataReader returns file's data reader
type HasChunkStreamMsg ¶ added in v0.2.12
HasChunkStreamMsg represents message sent over the HasChunkStream channel
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents Bee node
func (*Node) ClefPassword ¶ added in v0.4.2
ClefPassword returns node's clefPassword
type NodeGroup ¶ added in v0.4.0
type NodeGroup struct {
// contains filtered or unexported fields
}
NodeGroup represents group of Bee nodes
func NewNodeGroup ¶ added in v0.4.0
func NewNodeGroup(name string, o NodeGroupOptions) *NodeGroup
NewNodeGroup returns new node group
func (*NodeGroup) AddNode ¶ added in v0.4.0
func (g *NodeGroup) AddNode(name string, o NodeOptions) (err error)
AddNode adss new node to the node group
func (*NodeGroup) AddStartNode ¶ added in v0.4.2
AddStartNode adds new node in the node group and starts it in the k8s cluster
func (*NodeGroup) Addresses ¶ added in v0.4.0
func (g *NodeGroup) Addresses(ctx context.Context) (addrs NodeGroupAddresses, err error)
Addresses returns NodeGroupAddresses
func (*NodeGroup) AddressesStream ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (g *NodeGroup) Balances(ctx context.Context) (balances NodeGroupBalances, err error)
Balances returns NodeGroupBalances
func (*NodeGroup) BalancesStream ¶ added in v0.4.0
func (g *NodeGroup) BalancesStream(ctx context.Context) (<-chan BalancesStreamMsg, error)
BalancesStream returns stream of balances of all nodes in the cluster
func (*NodeGroup) CreateNode ¶ added in v0.4.3
CreateNode creates new node in the k8s cluster
func (*NodeGroup) DeleteNode ¶ added in v0.4.1
DeleteNode deletes node from the k8s cluster and removes it from the node group
func (*NodeGroup) GroupReplicationFactor ¶ added in v0.4.0
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 ¶ added in v0.4.0
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) NodeClient ¶ added in v0.4.2
NodeClient returns node's client
func (*NodeGroup) NodesClients ¶ added in v0.4.2
NodesClients returns map of node's clients in the node group excluding stopped nodes
func (*NodeGroup) NodesClientsAll ¶ added in v0.4.3
NodesClientsAll returns map of node's clients in the node group
func (*NodeGroup) NodesSorted ¶ added in v0.4.0
NodesSorted returns sorted list of node names in the node group
func (*NodeGroup) Overlays ¶ added in v0.4.0
func (g *NodeGroup) Overlays(ctx context.Context) (overlays NodeGroupOverlays, err error)
Overlays returns NodeGroupOverlays
func (*NodeGroup) OverlaysStream ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (g *NodeGroup) Peers(ctx context.Context) (peers NodeGroupPeers, err error)
Peers returns NodeGroupPeers
func (*NodeGroup) PeersStream ¶ added in v0.4.0
func (g *NodeGroup) PeersStream(ctx context.Context) (<-chan PeersStreamMsg, error)
PeersStream returns stream of peers of all nodes in the node group
func (*NodeGroup) RunningNodes ¶ added in v0.4.7
RunningNodes returns list of running nodes
func (*NodeGroup) Settlements ¶ added in v0.4.0
func (g *NodeGroup) Settlements(ctx context.Context) (settlements NodeGroupSettlements, err error)
Settlements returns NodeGroupSettlements
func (*NodeGroup) SettlementsStream ¶ added in v0.4.0
func (g *NodeGroup) SettlementsStream(ctx context.Context) (<-chan SettlementsStreamMsg, error)
SettlementsStream returns stream of settlements of all nodes in the cluster
func (*NodeGroup) StopNode ¶ added in v0.4.2
StopNode stops node by scaling down its statefulset to 0
func (*NodeGroup) StoppedNodes ¶ added in v0.4.2
StoppedNodes returns list of stopped nodes
func (*NodeGroup) Topologies ¶ added in v0.4.0
func (g *NodeGroup) Topologies(ctx context.Context) (topologies NodeGroupTopologies, err error)
Topologies returns NodeGroupTopologies
func (*NodeGroup) TopologyStream ¶ added in v0.4.0
func (g *NodeGroup) TopologyStream(ctx context.Context) (<-chan TopologyStreamMsg, error)
TopologyStream returns stream of Kademlia topologies of all nodes in the node group
type NodeGroupAddresses ¶ added in v0.4.0
NodeGroupAddresses represents addresses of all nodes in the node group
type NodeGroupBalances ¶ added in v0.4.0
NodeGroupBalances represents balances of all nodes in the node group
type NodeGroupOptions ¶ added in v0.4.0
type NodeGroupOptions struct { Annotations map[string]string ClefImage string ClefImagePullPolicy string BeeConfig *k8s.Config Image string ImagePullPolicy string ImagePullSecrets []string IngressAnnotations map[string]string IngressDebugAnnotations map[string]string Labels map[string]string LimitCPU string LimitMemory string NodeSelector map[string]string PersistenceEnabled bool PersistenceStorageClass string PersistanceStorageRequest string PodManagementPolicy string RestartPolicy string RequestCPU string RequestMemory string UpdateStrategy string }
NodeGroupOptions represents node group options
type NodeGroupOverlays ¶ added in v0.4.0
NodeGroupOverlays represents overlay addresses of all nodes in the node group
type NodeGroupPeers ¶ added in v0.4.0
NodeGroupPeers represents peers of all nodes in the node group
type NodeGroupSettlements ¶ added in v0.4.0
type NodeGroupSettlements map[string]map[string]SentReceived
NodeGroupSettlements represents settlements of all nodes in the node group
type NodeGroupTopologies ¶ added in v0.4.0
NodeGroupTopologies represents Kademlia topology of all nodes in the node group
type NodeOptions ¶
type NodeOptions struct { ClefKey string ClefPassword string Client *Client Config *k8s.Config LibP2PKey string SwarmKey string }
NodeOptions holds optional parameters for the Node.
type OverlaysStreamMsg ¶ added in v0.2.3
OverlaysStreamMsg represents message sent over the OverlaysStream channel
type PeersStreamMsg ¶ added in v0.2.3
PeersStreamMsg represents message sent over the PeersStream channel
type PingStreamMsg ¶ added in v0.2.4
PingStreamMsg represents message sent over the PingStream channel
type PinnedChunk ¶ added in v0.2.12
PinnedChunk represents pinned chunk
type PinnedChunks ¶ added in v0.2.12
type PinnedChunks struct {
Chunks []PinnedChunk
}
PinnedChunks represents pinned chunks
type SentReceived ¶ added in v0.3.0
SentReceived object
type Settlement ¶ added in v0.3.0
Settlement represents node's settlement with peer
type Settlements ¶ added in v0.3.0
type Settlements struct { Settlements []Settlement TotalReceived int TotalSent int }
Settlements represents Settlements's response
type SettlementsStreamMsg ¶ added in v0.3.0
type SettlementsStreamMsg struct { Name string Settlements Settlements Error error }
SettlementsStreamMsg represents message sent over the SettlementsStream channel
type Topology ¶ added in v0.2.2
type Topology struct { Overlay swarm.Address Connected int Population int NnLowWatermark int Depth int Bins map[string]Bin LightNodes Bin }
Topology represents Kademlia topology
type TopologyStreamMsg ¶ added in v0.2.3
TopologyStreamMsg represents message sent over the TopologyStream channel