Documentation ¶
Index ¶
- Variables
- type Cluster
- type ClusterAddresses
- type ClusterBalances
- type ClusterOptions
- type ClusterOverlays
- type ClusterPeers
- type ClusterSettlements
- type ClusterTopologies
- type Config
- type CreateOptions
- type FundingOptions
- type Node
- type NodeGroup
- type NodeGroupAddresses
- type NodeGroupBalances
- type NodeGroupOptions
- type NodeGroupOverlays
- type NodeGroupPeers
- type NodeGroupSettlements
- type NodeGroupTopologies
- type NodeOptions
- type SentReceived
Constants ¶
This section is empty.
Variables ¶
var ErrNotSet = errors.New("orchestration client not set")
ErrNotSet represents error when orchestration client is not set
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface { AddNodeGroup(name string, o NodeGroupOptions) Addresses(ctx context.Context) (addrs map[string]NodeGroupAddresses, err error) Balances(ctx context.Context) (balances ClusterBalances, err error) FlattenBalances(ctx context.Context) (balances NodeGroupBalances, err error) GlobalReplicationFactor(ctx context.Context, a swarm.Address) (grf int, err error) Name() string NodeGroups() (l map[string]NodeGroup) NodeGroupsSorted() (l []string) NodeGroup(name string) (ng NodeGroup, err error) Nodes() map[string]Node NodeNames() (names []string) LightNodeNames() (names []string) FullNodeNames() (names []string) NodesClients(ctx context.Context) (map[string]*bee.Client, error) NodesClientsAll(ctx context.Context) (map[string]*bee.Client, error) Overlays(ctx context.Context, exclude ...string) (overlays ClusterOverlays, err error) FlattenOverlays(ctx context.Context, exclude ...string) (map[string]swarm.Address, error) Peers(ctx context.Context, exclude ...string) (peers ClusterPeers, err error) RandomNode(ctx context.Context, r *rand.Rand) (node Node, err error) Settlements(ctx context.Context) (settlements ClusterSettlements, err error) FlattenSettlements(ctx context.Context) (settlements NodeGroupSettlements, err error) Size() (size int) Topologies(ctx context.Context) (topologies ClusterTopologies, err error) FlattenTopologies(ctx context.Context) (topologies map[string]bee.Topology, err error) }
type ClusterAddresses ¶
type ClusterAddresses map[string]NodeGroupAddresses
ClusterAddresses represents addresses of all nodes in the cluster
type ClusterBalances ¶
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 SwapClient swap.Client Labels map[string]string Namespace string DisableNamespace bool AdminPassword string }
ClusterOptions represents Bee cluster options
type ClusterOverlays ¶
type ClusterOverlays map[string]NodeGroupOverlays
ClusterOverlays represents overlay addresses of all nodes in the cluster
type ClusterPeers ¶
type ClusterPeers map[string]NodeGroupPeers
ClusterPeers represents peers of all nodes in the cluster
type ClusterSettlements ¶
type ClusterSettlements map[string]NodeGroupSettlements
ClusterSettlements represents settlements of all nodes in the cluster
type ClusterTopologies ¶
type ClusterTopologies map[string]NodeGroupTopologies
ClusterTopologies represents Kademlia topology of all nodes in the cluster
type Config ¶
type Config struct { AllowPrivateCIDRs bool // allow to advertise private CIDRs to the public network APIAddr string // HTTP API listen address BlockTime uint64 // chain block time Bootnodes string // initial nodes to connect to BootnodeMode bool // cause the node to always accept incoming connections CacheCapacity uint64 // cache capacity in chunks, multiply by 4096 (MaxChunkSize) to get approximate capacity in bytes ClefSignerEnable bool // enable clef signer ClefSignerEndpoint string // clef signer endpoint CORSAllowedOrigins string // origins with CORS headers enabled DataDir string // data directory DbOpenFilesLimit int // number of open files allowed by database DbBlockCacheCapacity int // size of block cache of the database in bytes DbWriteBufferSize int // size of the database write buffer in bytes DbDisableSeeksCompaction bool // disables DB compactions triggered by seeks DebugAPIAddr string // debug HTTP API listen address DebugAPIEnable bool // enable debug HTTP API FullNode bool // cause the node to start in full mode GatewayMode bool // disable a set of sensitive features in the api Mainnet bool // enable mainnet NATAddr string // NAT exposed address NetworkID uint64 // ID of the Swarm network P2PAddr string // P2P listen address P2PQUICEnable bool // enable P2P QUIC transport P2PWSEnable bool // enable P2P WebSocket transport Password string // password for decrypting keys PaymentEarly uint64 // amount in BZZ below the peers payment threshold when we initiate settlement PaymentThreshold uint64 // threshold in BZZ where you expect to get paid from your peers PaymentTolerance uint64 // excess debt above payment threshold in BZZ where you disconnect from your peer PostageStampAddress string // postage stamp address PriceOracleAddress string // price Oracle address ResolverOptions string // ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url Restricted bool // start node in restricted mode TokenEncryptionKey string // username for API authentication AdminPassword string // password hash for API authentication Standalone bool // whether we want the node to start with no listen addresses for p2p ChequebookEnable bool // enable chequebook SwapEnable bool // enable swap SwapEndpoint string // swap ethereum blockchain endpoint SwapDeploymentGasPrice string // gas price in wei to use for deployment and funding SwapFactoryAddress string // swap factory address SwapLegacyFactoryAddresses string // swap legacy factory addresses SwapInitialDeposit uint64 // initial deposit if deploying a new chequebook TracingEnabled bool // enable tracing TracingEndpoint string // endpoint to send tracing data TracingServiceName string // service name identifier for tracing Transaction string // proof-of-identity transaction hash Verbosity uint64 // log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace WelcomeMessage string // send a welcome message string during handshakes WarmupTime time.Duration // warmup time pull/pushsync protocols }
Config represents Bee configuration
type CreateOptions ¶
type CreateOptions struct { // Bee configuration Config Config // Kubernetes configuration Name string Namespace string Annotations map[string]string ClefImage string ClefImagePullPolicy string ClefKey string ClefPassword string Labels map[string]string Image string ImagePullPolicy string ImagePullSecrets []string IngressAnnotations map[string]string IngressClass string IngressHost string IngressDebugAnnotations map[string]string IngressDebugClass string IngressDebugHost string LibP2PKey string NodeSelector map[string]string PersistenceEnabled bool PersistenceStorageClass string PersistenceStorageRequest string PodManagementPolicy string RestartPolicy string ResourcesLimitCPU string ResourcesLimitMemory string ResourcesRequestCPU string ResourcesRequestMemory string Selector map[string]string SwarmKey string UpdateStrategy string }
CreateOptions represents available options for creating node
type FundingOptions ¶
type Node ¶
type Node interface { Name() string Client() *bee.Client ClefKey() string ClefPassword() string Config() *Config Create(ctx context.Context, o CreateOptions) (err error) Delete(ctx context.Context, namespace string) (err error) LibP2PKey() string Ready(ctx context.Context, namespace string) (ready bool, err error) Start(ctx context.Context, namespace string) (err error) Stop(ctx context.Context, namespace string) (err error) SwarmKey() string SetSwarmKey(key string) Node SetClefKey(key string) Node SetClefPassword(key string) Node }
type NodeGroup ¶
type NodeGroup interface { AddNode(ctx context.Context, name string, o NodeOptions) (err error) Addresses(ctx context.Context) (addrs NodeGroupAddresses, err error) Balances(ctx context.Context) (balances NodeGroupBalances, err error) CreateNode(ctx context.Context, name string) (err error) DeleteNode(ctx context.Context, name string) (err error) Fund(ctx context.Context, name string, o FundingOptions) (err error) GroupReplicationFactor(ctx context.Context, a swarm.Address) (grf int, err error) Name() string Nodes() map[string]Node NodesClients(ctx context.Context) (map[string]*bee.Client, error) NodesClientsAll(ctx context.Context) map[string]*bee.Client NodesSorted() (l []string) Node(name string) (Node, error) NodeClient(name string) (*bee.Client, error) Overlays(ctx context.Context) (overlays NodeGroupOverlays, err error) Peers(ctx context.Context) (peers NodeGroupPeers, err error) NodeReady(ctx context.Context, name string) (ok bool, err error) RunningNodes(ctx context.Context) (running []string, err error) SetupNode(ctx context.Context, name string, o NodeOptions, f FundingOptions) (err error) Settlements(ctx context.Context) (settlements NodeGroupSettlements, err error) Size() int StartNode(ctx context.Context, name string) (err error) StopNode(ctx context.Context, name string) (err error) StoppedNodes(ctx context.Context) (stopped []string, err error) Topologies(ctx context.Context) (topologies NodeGroupTopologies, err error) }
type NodeGroupAddresses ¶
NodeGroupAddresses represents addresses of all nodes in the node group
type NodeGroupBalances ¶
NodeGroupBalances represents balances of all nodes in the node group
type NodeGroupOptions ¶
type NodeGroupOptions struct { Annotations map[string]string ClefImage string ClefImagePullPolicy string BeeConfig *Config Image string ImagePullPolicy string ImagePullSecrets []string IngressAnnotations map[string]string IngressClass string IngressDebugAnnotations map[string]string IngressDebugClass string Labels map[string]string NodeSelector map[string]string PersistenceEnabled bool PersistenceStorageClass string PersistenceStorageRequest string PodManagementPolicy string RestartPolicy string ResourcesLimitCPU string ResourcesLimitMemory string ResourcesRequestCPU string ResourcesRequestMemory string UpdateStrategy string }
NodeGroupOptions represents node group options
type NodeGroupOverlays ¶
NodeGroupOverlays represents overlay addresses of all nodes in the node group
type NodeGroupPeers ¶
NodeGroupPeers represents peers of all nodes in the node group
type NodeGroupSettlements ¶
type NodeGroupSettlements map[string]map[string]SentReceived
NodeGroupSettlements represents settlements of all nodes in the node group
type NodeGroupTopologies ¶
NodeGroupTopologies represents Kademlia topology of all nodes in the node group