bee

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2021 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client manages communication with the Kubernetes

func NewClient

func NewClient(k8s *k8s.Client) (c *Client)

NewClient returns Kubernetes clientset

func (*Client) Delete added in v0.4.2

func (c *Client) Delete(ctx context.Context, o DeleteOptions) (err error)

Delete deletes Bee node from the cluster

func (*Client) Ready added in v0.4.2

func (c *Client) Ready(ctx context.Context, o ReadyOptions) (ready bool, err error)

Ready gets Bee node's readiness

func (*Client) Start added in v0.4.2

func (c *Client) Start(ctx context.Context, o StartOptions) (err error)

Start starts Bee node in the cluster

func (*Client) StartedNodes added in v0.4.2

func (c *Client) StartedNodes(ctx context.Context, namespace string) (started []string, err error)

StartedNodes returns list of started nodes TODO: filter by labels

func (*Client) Stop added in v0.4.2

func (c *Client) Stop(ctx context.Context, o StopOptions) (err error)

Stop stops Bee node in the cluster

func (*Client) StoppedNodes added in v0.4.2

func (c *Client) StoppedNodes(ctx context.Context, namespace string) (stopped []string, err error)

StoppedNodes returns list of stopped nodes TODO: filter by labels

type ClientOptions

type ClientOptions struct {
	KubeconfigPath string
}

ClientOptions holds optional parameters for the Client.

type Config

type Config struct {
	APIAddr              string // HTTP API listen address
	Bootnodes            string // initial nodes to connect to
	ClefSignerEnable     bool   // enable clef signer
	ClefSignerEndpoint   string // clef signer endpoint
	CORSAllowedOrigins   string // origins with CORS headers enabled
	DataDir              string // data directory
	DBCapacity           uint64 // db capacity in chunks, multiply by 4096 (MaxChunkSize) to get approximate capacity in bytes
	DebugAPIAddr         string // debug HTTP API listen address
	DebugAPIEnable       bool   // enable debug HTTP API
	GatewayMode          bool   // disable a set of sensitive features in the api
	GlobalPinningEnabled bool   // enable global pinning
	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
	ResolverEndpoints    string // ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url
	Standalone           bool   // whether we want the node to start with no listen addresses for p2p
	SwapEnable           bool   // enable swap
	SwapEndpoint         string // swap ethereum blockchain endpoint
	SwapFactoryAddress   string // swap factory address
	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
	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
}

Config represents Bee configuration

type DeleteOptions added in v0.4.2

type DeleteOptions struct {
	Name      string
	Namespace string
}

DeleteOptions represents available options for starting node

type ReadyOptions added in v0.4.2

type ReadyOptions struct {
	Name      string
	Namespace string
}

ReadyOptions represents available options for getting node's readiness

type StartOptions added in v0.4.2

type StartOptions 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
	LimitCPU                  string
	LimitMemory               string
	Image                     string
	ImagePullPolicy           string
	IngressAnnotations        map[string]string
	IngressHost               string
	IngressDebugAnnotations   map[string]string
	IngressDebugHost          string
	LibP2PKey                 string
	NodeSelector              map[string]string
	PersistenceEnabled        bool
	PersistenceStorageClass   string
	PersistanceStorageRequest string
	PodManagementPolicy       string
	RestartPolicy             string
	RequestCPU                string
	RequestMemory             string
	Selector                  map[string]string
	SwarmKey                  string
	UpdateStrategy            string
}

StartOptions represents available options for starting node

type StopOptions added in v0.4.2

type StopOptions struct {
	Name      string
	Namespace string
}

StopOptions represents available options for stopping node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL