Documentation
¶
Index ¶
- Constants
- Variables
- func AddChildProc(p *os.Process)
- func AddSecretValue(v string)
- func BlueString(text string) string
- func BodySha(body string) string
- func Clean(props map[string]string, line string) string
- func CleanConnData(data map[string]any, line string) string
- func CleanTableName(tableName string) string
- func CleanWindowsPath(path string) string
- func CloseFileLogging()
- func ConnectionEditorEnabled() bool
- func CyanString(text string) string
- func DarkGrayString(text string) string
- func EnvVarRefName(s string) string
- func ExpandEntry(props map[string]any) map[string]any
- func ExpandEnvVars(text string) string
- func ExpandRef(s string) string
- func GetEnvFilePath(dir string) string
- func GetHomeDirConnsMap() (connsMap map[string]map[string]any, err error)
- func GetTempFolder() string
- func GreenString(text string) string
- func HomeBinDir() string
- func InitLogger()
- func IsEnvVarRef(s string) bool
- func IsInteractiveTerminal() bool
- func IsSecretPath(path []string) bool
- func KillChildProcs()
- func LoadDotEnvSling() map[string]string
- func LoadDotEnvSlingFrom(dir string) map[string]string
- func LoadHomeDir()
- func LogSQL(props map[string]string, query string, args ...any)
- func MagentaString(text string) string
- func MergeDeclaredEnv(declared map[string]any) map[string]any
- func NewExecID() string
- func ParseDotEnv(content string) map[string]string
- func ParseEnvFileConnections(body string) (map[string]map[string]any, error)
- func ParseEnvFileKeys(body string) (connNames, envKeys []string, err error)
- func Print(text string)
- func PrintFatal(E error, args ...interface{})
- func Println(text string)
- func RecentLogs() string
- func RedString(text string) string
- func RemoveAllLocalTempFile(localPath string)
- func RemoveChildProc(p *os.Process)
- func RemoveLocalTempFile(localPath string)
- func RemovedKeys(oldBody, newBody string) ([]string, error)
- func ResolveSecretEnv(ctx context.Context, envMap map[string]any) (map[string]any, error)
- func ScrubLine(line string) string
- func SecretResolver() (*secrets.Resolver, error)
- func SecretResolverFor(providers map[string]map[string]any) (*secrets.Resolver, error)
- func SetLogger()
- func SetTelVal(key string, value any)
- func StartLogCapture()
- func StopLogCapture()
- func UnsetEnvKeys(keys []string)
- func UseDuckDbCompute() bool
- func ValidateEnvKey(key string) error
- func ValidateKey(key string) error
- func Vars() (vars map[string]string)
- func YellowString(text string) string
- type ConnLocation
- type EditOptions
- type EnvFile
- func (ef *EnvFile) CheckFile() error
- func (ef *EnvFile) ConnectionNames() ([]string, error)
- func (ef *EnvFile) DeleteConnectionNode(name string) error
- func (ef *EnvFile) DeleteSecretProviderNode(name string) error
- func (ef *EnvFile) EnvKeys() ([]string, error)
- func (ef *EnvFile) LookupConnection(name string) (ConnLocation, error)
- func (ef *EnvFile) MarshalBody() (string, error)
- func (ef *EnvFile) RawConnections() (map[string]map[string]any, error)
- func (ef *EnvFile) RawEnv() (map[string]any, error)
- func (ef *EnvFile) SetConnectionNode(name string, props map[string]any, envUpdates map[string]any) error
- func (ef *EnvFile) SetEnvNodes(updates map[string]any, allowOverwrite bool) error
- func (ef *EnvFile) SetSecretProviderNode(name string, props, envUpdates map[string]any) error
- func (ef *EnvFile) WriteEnvFile() (err error)
- type EnvFileEditor
- func (e *EnvFileEditor) Bytes() ([]byte, error)
- func (e *EnvFileEditor) Delete(name string) error
- func (e *EnvFileEditor) DeleteProvider(name string) error
- func (e *EnvFileEditor) Get(name string) (props map[string]any, loc ConnLocation, found bool)
- func (e *EnvFileEditor) Names() []string
- func (e *EnvFileEditor) Path() string
- func (e *EnvFileEditor) Rename(oldName, newName string) error
- func (e *EnvFileEditor) Save(expectSha string) error
- func (e *EnvFileEditor) Set(name string, props map[string]any, opts EditOptions) error
- func (e *EnvFileEditor) SetEnv(updates map[string]any, allowOverwrite bool) error
- func (e *EnvFileEditor) SetProvider(name string, props map[string]any) error
- func (e *EnvFileEditor) Sha() string
- type MissingRef
- type WorkbenchConfig
Constants ¶
const ( DdlDefDecLength = 20 DdlMinDecLength = 24 DdlMaxDecScale = 24 DdlMaxDecLength = 38 DdlMinDecScale = 6 )
Variables ¶
var ( Marker = "Sling CLI | https://slingdata.io" HomeDir = os.Getenv("SLING_HOME_DIR") HomeDirEnvFile = "" Env = &EnvFile{} PlausibleURL = "" SentryDsn = "" NoColor = g.In(os.Getenv("SLING_LOGGING"), "NO_COLOR", "JSON") LogSink func(*g.LogLine) TelMap = g.M("begin_time", time.Now().UnixMicro()) TelMux = sync.Mutex{} NoDebugKey = " /* nD */" Executable = "" IsThreadChild = cast.ToBool(os.Getenv("SLING_THREAD_CHILD")) ExecID = g.Getenv("SLING_EXEC_ID", NewExecID()) RunnerID = g.Getenv("SLING_RUNNER_ID", os.Getenv("SLING_AGENT_ID")) IsRunnerMode = RunnerID != "" GetOAuthMap = func() map[string]map[string]any { return map[string]map[string]any{} } ExecFolder = func() string { return filepath.Join(HomeDir, "executions", ExecID) } QueueFolder = func() string { return filepath.Join(ExecFolder(), "queues") } RuntimeFolder = func() string { return filepath.Join(ExecFolder(), "runtime") } RuntimeFilePath = func(name string) string { name = strings.ReplaceAll(name, "\\", "_") name = strings.ReplaceAll(name, "/", "_") name = strings.ReplaceAll(name, ":", "_") os.MkdirAll(RuntimeFolder(), 0755) return filepath.Join(RuntimeFolder(), g.F("%s.json", name)) } ReservedFields = struct { LoadedAt string SyncedAt string SyncedOp string DeletedAt string StreamURL string RowNum string RowID string ExecID string CDCSeq string }{ LoadedAt: "_sling_loaded_at", SyncedAt: "_sling_synced_at", SyncedOp: "_sling_synced_op", DeletedAt: "_sling_deleted_at", StreamURL: "_sling_stream_url", RowNum: "_sling_row_num", RowID: "_sling_row_id", ExecID: "_sling_exec_id", CDCSeq: "_sling_cdc_seq", } )
var ErrStaleEnvFile = errors.New("env.yaml changed since you loaded it; reload and apply again")
ErrStaleEnvFile is returned by EnvFileEditor.Save when the file on disk changed since the editor was loaded (or since the caller last saved). The client reloads and applies its change again.
var SecretKeys = []string{
"access_key_id",
"account_key",
"aws_access_key_id",
"aws_secret_access_key",
"aws_session_token",
"azure_account_key",
"azure_sas_token",
"conn_str",
"gcp_credentials_json",
"gcs_secret_access_key",
"password",
"rest_oauth_client_secret",
"rest_token",
"s3_secret_access_key",
"s3_session_token",
"sas_svc_url",
"sas_token",
"secret_access_key",
"session_token",
"ssh_passphrase",
"ssh_private_key",
"token",
}
SecretKeys is the full set of connection property names whose values are secrets. Clean and parse.Redact redact these. Keep it in sync with `secret: true` in core/dbio/templates/_properties.yaml.
var TemplateKeyOrder func(props map[string]any) []string
TemplateKeyOrder, when set, returns the canonical key order of a new connection entry built from props: `type` first, then the template property order of the entry's type, then the remaining keys. core/dbio registers the order of core/dbio/templates/_properties.yaml; without it new entries get `type` first and the other keys alphabetically.
Functions ¶
func AddChildProc ¶ added in v1.6.4
AddChildProc registers a child process, so KillChildProcs can stop it. Call RemoveChildProc when the process ends.
func AddSecretValue ¶ added in v1.6.5
func AddSecretValue(v string)
AddSecretValue records a resolved secret value for redaction.
func BlueString ¶ added in v1.1.8
func BodySha ¶ added in v1.6.4
BodySha returns the sha256 hex digest of an env file body. Clients send it back on save so a stale buffer cannot overwrite a newer file.
func Clean ¶ added in v1.2.16
Clean removes creds from a log line. CREATE/INSERT/etc. still redact: Redshift COPY/UNLOAD embeds keys in those statements.
func CleanConnData ¶ added in v1.6.0
CleanConnData redacts registry secrets and every nested secrets: value. Nested API keys are secret even when the key name is not in the registry.
func CleanTableName ¶ added in v1.2.22
func CleanWindowsPath ¶ added in v1.2.19
func CloseFileLogging ¶ added in v1.5.7
func CloseFileLogging()
CloseFileLogging closes any open log files.
func ConnectionEditorEnabled ¶ added in v1.6.4
func ConnectionEditorEnabled() bool
ConnectionEditorEnabled reports whether the GUI connection editor is enabled. SLING_DISABLE_CONNECTION_EDITOR=1 turns it off, which also disables the EnvironmentSet removal guard (a client that does not know about allow_removals cannot act on that refusal).
func CyanString ¶ added in v1.1.15
func DarkGrayString ¶ added in v1.1.15
func EnvVarRefName ¶ added in v1.6.0
EnvVarRefName returns VAR from ${VAR}. It returns "" when s is not a ref.
func ExpandEntry ¶ added in v1.6.4
ExpandEntry expands ${VAR} refs in all string values of props, also inside strings and nested lists and maps, with the same rules as loadEnvFile. It returns a deep copy: the input map is not modified.
func ExpandEnvVars ¶ added in v1.5.17
expandEnvVars replaces $KEY or ${KEY} with its environment variable value only if the variable is present in the environment. If not present, $KEY or ${KEY} will remain in the config text.
func ExpandRef ¶ added in v1.6.4
ExpandRef expands a whole-string ${VAR} against the process environment. An unset var keeps the ref as-is.
func GetEnvFilePath ¶ added in v1.2.4
func GetHomeDirConnsMap ¶ added in v1.2.4
func GetTempFolder ¶ added in v1.2.4
func GetTempFolder() string
func GreenString ¶ added in v1.1.8
func HomeBinDir ¶ added in v1.2.4
func HomeBinDir() string
func IsEnvVarRef ¶ added in v1.6.0
IsEnvVarRef is true when s is a whole-string ${VAR} reference.
func IsInteractiveTerminal ¶ added in v1.4.10
func IsInteractiveTerminal() bool
IsInteractiveTerminal checks if the current process is running in an interactive terminal
func IsSecretPath ¶ added in v1.6.5
IsSecretPath tells if a resolved value at a key path is secret. Log output shows the other values. A top-level URL can hold a password, thus it is secret. All values under `secrets:` are secret. Under `inputs:` (API specs), a URL is not secret.
func KillChildProcs ¶ added in v1.6.4
func KillChildProcs()
KillChildProcs kills all registered child processes. Call it before the process exits.
func LoadDotEnvSling ¶ added in v1.5.10
LoadDotEnvSling reads a `.env.sling` file from the current working directory and injects its key=value pairs into os environment variables. Existing env vars are not overwritten.
func LoadDotEnvSlingFrom ¶ added in v1.5.16
LoadDotEnvSlingFrom reads a `.env.sling` file from the specified directory and injects its key=value pairs into os environment variables. Existing env vars are not overwritten.
func LoadHomeDir ¶ added in v1.5.12
func LoadHomeDir()
func MagentaString ¶ added in v1.2.2
func MergeDeclaredEnv ¶ added in v1.6.0
MergeDeclaredEnv starts from the process environment and overlays declared pipeline/replication env keys. Bare {env.X} then renders even when the YAML has no env: block.
func ParseDotEnv ¶ added in v1.5.11
ParseDotEnv parses a .env file content into key-value pairs. It supports single-line and multi-line values enclosed in matching quotes (' or ").
func ParseEnvFileConnections ¶ added in v1.6.4
ParseEnvFileConnections parses an env.yaml body into raw connection prop maps, without ${VAR} interpolation.
func ParseEnvFileKeys ¶ added in v1.6.4
ParseEnvFileKeys parses a raw env.yaml body and returns its connection names and env keys (legacy `variables:` included). No ${VAR} interpolation.
func PrintFatal ¶ added in v1.6.0
func PrintFatal(E error, args ...interface{})
PrintFatal prints the fatal error (same text as g.PrintFatal) and captures it in the run-log buffer via Println, so stderr.log includes it.
func RecentLogs ¶ added in v1.6.0
func RecentLogs() string
RecentLogs returns the buffered tail, oldest first.
func RemoveAllLocalTempFile ¶ added in v1.2.16
func RemoveAllLocalTempFile(localPath string)
RemoveAllLocalTempFile deletes the local folder
func RemoveChildProc ¶ added in v1.6.4
RemoveChildProc unregisters a child process.
func RemoveLocalTempFile ¶ added in v1.2.16
func RemoveLocalTempFile(localPath string)
RemoveLocalTempFile deletes the local file
func RemovedKeys ¶ added in v1.6.4
RemovedKeys lists connections and env vars (prefixed `env.`) present in oldBody but not in newBody. Used to refuse a raw-editor save that would drop credentials the previous body had, unless the client confirms.
func ResolveSecretEnv ¶ added in v1.6.5
ResolveSecretEnv returns envMap with its secret references resolved. It is for the env: block of a replication or pipeline.
func ScrubLine ¶ added in v1.6.0
ScrubLine redacts secrets from every local connection in Env, and every resolved secret value.
func SecretResolver ¶ added in v1.6.5
SecretResolver returns the resolver for the secret_providers of the home env.yaml and ENV_YAML.
func SecretResolverFor ¶ added in v1.6.5
SecretResolverFor is SecretResolver with the providers of another env.yaml (e.g. a platform project) on top.
func StartLogCapture ¶ added in v1.6.0
func StartLogCapture()
StartLogCapture begins buffering log lines for the failure snapshot.
func StopLogCapture ¶ added in v1.6.0
func StopLogCapture()
StopLogCapture stops buffering and drops what was kept.
func UnsetEnvKeys ¶ added in v1.5.10
func UnsetEnvKeys(keys []string)
func UseDuckDbCompute ¶ added in v1.4.24
func UseDuckDbCompute() bool
func ValidateEnvKey ¶ added in v1.6.4
ValidateEnvKey returns an error if key is not a safe environment variable name (^[A-Z_][A-Z0-9_]*$).
func ValidateKey ¶ added in v1.6.4
ValidateKey returns an error if key is not a safe YAML mapping key (^[A-Za-z_][A-Za-z0-9_-]*$, no leading/trailing whitespace).
func YellowString ¶ added in v1.4.21
Types ¶
type ConnLocation ¶ added in v1.6.0
type ConnLocation struct {
Path string `json:"path"`
Line int `json:"line"`
Connection string `json:"connection"`
Missing []MissingRef `json:"missing"`
}
ConnLocation is a deep-link into env.yaml for one connection.
func LookupConnectionBody ¶ added in v1.6.4
func LookupConnectionBody(body, name, path string) (ConnLocation, error)
LookupConnectionBody is LookupConnection against a body string. path is recorded on the result for display only. No ${VAR} interpolation happens.
type EditOptions ¶ added in v1.6.4
type EditOptions struct {
// Replace treats props as the full entry: keys that are not in props are
// removed, together with their comments. Without it the entry is merged,
// and keys that props does not pass are kept.
Replace bool
// AllowOverwrite is false on create: an existing entry is an error.
AllowOverwrite bool
// EnvUpdates, when non-empty, are written under `env:` in the same edit.
EnvUpdates map[string]any
// AllowEnvOverwrite permits replacing existing env: values.
AllowEnvOverwrite bool
}
EditOptions controls EnvFileEditor.Set.
type EnvFile ¶ added in v0.86.56
type EnvFile struct {
Connections map[string]map[string]any `json:"connections,omitempty" yaml:"connections,omitempty"`
Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`
Variables map[string]any `json:"variables,omitempty" yaml:"variables,omitempty"` // legacy
Workbench *WorkbenchConfig `json:"workbench,omitempty" yaml:"workbench,omitempty"`
// SecretProviders holds named secret manager instances (see core/secrets).
// Connection values that are secret references use them.
SecretProviders map[string]map[string]any `json:"secret_providers,omitempty" yaml:"secret_providers,omitempty"`
Path string `json:"-" yaml:"-"`
Repaired bool `json:"-" yaml:"-"` // indentation was repaired on read
TopComment string `json:"-" yaml:"-"`
Body string `json:"-" yaml:"-"`
}
func LoadEnvFile ¶ added in v0.86.56
func LoadSlingEnvFile ¶ added in v0.86.56
func LoadSlingEnvFile() (ef EnvFile)
func LoadSlingEnvFileBody ¶ added in v1.2.15
func (*EnvFile) CheckFile ¶ added in v1.6.4
CheckFile returns an error when the file at ef.Path does not fully parse into EnvFile. A struct write from a partial parse drops the entries that did not parse. A missing or empty file is valid.
func (*EnvFile) ConnectionNames ¶ added in v1.6.4
ConnectionNames returns the connection keys present in the raw file at ef.Path, sorted.
func (*EnvFile) DeleteConnectionNode ¶ added in v1.6.4
DeleteConnectionNode removes one connection entry and its head comment from the file at ef.Path and saves. Comments after the entry stay.
func (*EnvFile) DeleteSecretProviderNode ¶ added in v1.6.5
DeleteSecretProviderNode removes one secret_providers entry of the file at ef.Path and saves.
func (*EnvFile) EnvKeys ¶ added in v1.6.4
EnvKeys returns the keys under `env:` (legacy `variables:` included) in the raw file at ef.Path, sorted. No ${VAR} interpolation.
func (*EnvFile) LookupConnection ¶ added in v1.6.0
func (ef *EnvFile) LookupConnection(name string) (ConnLocation, error)
LookupConnection re-parses ef.Path and returns line numbers for connections.<NAME> and each ${VAR} field under it.
func (*EnvFile) MarshalBody ¶ added in v1.5.14
MarshalBody returns the EnvFile as a formatted YAML string
func (*EnvFile) RawConnections ¶ added in v1.6.4
RawConnections parses the file at ef.Path into connection prop maps, without ${VAR} interpolation. Load/ReadConnections expand refs against the process environment; this does not, so callers that hand values to a UI (or write them back) can never observe a resolved secret.
func (*EnvFile) RawEnv ¶ added in v1.6.4
RawEnv returns the `env:` values (legacy `variables:` included) from the raw file at ef.Path, without ${VAR} interpolation.
func (*EnvFile) SetConnectionNode ¶ added in v1.6.4
func (ef *EnvFile) SetConnectionNode(name string, props map[string]any, envUpdates map[string]any) error
SetConnectionNode merges props into one connection entry of the file at ef.Path and saves, through EnvFileEditor: only the changed lines change. It never reads ef.Connections, so expanded ${VAR} values held in the struct cannot leak to disk.
envUpdates, when non-empty, are written under `env:` in the same save (one atomic write; used for secret promotion). Existing env values are replaced: callers that must protect hand-set values (EnvFileConns.SetValidated) check first.
func (*EnvFile) SetEnvNodes ¶ added in v1.6.4
SetEnvNodes sets keys under the `env:` block (legacy `variables:` when `env:` is absent) of the file at ef.Path and saves. Existing keys are only replaced when allowOverwrite is true or the value is unchanged.
func (*EnvFile) SetSecretProviderNode ¶ added in v1.6.5
SetSecretProviderNode replaces one secret_providers entry of the file at ef.Path, writes envUpdates under `env:` in the same edit, and saves.
func (*EnvFile) WriteEnvFile ¶ added in v1.2.4
type EnvFileEditor ¶ added in v1.6.4
type EnvFileEditor struct {
// contains filtered or unexported fields
}
EnvFileEditor edits one env.yaml as text. The parsed tree only tells where an entry is; an edit then changes the lines of that entry and nothing else. Comments, blank lines, indentation, quotes and key order of all other lines stay byte for byte.
func LoadEnvEditor ¶ added in v1.6.4
func LoadEnvEditor(path string) (*EnvFileEditor, error)
LoadEnvEditor loads the file at path for editing. A missing or empty file yields an empty document, so a Set creates it.
func LoadEnvEditorBytes ¶ added in v1.6.4
func LoadEnvEditorBytes(path string, b []byte) (*EnvFileEditor, error)
LoadEnvEditorBytes loads body as the content of path. The bytes do not need to be on disk yet; Save re-reads the disk file for the sha check.
func (*EnvFileEditor) Bytes ¶ added in v1.6.4
func (e *EnvFileEditor) Bytes() ([]byte, error)
Bytes returns the edited file.
func (*EnvFileEditor) Delete ¶ added in v1.6.4
func (e *EnvFileEditor) Delete(name string) error
Delete removes one connection entry and the comment right above it. Comments that follow the entry stay. Deleting the only entry leaves `connections: {}`.
func (*EnvFileEditor) DeleteProvider ¶ added in v1.6.5
func (e *EnvFileEditor) DeleteProvider(name string) error
DeleteProvider removes one entry of `secret_providers:`.
func (*EnvFileEditor) Get ¶ added in v1.6.4
func (e *EnvFileEditor) Get(name string) (props map[string]any, loc ConnLocation, found bool)
Get returns the raw props of one connection: refs are not expanded, so a secret on disk stays ${VAR}. The location carries the entry line and the ${VAR} fields that reference an env var.
func (*EnvFileEditor) Names ¶ added in v1.6.4
func (e *EnvFileEditor) Names() []string
Names returns the connection names in the file, sorted.
func (*EnvFileEditor) Path ¶ added in v1.6.4
func (e *EnvFileEditor) Path() string
Path is the file the editor writes on Save.
func (*EnvFileEditor) Rename ¶ added in v1.6.4
func (e *EnvFileEditor) Rename(oldName, newName string) error
Rename re-keys one entry. Only the key text changes: the entry keeps its position, its value and its comments. Renaming does not touch the promoted `env:` keys, so the ${VAR} refs of the entry stay valid.
func (*EnvFileEditor) Save ¶ added in v1.6.4
func (e *EnvFileEditor) Save(expectSha string) error
Save replaces the file atomically: the bytes land in a temp file in the same folder, are fsynced, get the mode of the original file, and rename over it. A non-empty expectSha must match the sha256 of the file as it is on disk right now, or the save fails with ErrStaleEnvFile and the file is left untouched.
func (*EnvFileEditor) Set ¶ added in v1.6.4
func (e *EnvFileEditor) Set(name string, props map[string]any, opts EditOptions) error
Set creates or updates one connection entry. A new entry goes after the last entry of `connections:`. An update changes only the lines of the keys whose value changes; with opts.Replace it also removes the keys that props does not pass. opts.EnvUpdates go under `env:` in the same edit, so one Save carries the entry and its promoted secrets together. Nothing is written until Save runs.
func (*EnvFileEditor) SetEnv ¶ added in v1.6.4
func (e *EnvFileEditor) SetEnv(updates map[string]any, allowOverwrite bool) error
SetEnv writes keys under the `env:` block (legacy `variables:` when `env:` is absent). Nothing is written until Save runs.
func (*EnvFileEditor) SetProvider ¶ added in v1.6.5
func (e *EnvFileEditor) SetProvider(name string, props map[string]any) error
SetProvider creates or replaces one entry of `secret_providers:`. The entry holds exactly props after the edit.
func (*EnvFileEditor) Sha ¶ added in v1.6.4
func (e *EnvFileEditor) Sha() string
Sha returns the sha256 of the body the editor loaded.
type MissingRef ¶ added in v1.6.0
MissingRef is one ${VAR} field that still needs a value (or an env var).
type WorkbenchConfig ¶ added in v1.6.4
type WorkbenchConfig struct {
// Host is the listen address. The default is 127.0.0.1.
Host string `json:"host,omitempty" yaml:"host,omitempty"`
// Port is the listen port. The default is 7879; 0 picks a free port.
Port int `json:"port,omitempty" yaml:"port,omitempty"`
// Token is required when Host is not loopback.
Token string `json:"token,omitempty" yaml:"token,omitempty"`
// ProjectsRoot limits the Open-folder dialog to one folder tree.
ProjectsRoot string `json:"projects_root,omitempty" yaml:"projects_root,omitempty"`
// Shell allows interactive shell terminals. The default is true.
Shell *bool `json:"shell,omitempty" yaml:"shell,omitempty"`
// WorkerIdle stops a project worker that has no sessions and no running
// work after this duration, for example "15m". The default is 15m.
WorkerIdle string `json:"worker_idle,omitempty" yaml:"worker_idle,omitempty"`
// PathExtra is prepended to PATH for shells, runs and agent CLIs, so a
// launchd or systemd service finds the tools the user's shell does.
PathExtra string `json:"path_extra,omitempty" yaml:"path_extra,omitempty"`
// Env holds extra environment variables for workers.
Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`
}
WorkbenchConfig is the `workbench:` block of env.yaml: the settings of `sling serve workbench`. A command-line flag wins over the file.