config

package
v0.0.0-...-f843765 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigNotFound = errors.New("can't find kubeconfig")
	ErrConfigBuild    = errors.New("could not build kubeconfig from flags")
)

Functions

func New

func New(p Provider) (*rest.Config, error)

Types

type DefaultProvider

type DefaultProvider struct{}

func (*DefaultProvider) BuildConfigFromFlags

func (dp *DefaultProvider) BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error)

func (*DefaultProvider) GetEnv

func (dp *DefaultProvider) GetEnv(key string) string

func (*DefaultProvider) InClusterConfig

func (dp *DefaultProvider) InClusterConfig() (*rest.Config, error)

func (*DefaultProvider) Stat

func (dp *DefaultProvider) Stat(name string) (os.FileInfo, error)

type Provider

type Provider interface {
	GetEnv(key string) string
	Stat(name string) (os.FileInfo, error)
	BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error)
	InClusterConfig() (*rest.Config, error)
}

Jump to

Keyboard shortcuts

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