utils

package
v0.0.0-...-38e85af Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelFunc

func CancelFunc() (context.Context, context.CancelFunc)

func CopyFile

func CopyFile(fs afero.Fs, src, dst string) error

func MakeExecutable

func MakeExecutable(fs afero.Fs, file string) error

func Touch

func Touch(fs afero.Fs, dst string) error

Types

type ClusterEnvironment

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

func NewClusterEnvironment

func NewClusterEnvironment(client client.Client) *ClusterEnvironment

func (*ClusterEnvironment) Flavour

func (ce *ClusterEnvironment) Flavour(ctx context.Context) (Flavour, error)

type Flavour

type Flavour string
const (
	OpenShiftFlavour  Flavour = "OpenShift"
	MicroShiftFlavour Flavour = "MicroShift"
	KindFlavour       Flavour = "Kind"
	UnknownFlavour    Flavour = "Unknown"
)

type PathManager

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

func NewPathManager

func NewPathManager(rootDir string) *PathManager

func (*PathManager) CNIServerPath

func (p *PathManager) CNIServerPath() string

func (*PathManager) CniPath

func (p *PathManager) CniPath(flavour Flavour) (string, error)

func (*PathManager) EnsureSocketDirExists

func (p *PathManager) EnsureSocketDirExists(serverSocketPath string) error

EnsureSocketDirExists makes sure that the socket being created is only accessible to root.

func (*PathManager) KubeletEndPoint

func (p *PathManager) KubeletEndPoint() string

func (*PathManager) PluginEndpoint

func (p *PathManager) PluginEndpoint() string

func (*PathManager) PluginEndpointFilename

func (p *PathManager) PluginEndpointFilename() string

func (*PathManager) VendorPluginSocket

func (p *PathManager) VendorPluginSocket() string

Jump to

Keyboard shortcuts

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