config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MPL-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CtxKeyVersion ctxKey = "v"
	CtxKeyService ctxKey = "service"
	CtxKeyTeam    ctxKey = "team"
	CtxKeyRepo    ctxKey = "repo"
	CtxKeyProject ctxKey = "project"
	CtxKeySubsys  ctxKey = "subsys"
	CtxKeyIsPull  ctxKey = "isPull"
	CtxKeyRef     ctxKey = "ref"
	CtxKeyRid     ctxKey = "rid"
)

Variables

This section is empty.

Functions

func RedactDSN

func RedactDSN(dsn string) string

RedactDSN masks the password in a URL-shaped DSN so it can be logged. A shared-Postgres auth DSN (postgres://user:secret@host/db) carries a credential; file: SQLite DSNs have none and pass through unchanged. On any parse failure it returns a safe constant rather than risk leaking the raw string.

Types

type Config

type Config struct {
	AdminAddr                    string   `id:"admin-addr" default:":8081" desc:"The port to listen on for the admin web server (:8081)"`
	AdminPass                    string   `id:"admin-pass" default:"" desc:"Basic Auth password ()"`
	AdminUser                    string   `id:"admin-user" default:"" desc:"User for basic auth ()"`
	AdminIdleTimeout             int      `id:"admin-idle-timeout" default:"60" desc:"Idle timeout, seconds (60)"`
	AdminReadTimeout             int      `id:"admin-read-timeout" default:"15" desc:"Read timeout, seconds (15)"`
	AdminStaticRoot              string   `` /* 147-byte string literal not displayed */
	AdminWriteTimeout            int      `id:"admin-write-timeout" default:"15" desc:"Write timeout, seconds (15)"`
	AdminCorsOrigins             []string `` /* 325-byte string literal not displayed */
	AuthMode                     string   `id:"auth-mode" default:"both" desc:"Admin API authentication mode: {basic, signed, both} (both)"`
	AuthDevEnrollSecret          string   `` /* 138-byte string literal not displayed */
	SecretMasterKeyPath          string   `` /* 332-byte string literal not displayed */
	DebugBreakpoints             bool     `` /* 211-byte string literal not displayed */
	DebugPrivate                 bool     `` /* 266-byte string literal not displayed */
	TraceMode                    string   `` /* 129-byte string literal not displayed */
	TraceStore                   string   `` /* 252-byte string literal not displayed */
	TraceDir                     string   `` /* 136-byte string literal not displayed */
	TraceAsync                   bool     `` /* 175-byte string literal not displayed */
	TraceBufferSize              int      `` /* 195-byte string literal not displayed */
	TraceBodyCapBytes            int      `` /* 230-byte string literal not displayed */
	TraceStreamLongPollMS        int      `` /* 344-byte string literal not displayed */
	TraceStreamRingSize          int      `` /* 220-byte string literal not displayed */
	CronPeriod                   int      `id:"cron-period" default:"60" desc:"Seconds between cron ticks, seconds (60)"`
	DbRuntimeDsn                 string   `` /* 178-byte string literal not displayed */
	DbAuthDsn                    string   `` /* 418-byte string literal not displayed */
	DbRoot                       string   `id:"db-root-dir" default:"./chassis/data/db" desc:"What is the root directory for any local databases? (./chassis/data/db)"`
	DbSchemaDir                  string   `id:"db-schema-dir" default:"./db/schema/sqlite" desc:"What directory contains the db schema? (./db/schema/sqlite)"`
	DialTimeout                  string   `id:"dial-timeout" default:"100ms" desc:"Default rpc dial timeout (100ms)"`
	DockerBuild                  bool     `id:"docker-build" default:"true" desc:"Attempt to build Dockerfile on push? (true)"`
	DockerRemote                 string   `id:"docker-remote" default:"localhost:5001" desc:"Remote docker host (localhost.5001)"`
	DockerRemoteUser             string   `id:"docker-remote-user" default:"admin" desc:"Remote docker user (admin)"`
	DockerRemotePass             string   `id:"docker-remote-pass" default:"" desc:"Remote docker user ()"`
	DockerTmp                    string   `id:"docker-tmp" default:"./chassis/data/tmp/docker" desc:"Temporary space for building docker (./chassis/data/tmp/docker)"`
	DockerTmpClean               bool     `id:"docker-tmp-clean" default:"true" desc:"Cleanup temporary tar after build? (true)"`
	DockerApiVersion             string   `id:"docker-api-version" default:"1.39" desc:"Default Docker API version (1.39)"`
	Environment                  string   `id:"env" default:"dev" desc:"Runtime Environment: {dev, stage, prod, myenv} (dev)"` //  export TXCOMP_ENV=dev-mm
	EtcdEndpointAddrs            []string `id:"etcd-endpoint-addrs" default:"localhost:2379" desc:"Etcd endpoint addresses Ex: :2379 (:2379)"`
	Fqdn                         string   `id:"fqdn" default:"" desc:"Set our fully qualified domain name"`
	IngressConfigPath            string   `` /* 176-byte string literal not displayed */
	RequireHostnameVerification  bool     `` /* 313-byte string literal not displayed */
	StructuredHostSuffix         string   `` /* 367-byte string literal not displayed */
	VerifyAllowPrivateAddresses  bool     `` /* 275-byte string literal not displayed */
	IngressMissAction            string   `` /* 368-byte string literal not displayed */
	K8sNamespace                 string   `id:"k8s-namespace" default:"default" desc:"Kubernetes Namespace (default)"`
	KubeConfig                   string   `id:"kube-config" default:"$USER/.kube/config" desc:"What path to use for Kubernetes Config? ($USER/.kube/config)"`
	KubeCheckInCluster           bool     `` /* 154-byte string literal not displayed */
	KVStore                      string   `id:"kvstore" default:"boltdb" desc:"Which Key/Value Store to use? {boltdb, etcd} (boltdb)"`
	KVStoreAddrs                 []string `id:"kvstore-addrs" default:"./chassis/data/kv" desc:"List of KVStore addresses, if appropriate. (./chassis/data/kv)"`
	KVStoreBucket                string   `id:"kvstore-bucket" default:"txco" desc:"KVStore bucket (txco)"`
	Logger                       string   `id:"logger" default:"env" desc:"Set Log display type: {env, production, dev, dev-plain} (env)"`
	LogLevel                     string   `id:"log-level" default:"" desc:"Set Logging Level: {debug, info, warn, error, dpanic, panic, and fatal} (info)"`
	LogOps                       string   `id:"log-ops" default:"disabled" desc:"Log operations to {logger,disabled,dir} (disabled)"`
	LogOpsDir                    string   `id:"log-ops-dir" default:"./chassis/data/logs" desc:"Directory to log operations to (./chassis/data/logs)"`
	OpPayloadMax                 int      `id:"op-payload-max" default:"4194304" desc:"maximum message that operations can send/receive in bytes (4194304)"`
	OpMetricsRegex               string   `` /* 149-byte string literal not displayed */
	OpTimeout                    string   `id:"op-timeout" default:"5s" desc:"Default operation timeout (5s)"`
	OpTimeoutMax                 string   `` /* 172-byte string literal not displayed */
	AsyncRuntimeDefault          string   `` /* 203-byte string literal not displayed */
	AsyncAckTimeout              string   `` /* 130-byte string literal not displayed */
	ContinueAfterDefault         string   `` /* 229-byte string literal not displayed */
	ContinuableTimeoutDefault    string   `` /* 228-byte string literal not displayed */
	DeferredJoinSlack            string   `` /* 185-byte string literal not displayed */
	ComputeMaxMemoryMB           int      `id:"compute-max-memory-mb" default:"32" desc:"Per-invocation memory cap for a sandboxed compute (op://) in MB. (32)"`
	ComputeMaxWall               string   `` /* 155-byte string literal not displayed */
	Personalities                string   `` /* 173-byte string literal not displayed */
	Repl                         bool     `id:"repl" default:"false" desc:"Run REPL mode"`
	PromNamespace                string   `id:"prom-namespace" default:"txco" desc:"Set the Prometheus namespace (txco)"`
	PromPeriod                   int      `id:"prom-period" default:"5" desc:"Set the Prometheus reporting period (5)"`
	PushActionTimeout            int      `id:"push-action-timeout" default:"300" desc:"Timeout for push actions, in seconds (300)"`
	RegistryFixed                []string `id:"registry-fixed" default:"" desc:"Set to use a fixed operation name registry. Prefix:Address:Port ex: *:localhost:5858 ()"`
	RepoCloneSource              string   `` /* 143-byte string literal not displayed */
	RepoStore                    string   `id:"repostore" default:"file" desc:"Which Repo Store to use? {memory, file} (file)"`
	RepoStoreFileDir             string   `` /* 134-byte string literal not displayed */
	ContinuationStore            string   `` /* 126-byte string literal not displayed */
	ContinuationStoreFileDir     string   `` /* 156-byte string literal not displayed */
	ContinuationStoreS3Bucket    string   `` /* 140-byte string literal not displayed */
	ContinuationStoreS3Prefix    string   `` /* 144-byte string literal not displayed */
	ContinuationCallbackBaseURL  string   `` /* 143-byte string literal not displayed */
	ContinuationSweepPeriod      int      `id:"continuation-sweep-period" default:"900" desc:"Seconds between continuation store sweeps; 0 disables the sweeper (900)"`
	ContinuationRetention        int      `id:"continuation-retention" default:"604800" desc:"Seconds after a run's expiry before its docs are purged (604800 = 7d)"`
	ContinuationStaleResumeAfter int      `` /* 136-byte string literal not displayed */
	ArtifactStore                string   `id:"artifact-store" default:"file" desc:"Snapshot/event artifact store backend: {file} (file)"`
	ArtifactStoreFileDir         string   `` /* 140-byte string literal not displayed */
	SnapshotBootstrapRef         string   `` /* 178-byte string literal not displayed */
	FeedSource                   string   `` /* 136-byte string literal not displayed */
	FeedSourceFileDir            string   `id:"feed-source-file-dir" default:"./chassis/data/feed" desc:"Root directory for the file feed source (./chassis/data/feed)"`
	FeedPollPeriod               int      `id:"feed-poll-period" default:"15" desc:"Seconds between control-event feed polls; applies when feed-source != nop (15)"`
	FeedSink                     string   `` /* 151-byte string literal not displayed */
	FeedSinkBatchSize            int      `id:"feed-sink-batch-size" default:"64" desc:"Max outbox rows drained per pump tick when feed-sink != nop (64)"`
	EgressPolicy                 string   `` /* 208-byte string literal not displayed */
	EgressDenyCIDRs              []string `` /* 155-byte string literal not displayed */
	EgressAllowCIDRs             []string `` /* 188-byte string literal not displayed */
	SystemOpstacksDir            string   `` /* 255-byte string literal not displayed */
	SystemOpstacksWatch          bool     `` /* 176-byte string literal not displayed */
	ServerId                     string   `id:"sid" default:"" desc:"Set the Server Id ()"`
	LMTPListenAddrs              []string `` /* 321-byte string literal not displayed */
	LMTPMaxMsgBytes              int      `` /* 149-byte string literal not displayed */
	LMTPMaxRecipients            int      `id:"lmtp-max-recipients" default:"50" desc:"Max RCPT TO addresses per LMTP transaction. (50)"`
	LMTPReadTimeout              string   `id:"lmtp-read-timeout" default:"30s" desc:"Per-command read timeout for the LMTP listener. (30s)"`
	LMTPDataTimeout              string   `id:"lmtp-data-timeout" default:"60s" desc:"DATA phase read timeout for the LMTP listener. (60s)"`
	LMTPRespTimeout              string   `` /* 134-byte string literal not displayed */
	LMTPHostname                 string   `id:"lmtp-hostname" default:"" desc:"Greeting hostname for the LMTP server. Empty (default) uses os.Hostname(). ()"`
	LMTPDefaultHosts             []string `` /* 264-byte string literal not displayed */
	TCPListenAddrs               []string `id:"tcp-listen-addrs" default:":5050" desc:"Listen addresses for TCP server Ex: :5050 (:5050)"`
	TCPConnectRespTimeout        string   `id:"tcp-connect-resp-timeout" default:"3s" desc:"Time that backends must accept a new connection before dropping it. (3s)"`
	TCPMaxIdleTimeout            string   `id:"tcp-max-idle-timeout" default:"5s" desc:"Max idle time between commands. May be set lower at runtime. (5s)"`
	TCPRespTimeout               string   `id:"tcp-resp-timeout" default:"10s" desc:"Max time for us to respond to command. (10s)"`
	WebAddr                      string   `id:"web-addr" default:":8080" desc:"The port to listen on for the web server (:8080)"`
	WebPass                      string   `id:"web-pass" default:"" desc:"Basic Auth password ()"`
	WebUser                      string   `id:"web-user" default:"" desc:"User for basic auth ()"`
	WebIdleTimeout               int      `id:"web-idle-timeout" default:"60" desc:"Idle timeout, seconds (60)"`
	WebReadTimeout               int      `id:"web-read-timeout" default:"15" desc:"Read timeout, seconds (15)"`
	WebWriteTimeout              int      `id:"web-write-timeout" default:"15" desc:"Write timeout, seconds (15)"`
	ContinuationLongPollMS       int      `` /* 229-byte string literal not displayed */
	WebDebug                     string   `id:"web-debug" default:"" desc:"Debug flags: SHOW_PRIVATE_VARS, HIDE_PRIVATE_VARS"`
	WebMockHeader                bool     `` /* 185-byte string literal not displayed */
	UsageEnabled                 bool     `` /* 216-byte string literal not displayed */
}

Command Line Flags / Environment variables to configure runtime environment

func Load

func Load() (Config, error)

Jump to

Keyboard shortcuts

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