Documentation ¶
Index ¶
- Constants
- Variables
- func AuthorizerKey() string
- func AuthorizerSvc() string
- func AuthorizerToken() string
- func Container(registry, image, tag string) string
- func ContainerImage() string
- func ContainerName(defaultConfigFile string) string
- func ContainerPlatform() string
- func ContainerRegistry() string
- func ContainerTag() string
- func ContainerVersionTag(version, tag string) string
- func DirectoryKey() string
- func DirectorySvc() string
- func DirectoryToken() string
- func EnsureDirs() error
- func EnsureTopazCertsDir() error
- func EnsureTopazCfgDir() error
- func EnsureTopazDataDir() error
- func EnsureTopazDir() error
- func EnsureTopazTemplateDir() error
- func GetTopazCertsDir() string
- func GetTopazCfgDir() string
- func GetTopazDataDir() string
- func GetTopazDir() string
- func GetTopazTemplateDir() string
- func Insecure() bool
- func NoCheck() bool
- func NoColor() bool
- func Retry(timeout, interval time.Duration, f func() error) (err error)
- func ServiceHealthStatus(ctx context.Context, addr, service string) (bool, error)
- func TenantID() string
- func WaitForPorts(ports []string, expectedStatus PortStatus) error
- type ActiveConfig
- type CLIConfig
- type CommonCtx
- func (c *CommonCtx) CheckRunStatus(containerName string, expectedStatus runStatus) bool
- func (c *CommonCtx) Con() *ConMsg
- func (c *CommonCtx) GetRunningContainers() ([]*types.Container, error)
- func (c *CommonCtx) IsServing(grpcAddress string) bool
- func (c *CommonCtx) Out() *ConMsg
- func (c *CommonCtx) SaveContextConfig(configurationFile string) error
- func (c *CommonCtx) StdErr() io.Writer
- func (c *CommonCtx) StdOut() io.Writer
- type ConMsg
- type DefaultsConfig
- type PortStatus
- type RunningConfig
Constants ¶
const ( StatusNotRunning runStatus = iota StatusRunning )
Variables ¶
Functions ¶
func AuthorizerKey ¶ added in v0.32.2
func AuthorizerKey() string
func AuthorizerSvc ¶ added in v0.32.2
func AuthorizerSvc() string
func AuthorizerToken ¶ added in v0.32.2
func AuthorizerToken() string
func Container ¶ added in v0.31.0
Container returns the fully qualified container name (registry/image:tag).
func ContainerImage ¶ added in v0.31.0
func ContainerImage() string
ContainerImage returns the container image name.
func ContainerName ¶ added in v0.31.0
ContainerName returns the container instance name (docker run --name CONTAINER_NAME).
func ContainerPlatform ¶ added in v0.31.0
func ContainerPlatform() string
ContainerPlatform, returns the container platform for multi-platform capable servers.
func ContainerRegistry ¶ added in v0.31.0
func ContainerRegistry() string
ContainerRegistry returns the container registry (host[:port]/repo).
func ContainerTag ¶ added in v0.31.0
func ContainerTag() string
ContainerTag returns the container tag (label or semantic version).
func ContainerVersionTag ¶ added in v0.31.0
ContainerVersionTag consolidates the old --container-version with the --container-tag value, the command handlers will read the environment variable versions $CONTAINER_VERSION and $CONTAINER_TAG, which is why they are not explicitly handled in this function.
func DirectoryKey ¶ added in v0.32.2
func DirectoryKey() string
func DirectorySvc ¶ added in v0.32.2
func DirectorySvc() string
func DirectoryToken ¶ added in v0.32.2
func DirectoryToken() string
func EnsureDirs ¶ added in v0.32.0
func EnsureDirs() error
func EnsureTopazCertsDir ¶ added in v0.32.0
func EnsureTopazCertsDir() error
func EnsureTopazCfgDir ¶ added in v0.32.0
func EnsureTopazCfgDir() error
func EnsureTopazDataDir ¶ added in v0.32.0
func EnsureTopazDataDir() error
func EnsureTopazDir ¶ added in v0.32.3
func EnsureTopazDir() error
func EnsureTopazTemplateDir ¶ added in v0.32.4
func EnsureTopazTemplateDir() error
func GetTopazCertsDir ¶ added in v0.30.25
func GetTopazCertsDir() string
GetTopazCertsDir returns the topaz certs directory ($XDG_DATA_HOME/topaz/certs).
func GetTopazCfgDir ¶ added in v0.30.25
func GetTopazCfgDir() string
GetTopazCfgDir returns the topaz config directory ($XDG_CONFIG_HOME/topaz/cfg).
func GetTopazDataDir ¶ added in v0.30.29
func GetTopazDataDir() string
GetTopazDataDir returns the topaz db directory ($XDG_DATA_HOME/topaz/db).
func GetTopazDir ¶ added in v0.30.25
func GetTopazDir() string
GetTopazDir returns the topaz root directory ($HOME/.config/topaz).
func GetTopazTemplateDir ¶ added in v0.32.4
func GetTopazTemplateDir() string
GetTopazTemplateDir returns the templates installation directory ($XDG_DATA_HOME/topaz/tmpl).
func ServiceHealthStatus ¶ added in v0.31.5
ServiceHealthStatus adopted from grpc-health-probe cli implementation https://github.com/grpc-ecosystem/grpc-health-probe/blob/master/main.go.
func WaitForPorts ¶ added in v0.31.5
func WaitForPorts(ports []string, expectedStatus PortStatus) error
Types ¶
type ActiveConfig ¶ added in v0.32.0
type CLIConfig ¶ added in v0.32.0
type CLIConfig struct { Version int `json:"version"` Active ActiveConfig `json:"active"` Running RunningConfig `json:"running"` Defaults DefaultsConfig `json:"defaults"` }
type CommonCtx ¶
type CommonCtx struct { Context context.Context Config *CLIConfig // contains filtered or unexported fields }
func NewCommonContext ¶
func (*CommonCtx) CheckRunStatus ¶ added in v0.31.0
func (*CommonCtx) GetRunningContainers ¶ added in v0.32.0
func (*CommonCtx) Out ¶ added in v0.32.17
Out() - console output message send to StdOut, default no-color.
func (*CommonCtx) SaveContextConfig ¶ added in v0.32.0
type ConMsg ¶ added in v0.32.17
type ConMsg struct {
// contains filtered or unexported fields
}
ConMsg - console message, send either StdErr or StdOut.
type DefaultsConfig ¶ added in v0.32.0
type PortStatus ¶ added in v0.31.5
type PortStatus int
const ( PortOpened PortStatus = iota PortClosed )
func (PortStatus) String ¶ added in v0.31.5
func (p PortStatus) String() string
type RunningConfig ¶ added in v0.32.0
type RunningConfig struct { ActiveConfig ContainerName string `json:"container_name"` }