config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

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

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"`
	Auth              string           `help:"Authentication token" required:"true" short:"a"`
	Server            string           `help:"Streamdal server URL (gRPC)" default:"localhost:8082"`
	ConnectTimeout    time.Duration    `help:"Initial gRPC connection timeout in seconds" default:"5s"`
	DisableTLS        bool             `help:"Disable TLS" default:"false"`
	EnableFileLogging bool             `help:"Enable file logging" default:"false"`
	LogFile           string           `help:"Log file" default:"./streamdal-cli.log"`
	MaxOutputLines    int              `help:"Maximum number of output lines" default:"5000"`
	TelemetryDisable  bool             `help:"Disable sending usage analytics to Streamdal" default:"false"`
	TelemetryAddress  string           `help:"Address to send telemetry to" default:"telemetry.streamdal.com:8125" hidden:"true"`

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

func New

func New(version string) *Config

func (*Config) GetInstallID added in v0.1.2

func (c *Config) GetInstallID() string

GetInstallID returns the unique node ID for this running instance of streamdal server

func (*Config) GetStatsdTags added in v0.1.2

func (c *Config) GetStatsdTags() []statsd.Tag

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