worker

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

README

Chorus Worker

Processes replication tasks from Asynq work queue. Hosts management gRPC API on port :9670 and REST API on port :9671.

Usage

Set storage and Redis credentials in config.yaml and run.

The config file contains commented examples for:

  • S3 storage configuration
  • Swift storage configuration (requires authURL and Keystone credentials)
  • Dynamic credentials (manage credentials via API instead of config)

Configuration

See config.yaml for all options with examples.

Key settings:

  • storage.storages - S3 and Swift storage definitions with credentials
  • storage.dynamicCredentials - enable API-based credential management
  • api.enabled - enable management API (required for chorctl)
  • concurrency - max parallel replication tasks

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRetryDelayFunc = asynq.DefaultRetryDelayFunc

override in e2e test for short retry

Functions

func Start

func Start(ctx context.Context, app dom.AppInfo, conf *Config) error

Types

type Config

type Config struct {
	config.Common `yaml:",inline,omitempty" mapstructure:",squash"`
	Storage       objstore.Config `yaml:"storage,omitempty"`

	Concurrency     int           `yaml:"concurrency"`
	ShutdownTimeout time.Duration `yaml:"shutdownTimeout"`

	Api    *api.Config     `yaml:"api,omitempty"`
	Lock   *Lock           `yaml:"lock,omitempty"`
	Worker *handler.Config `yaml:"worker,omitempty"`
}

func GetConfig

func GetConfig(src ...config.Opt) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Lock

type Lock struct {
	Overlap time.Duration `yaml:"overlap"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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