context

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMachineContext

type BaseMachineContext struct {
	*ControllerContext
	Logger      logr.Logger
	Cluster     *clusterv1.Cluster
	Machine     *clusterv1.Machine
	PatchHelper *patch.Helper
}

func (*BaseMachineContext) GetCluster

func (c *BaseMachineContext) GetCluster() *clusterv1.Cluster

func (*BaseMachineContext) GetLogger

func (c *BaseMachineContext) GetLogger() logr.Logger

GetLogger returns this context's logger.

func (*BaseMachineContext) GetMachine

func (c *BaseMachineContext) GetMachine() *clusterv1.Machine

type ClusterContext

type ClusterContext struct {
	*ControllerContext
	Cluster     *clusterv1.Cluster
	ICSCluster  *v1beta1.ICSCluster
	PatchHelper *patch.Helper
	Logger      logr.Logger
}

ClusterContext is a Go context used with a ICSCluster.

func (*ClusterContext) Patch

func (c *ClusterContext) Patch() error

Patch updates the object and its status on the API server.

func (*ClusterContext) String

func (c *ClusterContext) String() string

String returns ICSClusterGroupVersionKind ICSClusterNamespace/ICSClusterName.

type ControllerContext

type ControllerContext struct {
	*ControllerManagerContext

	// Name is the name of the controller.
	Name string

	// Logger is the controller's logger.
	Logger logr.Logger

	// Recorder is used to record events.
	Recorder record.Recorder
}

ControllerContext is the context of a controller.

func (*ControllerContext) String

func (c *ControllerContext) String() string

String returns ControllerManagerName/ControllerName.

type ControllerManagerContext

type ControllerManagerContext struct {
	context.Context

	// Namespace is the namespace in which the resource is located responsible
	// for running the controller manager.
	Namespace string

	// Name is the name of the controller manager.
	Name string

	// LeaderElectionID is the information used to identify the object
	// responsible for synchronizing leader election.
	LeaderElectionID string

	// LeaderElectionNamespace is the namespace in which the LeaderElection
	// object is located.
	LeaderElectionNamespace string

	// WatchNamespace is the namespace the controllers watch for changes. If
	// no value is specified then all namespaces are watched.
	WatchNamespace string

	// Client is the controller manager's client.
	Client client.Client

	// Logger is the controller manager's logger.
	Logger logr.Logger

	// Recorder is used to record events.
	Recorder record.Recorder

	// Scheme is the controller manager's API scheme.
	Scheme *runtime.Scheme

	// MaxConcurrentReconciles is the maximum number of recocnile requests this
	// controller will receive concurrently.
	MaxConcurrentReconciles int

	// EnableKeepAlive is a session feature to enable keep alive handler
	// for better load management on ICS api server
	EnableKeepAlive bool

	// KeepAliveDuration is the idle time interval in between send() requests
	// in keepalive handler
	KeepAliveDuration time.Duration
	// contains filtered or unexported fields
}

ControllerManagerContext is the context of the controller that owns the controllers.

func (*ControllerManagerContext) GetGenericEventChannelFor

func (c *ControllerManagerContext) GetGenericEventChannelFor(gvk schema.GroupVersionKind) chan event.GenericEvent

GetGenericEventChannelFor returns a generic event channel for a resource specified by the provided GroupVersionKind.

func (*ControllerManagerContext) String

func (c *ControllerManagerContext) String() string

String returns ControllerManagerName.

type ICSMachine

type ICSMachine interface {
	client.Object
	conditions.Setter
}

type IPAddressContext

type IPAddressContext struct {
	*ControllerContext
	Cluster     *clusterv1.Cluster
	ICSCluster  *infrav1.ICSCluster
	ICSVM       *infrav1.ICSVM
	IPAddress   *infrav1.IPAddress
	PatchHelper *patch.Helper
	Logger      logr.Logger
	Session     *session.Session
}

IPAddressContext is a Go context used with a IPAddress.

func (*IPAddressContext) GetLogger

func (c *IPAddressContext) GetLogger() logr.Logger

GetLogger returns this context's logger.

func (*IPAddressContext) GetSession

func (c *IPAddressContext) GetSession() *session.Session

GetSession returns this context's session.

func (*IPAddressContext) Patch

func (c *IPAddressContext) Patch() error

Patch updates the object and its status on the API server.

func (*IPAddressContext) String

func (c *IPAddressContext) String() string

String returns IPAddressGroupVersionKind IPAddressNamespace/IPAddressName.

type MachineContext

type MachineContext interface {
	String() string
	Patch() error
	GetLogger() logr.Logger
	GetICSMachine() ICSMachine
	GetObjectMeta() v1.ObjectMeta
	GetCluster() *clusterv1.Cluster
	GetMachine() *clusterv1.Machine
	SetBaseMachineContext(base *BaseMachineContext)
}

type VIMMachineContext

type VIMMachineContext struct {
	*BaseMachineContext
	ICSCluster *infrav1.ICSCluster
	ICSMachine *infrav1.ICSMachine
}

VIMMachineContext is a Go context used with a ICSMachine.

func (*VIMMachineContext) GetICSMachine

func (c *VIMMachineContext) GetICSMachine() ICSMachine

func (*VIMMachineContext) GetObjectMeta

func (c *VIMMachineContext) GetObjectMeta() v1.ObjectMeta

func (*VIMMachineContext) Patch

func (c *VIMMachineContext) Patch() error

Patch updates the object and its status on the API server.

func (*VIMMachineContext) SetBaseMachineContext

func (c *VIMMachineContext) SetBaseMachineContext(base *BaseMachineContext)

func (*VIMMachineContext) String

func (c *VIMMachineContext) String() string

String returns ICSMachineGroupVersionKind ICSMachineNamespace/ICSMachineName.

type VMContext

type VMContext struct {
	*ControllerContext
	ClusterModuleInfo *string
	ICSVM             *infrav1.ICSVM
	PatchHelper       *patch.Helper
	Logger            logr.Logger
	Session           *session.Session
}

VMContext is a Go context used with a ICSVM.

func (*VMContext) GetLogger

func (c *VMContext) GetLogger() logr.Logger

GetLogger returns this context's logger.

func (*VMContext) GetSession

func (c *VMContext) GetSession() *session.Session

GetSession returns this context's session.

func (*VMContext) Patch

func (c *VMContext) Patch() error

Patch updates the object and its status on the API server.

func (*VMContext) String

func (c *VMContext) String() string

String returns ICSVMGroupVersionKind ICSVMNamespace/ICSVMName.

Jump to

Keyboard shortcuts

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