config

package
v0.0.0-...-15bc616 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default = Config{
		WatchDirs: []ConfigDir{
			{
				Dir:        "$HOME/Downloads",
				FileSuffix: ".kubeconfig.txt",
				FileFormat: "cluster-bot-2006-01-02-150405.kubeconfig.txt",
				Lifespan:   150,
			},
		},
		KubeconfigLink: "$HOME/.kcm-active",
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// List of directories to watch for kubeconfig files.
	WatchDirs []ConfigDir
	// The destintion of kubeconfig symlink; your KUBECONFIG env var should be set this to value as well.
	// (Will substitute $HOME to the users home directory)
	KubeconfigLink string
}

func (*Config) Replace

func (c *Config) Replace(o string, s string)

type ConfigDir

type ConfigDir struct {
	// The directory to search in for kubeconfig files. (will substitute $HOME to the users home directory)
	Dir string
	// The full extension (.kubeconfig.txt) of the files you're looking for.
	FileSuffix string
	// A time.Parse version of the filename you're expecting; is used with Lifespan to show whether a kubeconfig is expired or not.
	FileFormat string
	// Number of minutes until this cluster expires (0 is never expire).
	Lifespan uint
}

Jump to

Keyboard shortcuts

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