env

package
Version: v0.0.0-...-8d3ffd9 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Process

func Process() error

Process the environment variables set for caesium.

Types

type Environment

type Environment struct {
	LogLevel               string        `default:"info"`
	Port                   int           `default:"8080"`
	KubernetesConfig       string        `default:""`
	KubernetesNamespace    string        `default:"default"`
	NodeID                 string        `default:""` // hostname
	DBPath                 string        `default:""`
	HttpAddr               string        `default:"localhost:4001"`
	HttpAdvAddr            string        `default:""`
	JoinSrcIP              string        `default:""`
	RaftAddr               string        `default:"localhost:4002"`
	RaftAdvAddr            string        `default:""`
	JoinAddr               string        `default:""`
	JoinAttempts           int           `default:"5"`
	JoinInterval           time.Duration `default:"5s"`
	DSN                    string        `default:""`
	OnDisk                 bool          `default:"true"`
	RaftNonVoter           bool          `default:"false"`
	RaftHeartbeatTimeout   time.Duration `default:"1s"`
	RaftElectionTimeout    time.Duration `default:"1s"`
	RaftApplyTimeout       time.Duration `default:"10s"`
	RaftOpenTimeout        time.Duration `default:"120s"`
	RaftLeaderWait         bool          `default:"true"`
	RaftSnapThreshold      uint64        `default:"8192"`
	RaftSnapInterval       time.Duration `default:"30s"`
	RaftLeaderLeaseTimeout time.Duration `default:"0s"`
	RaftShutdownOrRemove   bool          `default:"false"`
	RaftLogLevel           string        `default:"INFO"`
	CompressionSize        int           `default:"150"`
	CompressionBatch       int           `default:"5"`
}

Environment defines the environment variables used by caesium.

func Variables

func Variables() Environment

Variables returns the processed environment variables.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL