standalone

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

README

Standalone version

Packs proxy, worker, embedded redis, and fake S3 endpoints into single binary. Standalone version does not have persistence, so it cannot be used for production, but it allows to run chorus locally without dependencies.

Usage

For installation options see main README.

Install standalone binary or run from source with go run:

% go run ./cmd/chorus
_________ .__
\_   ___ \|  |__   ___________ __ __  ______
/    \  \/|  |  \ /  _ \_  __ \  |  \/  ___/
\     \___|   Y  (  <_> )  | \/  |  /\___ \
 \______  /___|  /\____/|__|  |____//____  >
        \/     \/                        \/


S3 Proxy URL:   http://127.0.0.1:9669
S3 Proxy Credentials (AccessKey|SecretKey):
 - user1: [testKey1|testSecretKey1]
 - user2: [testKey2|testSecretKey2]

GRPC mgmt API:  127.0.0.1:9670
HTTP mgmt API:  http://127.0.0.1:9671
Redis URL:      127.0.0.1:33019

Storage list:
 - [FAKE] one: http://127.0.0.1:9680 < MAIN
 - [FAKE] two: http://127.0.0.1:9681

Output contains URLs and credentials for chorus services and fake S3 endpoints. With given credentials Chorus S3 Proxy or fake storages can be accessed with any S3 client. Example configuration for s3cmd:

cat << EOF > proxy.s3cmd
use_https = false
host_base = 127.0.0.1:9669
host_bucket = 127.0.0.1:9669
access_key = testKey1
secret_key = testSecretKey1
EOF

Create bucket with name test in Chorus S3 Proxy:

s3cmd mb s3://test -c proxy.s3cmd

To get full yaml config used by standalone binary run:

go run ./cmd/chorus print-config > chorus.yaml

Open chorus.yaml and check the configuration. Edit config to use your own S3 endpoints instead of fake ones or change other settings. Then run standalone binary with edited custom config:

go run ./cmd/chorus -config chorus.yaml

Install and run chorctl CLI to manage chorus services.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHTTPFS

func BuildHTTPFS() http.FileSystem

func PrintConfig

func PrintConfig(src ...config.Opt) error

func Start

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

Types

type Config

type Config struct {
	worker.Config `yaml:",inline,omitempty" mapstructure:",squash"`

	UIPort int `yaml:"uiPort"`

	Proxy struct {
		Storage proxy.Storages `yaml:"storage,omitempty"`
		Enabled bool           `yaml:"enabled"`
		Auth    *auth.Config   `yaml:"auth,omitempty"`
		Port    int            `yaml:"port"`
		Address string         `yaml:"address"`
		Cors    *cors.Config   `yaml:"cors"`
	} `yaml:"proxy"`
}

func GetConfig

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

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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