sync

package
v0.0.0-...-3c98469 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 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 CommandExec

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

func NewCommandExec

func NewCommandExec(cmd []string) *CommandExec

NewCommandExec just creates a CommandExec

func (*CommandExec) GetKubeConfig

func (cmd *CommandExec) GetKubeConfig() (*k8s.KubeConfig, error)

GetKubeConfig executes the command returns a KubeConfig

type Glob

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

func NewGlob

func NewGlob(fileSystem fs.FS, pattern string) *Glob

func (*Glob) GetKubeConfig

func (g *Glob) GetKubeConfig() (*k8s.KubeConfig, error)

type LocalFile

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

LocalFile is the path of a kubeconfig file

func NewLocalFile

func NewLocalFile(reader io.Reader) *LocalFile

NewLocalFile creates a LocalFile

func (*LocalFile) GetKubeConfig

func (local *LocalFile) GetKubeConfig() (*k8s.KubeConfig, error)

GetKubeConfig just returns a KubeConfig

type Service

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

Service represents the required information to pick a kubeconfig according to the config

func NewService

func NewService(opts *SyncOptions) *Service

NewService creates a SyncService according to the sync type

func (*Service) RetrieveKubeConfig

func (s *Service) RetrieveKubeConfig() (*k8s.KubeConfig, error)

GetKubeConfig retrieve a kubeconfig using a sync mode

type Sync

type Sync interface {
	GetKubeConfig() (*k8s.KubeConfig, error)
}

Sync implements a way to pick up a kubeconfig

type SyncOptions

type SyncOptions struct {
	AppendTo bool
	Mode     string
	Path     string
	Command  string
	Glob     string
}

Jump to

Keyboard shortcuts

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