Documentation
¶
Index ¶
- Constants
- Variables
- func Execute()
- func LoadConfig[V any](cmd *cobra.Command) (*V, error)
- func NewBucketUpgrade() *cobra.Command
- func NewBucketsCommand() *cobra.Command
- func NewDocEventsCommand() *cobra.Command
- func NewDocFlagsCommand() *cobra.Command
- func NewDocsCommand() *cobra.Command
- func NewRootCommand() *cobra.Command
- func NewServeCommand() *cobra.Command
- func NewVersionCommand() *cobra.Command
- func NewWorkerCommand() *cobra.Command
- func PrintVersion(_ *cobra.Command, _ []string)
- type ServeCommandConfig
- type WorkerCommandConfiguration
- type WorkerConfiguration
- type WorkerGRPCConfig
Constants ¶
View Source
const ( ServiceName = "ledger" NumscriptInterpreterFlag = "experimental-numscript-interpreter" NumscriptInterpreterFlagsToPass = "experimental-numscript-interpreter-flags" ExperimentalFeaturesFlag = "experimental-features" ExperimentalExporters = "experimental-exporters" )
View Source
const ( BindFlag = "bind" BallastSizeInBytesFlag = "ballast-size" NumscriptCacheMaxCountFlag = "numscript-cache-max-count" AutoUpgradeFlag = "auto-upgrade" BulkMaxSizeFlag = "bulk-max-size" BulkParallelFlag = "bulk-parallel" DefaultPageSizeFlag = "default-page-size" MaxPageSizeFlag = "max-page-size" WorkerEnabledFlag = "worker" SemconvMetricsNames = "semconv-metrics-names" SchemaEnforcementMode = "schema-enforcement-mode" )
View Source
const ( WorkerPipelinesPullIntervalFlag = "worker-pipelines-pull-interval" WorkerPipelinesPushRetryPeriodFlag = "worker-pipelines-push-retry-period" WorkerPipelinesSyncPeriod = "worker-pipelines-sync-period" WorkerPipelinesLogsPageSize = "worker-pipelines-logs-page-size" WorkerAsyncBlockHasherMaxBlockSizeFlag = "worker-async-block-hasher-max-block-size" WorkerAsyncBlockHasherScheduleFlag = "worker-async-block-hasher-schedule" WorkerBucketCleanupRetentionPeriodFlag = "worker-bucket-cleanup-retention-period" WorkerBucketCleanupScheduleFlag = "worker-bucket-cleanup-schedule" WorkerGRPCAddressFlag = "worker-grpc-address" )
Variables ¶
View Source
var ( Version = "develop" BuildDate = "-" Commit = "-" )
Functions ¶
func NewBucketUpgrade ¶
func NewBucketsCommand ¶
func NewDocEventsCommand ¶
func NewDocFlagsCommand ¶
func NewDocsCommand ¶
func NewRootCommand ¶
func NewServeCommand ¶
func NewVersionCommand ¶
func NewWorkerCommand ¶
NewWorkerCommand constructs the "worker" Cobra command which initializes and runs the worker service using loaded configuration and composed FX modules. The command registers worker-specific flags via addWorkerFlags and common service, bunconnect, and OTLP flags, and exposes the --worker-grpc-address flag (default ":8081"). When executed it loads configuration and starts the service with the configured modules and a gRPC server.
func PrintVersion ¶
Types ¶
type ServeCommandConfig ¶
type ServeCommandConfig struct {
WorkerConfiguration `mapstructure:",squash"`
Bind string `mapstructure:"bind"`
BallastSizeInBytes uint `mapstructure:"ballast-size"`
NumscriptCacheMaxCount uint `mapstructure:"numscript-cache-max-count"`
AutoUpgrade bool `mapstructure:"auto-upgrade"`
BulkMaxSize int `mapstructure:"bulk-max-size"`
BulkParallel int `mapstructure:"bulk-parallel"`
DefaultPageSize uint64 `mapstructure:"default-page-size"`
MaxPageSize uint64 `mapstructure:"max-page-size"`
WorkerEnabled bool `mapstructure:"worker"`
WorkerAddress string `mapstructure:"worker-grpc-address"`
// contains filtered or unexported fields
}
type WorkerCommandConfiguration ¶
type WorkerCommandConfiguration struct {
WorkerConfiguration `mapstructure:",squash"`
WorkerGRPCConfig `mapstructure:",squash"`
// contains filtered or unexported fields
}
type WorkerConfiguration ¶
type WorkerConfiguration struct {
HashLogsBlockMaxSize int `mapstructure:"worker-async-block-hasher-max-block-size"`
HashLogsBlockCRONSpec cron.Schedule `mapstructure:"worker-async-block-hasher-schedule"`
PushRetryPeriod time.Duration `mapstructure:"worker-pipelines-push-retry-period"`
PullInterval time.Duration `mapstructure:"worker-pipelines-pull-interval"`
SyncPeriod time.Duration `mapstructure:"worker-pipelines-sync-period"`
LogsPageSize uint64 `mapstructure:"worker-pipelines-logs-page-size"`
BucketCleanupRetentionPeriod time.Duration `mapstructure:"worker-bucket-cleanup-retention-period"`
BucketCleanupCRONSpec cron.Schedule `mapstructure:"worker-bucket-cleanup-schedule"`
}
func (WorkerConfiguration) Validate ¶
func (cfg WorkerConfiguration) Validate() error
type WorkerGRPCConfig ¶
type WorkerGRPCConfig struct {
Address string `mapstructure:"worker-grpc-address"`
}
Click to show internal directories.
Click to hide internal directories.