pkg

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pkg defines the interface for a cluster scope.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterScoper

type ClusterScoper interface {
	Logger
	ScopeUsage

	// Name returns the CAPI cluster name.
	Name() string
	// Namespace returns the cluster namespace.
	Namespace() string
	// InfraClusterName returns the KKK cluster name.
	InfraClusterName() string
	// KubernetesClusterName is the name of the Kubernetes cluster.
	KubernetesClusterName() string
	// GetKKMachines returns the list of KKMachines for a KKCluster.
	GetKKMachines(ctx context.Context) (*infrav1.KKMachineList, error)
	// GetMachines returns the collections of machines for a KKCluster.
	GetMachines(ctx context.Context, filters ...capicollections.Func) (capicollections.Machines, error)
	// Distribution returns Kubernetes distribution of the cluster.
	Distribution() string
	// RootFs is the cluster scope rootfs
	RootFs() rootfs.Interface
	// PatchObject persists the cluster configuration and status.
	PatchObject() error
	// Close closes the current scope persisting the cluster configuration and status.
	Close() error
}

ClusterScoper is the interface for a cluster scope.

type Logger

type Logger interface {
	// Enabled tests whether this Logger is enabled.  For example, commandline
	// flags might be used to set the logging verbosity and disable some info
	// logs.
	Enabled() bool

	// Info logs a non-error message with the given key/value pairs as context.
	//
	// The msg argument should be used to add some constant description to
	// the log line.  The key/value pairs can then be used to add additional
	// variable information.  The key/value pairs should alternate string
	// keys and arbitrary values.
	Info(msg string, keysAndValues ...interface{})

	// Error logs an error, with the given message and key/value pairs as context.
	// It functions similarly to calling Info with the "error" named value, but may
	// have unique behavior, and should be preferred for logging errors (see the
	// package documentations for more information).
	//
	// The msg field should be used to add context to any underlying error,
	// while the err field should be used to attach the actual error that
	// triggered this log line, if present.
	Error(err error, msg string, keysAndValues ...interface{})

	// V returns a Logger value for a specific verbosity level, relative to
	// this Logger.  In other words, V values are additive.  V higher verbosity
	// level means a log message is less important.  It's illegal to pass a log
	// level less than zero.
	V(level int) logr.Logger

	// WithValues adds some key-value pairs of context to a logger.
	// See Info for documentation on how key/value pairs work.
	WithValues(keysAndValues ...interface{}) logr.Logger

	// WithName adds a new element to the logger's name.
	// Successive calls with WithName continue to append
	// suffixes to the logger's name.  It's strongly recommended
	// that name segments contain only letters, digits, and hyphens
	// (see the package documentation for more information).
	WithName(name string) logr.Logger
}

Logger represents the ability to log messages, both errors and not.

type ScopeUsage

type ScopeUsage interface {
	// ControllerName returns the name of the controller that created the scope
	ControllerName() string
}

ScopeUsage is used to indicate which controller is using a scope.

Directories

Path Synopsis
clients
ssh
Package ssh implements the ssh client.
Package ssh implements the ssh client.
Package rootfs defines the CAPKK rootfs.
Package rootfs defines the CAPKK rootfs.
Package scope defines the basic context for an actuator to operate upon.
Package scope defines the basic context for an actuator to operate upon.
Package service implements various services.
Package service implements various services.
binary
Package binary define the binaries operations on the remote instance.
Package binary define the binaries operations on the remote instance.
binary/k3s
Package k3s define the binaries operations on the remote instance.
Package k3s define the binaries operations on the remote instance.
binary/kubernetes
Package kubernetes define the binaries operations on the remote instance.
Package kubernetes define the binaries operations on the remote instance.
bootstrap
Package bootstrap defines the CAPKK bootstrap operations on the remote instance.
Package bootstrap defines the CAPKK bootstrap operations on the remote instance.
containermanager
Package containermanager defines the operations on the remote instance's CRI.
Package containermanager defines the operations on the remote instance's CRI.
operation
Package operation define the remote instance operations interface.
Package operation define the remote instance operations interface.
operation/directory
Package directory defines the operations on remote instance directory.
Package directory defines the operations on remote instance directory.
operation/file
Package file defines the operations on the binaries.
Package file defines the operations on the binaries.
operation/file/checksum
Package checksum implements methods for obtaining and verifying the checksum of binary files.
Package checksum implements methods for obtaining and verifying the checksum of binary files.
operation/repository
Package repository defines the operations on the remote instance linux software packages repository.
Package repository defines the operations on the remote instance linux software packages repository.
operation/user
Package user defines the user operations on the remote instance.
Package user defines the user operations on the remote instance.
provisioning
Package provisioning defines the provisioning operations on the remote instance generated by cloudinit or ignition.
Package provisioning defines the provisioning operations on the remote instance generated by cloudinit or ignition.
provisioning/cloudinit
Package cloudinit defines cloud init adapter for existing nodes.
Package cloudinit defines cloud init adapter for existing nodes.
provisioning/commands
Package commands deals with various machine initialization methods viz.
Package commands deals with various machine initialization methods viz.
repository
Package repository contains the repository service.
Package repository contains the repository service.
util
Package util contains utility functions for the service.
Package util contains utility functions for the service.
Package util implements utilities.
Package util implements utilities.
filesystem
Package filesystem implements the operation of the local file system.
Package filesystem implements the operation of the local file system.
hash
Package hash implements hash utilities
Package hash implements hash utilities

Jump to

Keyboard shortcuts

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