Help us shape the future of Go! Take the 2026 Go Developer Survey

setting

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FallbackLookupSource

func FallbackLookupSource(matchingEnvKey, description string, lookup func(ctx context.Context) (string, error)) setting.FallbackSource

FallbackLookupSource is a LookupSource that ranks below the environment instead of above it.

func LookupSource

func LookupSource(matchingEnvKey, description string, lookup func(ctx context.Context) (string, error)) setting.FrontendSource

LookupSource builds a source for one setting that ranks above the environment. The lookup runs only when the resolution reaches it, so it may prompt or call the backend.

func WorkspacesFromContext

func WorkspacesFromContext(ctx context.Context) (meshstack.Workspaces, error)

WorkspacesFromContext returns the workspaces the credential can see. They are only in the context while Workspace is being resolved, so a lookup for any other setting gets an error.

Types

type FallbackSource

type FallbackSource = setting.FallbackSource

FallbackSource ranks below the environment, as a prompt does.

type FrontendSource

type FrontendSource = setting.FrontendSource

FrontendSource outranks the environment, as a flag or a block attribute does.

type MeshWorkspace

type MeshWorkspace = meshstack.MeshWorkspace

MeshWorkspace is one workspace, and its String is what a person picks from.

type Setting

type Setting interface {
	EnvKey() string
	Help() string
	HelpMarkdown() string
}

Setting is one declared input, identified by its environment variable key.

The settings a front end may supply through a FrontendSource.

type Sources

type Sources = setting.Sources

Sources are the setting sources a front end contributes to every resolution.

func SingleSource

func SingleSource(source setting.Source) Sources

SingleSource wraps one source as the front end's only contribution, ranking it above the environment and the default.

type Workspaces

type Workspaces = meshstack.Workspaces

Workspaces are the workspaces reachable while resolving Workspace, see WorkspacesFromContext.

Jump to

Keyboard shortcuts

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