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

config

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeServerSideConfigLoader

type KubeServerSideConfigLoader struct {
	// contains filtered or unexported fields
}

KubeServerSideConfigLoader loads ServerSideConfig from a Config Map in a K8S Cluster

func NewKubeSSCfgLoader

func NewKubeSSCfgLoader(kc *kubernetes.Clientset, ns string, cmName string) (KubeServerSideConfigLoader, error)

NewKubeSSCfgLoader returns a KubeServerSideConfigLoader.

If kc argument is nil, a new kubernetes.Clientset will be generated.

If any of ns and cmName are empty (""), defaults are used for them.

func (KubeServerSideConfigLoader) Load

Load loads server side configuration from a Kubernetes ConfigMap

type ServerSideConfig

type ServerSideConfig struct {
	RepoOwner              string
	RepoName               string
	MinimalRequiredVersion string
}

ServerSideConfig represents configuration we store on the server side of our CLI application

These are things that do not make sense to store in a local config, like the minimal required version this app needs to be in, to be able to talk to our current API servers.

type ServerSideConfigLoader

type ServerSideConfigLoader interface {
	Load() (ServerSideConfig, error)
}

ServerSideConfigLoader knows how to reach, read and parse our server side config.

Jump to

Keyboard shortcuts

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