Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Checks = map[string]CheckType{ "balances": { NewAction: balances.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { DryRun *bool `yaml:"dry-run"` FileName *string `yaml:"file-name"` FileSize *int64 `yaml:"file-size"` PostageAmount *int64 `yaml:"postage-amount"` PostageWait *time.Duration `yaml:"postage-wait"` Seed *int64 `yaml:"seed"` UploadNodeCount *int `yaml:"upload-node-count"` WaitBeforeDownload *time.Duration `yaml:"wait-before-download"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := balances.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "cashout": { NewAction: cashout.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { NodeGroup *string `yaml:"node-group"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := cashout.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "chunk-repair": { NewAction: chunkrepair.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { MetricsEnabled *bool `yaml:"metrics-enabled"` NodeGroup *string `yaml:"node-group"` NumberOfChunksToRepair *int `yaml:"number-of-chunks-to-repair"` PostageAmount *int64 `yaml:"postage-amount"` PostageWait *time.Duration `yaml:"postage-wait"` Seed *int64 `yaml:"seed"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := chunkrepair.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "file-retrieval": { NewAction: fileretrieval.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { FileName *string `yaml:"file-name"` FileSize *int64 `yaml:"file-size"` FilesPerNode *int `yaml:"files-per-node"` Full *bool `yaml:"full"` MetricsEnabled *bool `yaml:"metrics-enabled"` NodeGroup *string `yaml:"node-group"` PostageAmount *int64 `yaml:"postage-amount"` PostageWait *time.Duration `yaml:"postage-wait"` Seed *int64 `yaml:"seed"` UploadNodeCount *int `yaml:"upload-node-count"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := fileretrieval.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "full-connectivity": { NewAction: fullconnectivity.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { return nil, nil }, }, "gc": { NewAction: gc.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { CacheSize *int `yaml:"cache-size"` Seed *int64 `yaml:"seed"` PostageAmount *int64 `yaml:"postage-amount"` PostageWait *time.Duration `yaml:"postage-wait"` ReserveSize *int `yaml:"reserve-size"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := gc.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "kademlia": { NewAction: kademlia.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { Dynamic *bool `yaml:"dynamic"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := kademlia.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "manifest": { NewAction: manifest.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { FilesInCollection *int `yaml:"files-in-collection"` MaxPathnameLength *int32 `yaml:"max-pathname-length"` PostageAmount *int64 `yaml:"postage-amount"` PostageDepth *uint64 `yaml:"postage-depth"` PostageWait *time.Duration `yaml:"postage-wait"` Seed *int64 `yaml:"seed"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := manifest.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "peer-count": { NewAction: peercount.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { return nil, nil }, }, "pingpong": { NewAction: pingpong.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { MetricsEnabled *bool `yaml:"metrics-enabled"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := pingpong.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "pss": { NewAction: pss.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { AddressPrefix *int `yaml:"address-prefix"` MetricsEnabled *bool `yaml:"metrics-enabled"` NodeCount *int `yaml:"node-count"` PostageAmount *int64 `yaml:"postage-amount"` PostageDepth *uint64 `yaml:"postage-depth"` PostageWait *time.Duration `yaml:"postage-wait"` RequestTimeout *time.Duration `yaml:"request-timeout"` Seed *int64 `yaml:"seed"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := pss.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "pullsync": { NewAction: pullsync.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { ChunksPerNode *int `yaml:"chunks-per-node"` PostageAmount *int64 `yaml:"postage-amount"` PostageWait *time.Duration `yaml:"postage-wait"` ReplicationFactorThreshold *int `yaml:"replication-factor-threshold"` Seed *int64 `yaml:"seed"` UploadNodeCount *int `yaml:"upload-node-count"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := pullsync.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "pushsync": { NewAction: pushsync.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { ChunksPerNode *int `yaml:"chunks-per-node"` MetricsEnabled *bool `yaml:"metrics-enabled"` Mode *string `yaml:"mode"` PostageAmount *int64 `yaml:"postage-amount"` PostageDepth *uint64 `yaml:"postage-depth"` PostageWait *time.Duration `yaml:"postage-wait"` Retries *int `yaml:"retries"` RetryDelay *time.Duration `yaml:"retry-delay"` Seed *int64 `yaml:"seed"` UploadNodeCount *int `yaml:"upload-node-count"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := pushsync.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "retrieval": { NewAction: retrieval.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { ChunksPerNode *int `yaml:"chunks-per-node"` MetricsEnabled *bool `yaml:"metrics-enabled"` PostageAmount *int64 `yaml:"postage-amount"` PostageDepth *uint64 `yaml:"postage-depth"` PostageWait *time.Duration `yaml:"postage-wait"` Seed *int64 `yaml:"seed"` UploadNodeCount *int `yaml:"upload-node-count"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := retrieval.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "settlements": { NewAction: settlements.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { DryRun *bool `yaml:"dry-run"` ExpectSettlements *bool `yaml:"expect-settlements"` FileName *string `yaml:"file-name"` FileSize *int64 `yaml:"file-size"` PostageAmount *int64 `yaml:"postage-amount"` PostageDepth *uint64 `yaml:"postage-depth"` PostageWait *time.Duration `yaml:"postage-wait"` Seed *int64 `yaml:"seed"` Threshold *int64 `yaml:"threshold"` UploadNodeCount *int `yaml:"upload-node-count"` WaitBeforeDownload *time.Duration `yaml:"wait-before-download"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := settlements.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "smoke": { NewAction: smoke.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { Bytes *int `yaml:"bytes"` NodeGroup *string `yaml:"node-group"` Runs *int `yaml:"runs"` Seed *int64 `yaml:"seed"` Timeout *time.Duration `yaml:"timeout"` UploadNodeCount *int `yaml:"upload-node-count"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := smoke.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, "soc": { NewAction: soc.NewCheck, NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { checkOpts := new(struct { PostageAmount *int64 `yaml:"postage-amount"` PostageDepth *uint64 `yaml:"postage-depth"` PostageWait *time.Duration `yaml:"postage-wait"` RequestTimeout *time.Duration `yaml:"request-timeout"` }) if err := check.Options.Decode(checkOpts); err != nil { return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) } opts := soc.NewDefaultOptions() if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, }
Checks represents all available check types
var Simulations = map[string]SimulationType{ "upload": { NewAction: upload.NewSimulation, NewOptions: func(simulationGlobalConfig SimulationGlobalConfig, simulation Simulation) (interface{}, error) { simulationOpts := new(struct { FileSize *int64 `yaml:"file-size"` PostageWait *time.Duration `yaml:"postage-wait"` Retries *int `yaml:"retries"` RetryDelay *time.Duration `yaml:"retry-delay"` Seed *int64 `yaml:"seed"` Timeout *time.Duration `yaml:"timeout"` UploadNodePercentage *int `yaml:"upload-node-percentage"` }) if err := simulation.Options.Decode(simulationOpts); err != nil { return nil, fmt.Errorf("decoding simulation %s options: %w", simulation.Type, err) } opts := upload.NewDefaultOptions() if err := applySimulationConfig(simulationGlobalConfig, simulationOpts, &opts); err != nil { return nil, fmt.Errorf("applying options: %w", err) } return opts, nil }, }, }
Checks represents all available simulation types
Functions ¶
This section is empty.
Types ¶
type BeeConfig ¶
type BeeConfig struct {
// parent to inherit settings from
*Inherit `yaml:",inline"`
// Bee configuration
APIAddr *string `yaml:"api-addr"`
BlockTime *uint64 `yaml:"block-time"`
Bootnodes *string `yaml:"bootnodes"`
BootnodeMode *bool `yaml:"bootnode-mode"`
CacheCapacity *uint64 `yaml:"cache-capacity"`
ClefSignerEnable *bool `yaml:"clef-signer-enable"`
ClefSignerEndpoint *string `yaml:"clef-signer-endpoint"`
CORSAllowedOrigins *string `yaml:"cors-allowed-origins"`
DataDir *string `yaml:"data-dir"`
DbOpenFilesLimit *int `yaml:"db-open-files-limit"`
DbBlockCacheCapacity *int `yaml:"db-block-cache-capacity"`
DbWriteBufferSize *int `yaml:"db-write-buffer-size"`
DbDisableSeeksCompaction *bool `yaml:"db-disable-seeks-compaction"`
DebugAPIAddr *string `yaml:"debug-api-addr"`
DebugAPIEnable *bool `yaml:"debug-api-enable"`
FullNode *bool `yaml:"full-node"`
GatewayMode *bool `yaml:"gateway-mode"`
GlobalPinningEnabled *bool `yaml:"global-pinning-enabled"`
NATAddr *string `yaml:"nat-addr"`
NetworkID *uint64 `yaml:"network-id"`
P2PAddr *string `yaml:"p2p-addr"`
P2PQUICEnable *bool `yaml:"p2p-quic-enable"`
P2PWSEnable *bool `yaml:"pwp-ws-enable"`
Password *string `yaml:"password"`
PaymentEarly *uint64 `yaml:"payment-early"`
PaymentThreshold *uint64 `yaml:"payment-threshold"`
PaymentTolerance *uint64 `yaml:"payment-tolerance"`
PostageStampAddress *string `yaml:"postage-stamp-address"`
PriceOracleAddress *string `yaml:"price-oracle-address"`
ResolverOptions *string `yaml:"resolver-options"`
Standalone *bool `yaml:"standalone"`
SwapEnable *bool `yaml:"swap-enable"`
SwapEndpoint *string `yaml:"swap-endpoint"`
SwapFactoryAddress *string `yaml:"swap-factory-address"`
SwapLegacyFactoryAddresses *string `yaml:"swap-legacy-factory-addresses"`
SwapInitialDeposit *uint64 `yaml:"swap-initial-deposit"`
TracingEnabled *bool `yaml:"tracing-enabled"`
TracingEndpoint *string `yaml:"tracing-endpoint"`
TracingServiceName *string `yaml:"tracing-service-name"`
Verbosity *uint64 `yaml:"verbosity"`
WelcomeMessage *string `yaml:"welcome-message"`
}
BeeConfig represents Bee configuration
type Check ¶
type Check struct {
Options yaml.Node `yaml:"options"`
Timeout *time.Duration `yaml:"timeout"`
Type string `yaml:"type"`
}
Check represents check configuration
type CheckGlobalConfig ¶
CheckGlobalConfig represents global configs for all checks
type CheckType ¶
type CheckType struct {
NewAction func() beekeeper.Action // links check with beekeeper action
NewOptions func(CheckGlobalConfig, Check) (interface{}, error) // check options
}
CheckType is used for linking beekeeper actions with check and it's proper options
type Cluster ¶
type Cluster struct {
// parent to inherit settings from
*Inherit `yaml:",inline"`
// Cluster configuration
Name *string `yaml:"name"`
Namespace *string `yaml:"namespace"`
DisableNamespace *bool `yaml:"disable-namespace"`
APIDomain *string `yaml:"api-domain"`
APIInsecureTLS *bool `yaml:"api-insecure-tls"`
APIScheme *string `yaml:"api-scheme"`
DebugAPIDomain *string `yaml:"debug-api-domain"`
DebugAPIInsecureTLS *bool `yaml:"debug-api-insecure-tls"`
DebugAPIScheme *string `yaml:"debug-api-scheme"`
NodeGroups *map[string]ClusterNodeGroup `yaml:"node-groups"`
}
Cluster represents cluster configuration
func (*Cluster) Export ¶
func (c *Cluster) Export() (o bee.ClusterOptions)
Export exports Cluster to bee.ClusterOptions, skipping all other extra fields
func (*Cluster) GetNamespace ¶
GetNamespace returns cluster namespace
func (*Cluster) GetNodeGroups ¶
func (c *Cluster) GetNodeGroups() map[string]ClusterNodeGroup
GetNodeGroups returns cluster node groups
type ClusterNode ¶
type ClusterNode struct {
Name string `yaml:"name"`
Bootnodes string `yaml:"bootnodes"`
Clef Clef `yaml:"clef"`
LibP2PKey string `yaml:"libp2p-key"`
SwarmKey string `yaml:"swarm-key"`
}
ClusterNode represents node in the cluster
type ClusterNodeGroup ¶
type ClusterNodeGroup struct {
Mode string `yaml:"mode"`
BeeConfig string `yaml:"bee-config"`
Config string `yaml:"config"`
Count int `yaml:"count"`
Nodes []ClusterNode `yaml:"nodes"`
}
ClusterNodeGroup represents node group in the cluster
type Config ¶
type Config struct {
Clusters map[string]Cluster `yaml:"clusters"`
NodeGroups map[string]NodeGroup `yaml:"node-groups"`
BeeConfigs map[string]BeeConfig `yaml:"bee-configs"`
Checks map[string]Check `yaml:"checks"`
Simulations map[string]Simulation `yaml:"simulations"`
}
Config represents Beekeeper's configuration read from files
type Inherit ¶
type Inherit struct {
ParentName string `yaml:"_inherit"`
}
Inherit is struct used for implementing inheritance in Config objects
type NodeGroup ¶
type NodeGroup struct {
// parent to inherit settings from
*Inherit `yaml:",inline"`
// node group configuration
Annotations *map[string]string `yaml:"annotations"`
ClefImage *string `yaml:"clef-image"`
ClefImagePullPolicy *string `yaml:"clef-image-pull-policy"`
Image *string `yaml:"image"`
ImagePullPolicy *string `yaml:"image-pull-policy"`
ImagePullSecrets *[]string `yaml:"image-pull-secrets"`
IngressAnnotations *map[string]string `yaml:"ingress-annotations"`
IngressClass *string `yaml:"ingress-class"`
IngressDebugAnnotations *map[string]string `yaml:"ingress-debug-annotations"`
IngressDebugClass *string `yaml:"ingress-debug-class"`
Labels *map[string]string `yaml:"labels"`
NodeSelector *map[string]string `yaml:"node-selector"`
PersistenceEnabled *bool `yaml:"persistence-enabled"`
PersistenceStorageClass *string `yaml:"persistence-storage-class"`
PersistenceStorageRequest *string `yaml:"persistence-storage-request"`
PodManagementPolicy *string `yaml:"pod-management-policy"`
ResourcesLimitCPU *string `yaml:"resources-limit-cpu"`
ResourcesLimitMemory *string `yaml:"resources-limit-memory"`
ResourcesRequestCPU *string `yaml:"resources-request-cpu"`
ResourcesRequestMemory *string `yaml:"resources-request-memory"`
RestartPolicy *string `yaml:"restart-policy"`
UpdateStrategy *string `yaml:"update-strategy"`
}
NodeGroup represents node group configuration
func (*NodeGroup) Export ¶
func (n *NodeGroup) Export() (o bee.NodeGroupOptions)
Export exports NodeGroup to bee.NodeGroupOptions
type Simulation ¶
type Simulation struct {
Options yaml.Node `yaml:"options"`
Timeout *time.Duration `yaml:"timeout"`
Type string `yaml:"type"`
}
Simulation represents simulation configuration
type SimulationGlobalConfig ¶
SimulationGlobalConfig represents global configs for all simulations
type SimulationType ¶
type SimulationType struct {
NewAction func() beekeeper.Action
NewOptions func(SimulationGlobalConfig, Simulation) (interface{}, error)
}
SimulationType is used for linking beekeeper actions with simulation and it's proper options