config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvFile         = ".env"
	EnvConfigPrefix = "STREAMDAL_SERVER"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Version              kong.VersionFlag `help:"Show version and exit" short:"v" env:"-"`
	Debug                bool             `help:"Enable debug logging" short:"d" default:"false"`
	NodeName             string           `help:"Name for this node" required:"true" help:"Node name (must be unique in cluster)" short:"n"`
	AuthToken            string           `help:"Authentication token" required:"true" short:"t"`
	HTTPAPIListenAddress string           `help:"HTTP API listen address" default:":8081"`
	GRPCAPIListenAddress string           `help:"gRPC API listen address" default:":8082"`
	RedisURL             string           `help:"Address for Redis cluster used by Streamdal server" default:"localhost:6379"`
	RedisDatabase        int              `help:"Redis database number to use" default:"0"`
	RedisPassword        string           `help:"Redis password" default:""`
	HealthFreqSec        int              `help:"How often to perform health checks on dependencies" default:"60"`
	SessionTTL           time.Duration    `help:"TTL for session keys in RedisBackend live K/V bucket" default:"5s"`
	WASMDir              string           `help:"Directory where WASM files are stored" default:"./assets/wasm"`
	SeedDummyData        bool             `help:"Seed RedisBackend with dummy data for testing" default:"false"`
	NumTailWorkers       int              `help:"Number of tail workers to run" default:"4"`
	NumBroadcastWorkers  int              `help:"Number of broadcast workers to run" default:"4"`
	DemoMode             bool             `help:"Run server in demo mode. This disables modifications" default:"false"`
	TelemetryDisabled    bool             `help:"Disable sending usage telemetry to Streamdal" default:"false"`

	AesKey string `help:"AES256 encryption key to encrypt notification configs at rest"`

	KongContext *kong.Context `kong:"-"`
}

func New

func New(version string) *Config

func (*Config) GetVersion

func (c *Config) GetVersion() string

Jump to

Keyboard shortcuts

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