context

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterContext

type ClusterContext struct {
	*ControllerContext
	Cluster        *clusterv1.Cluster
	VSphereCluster *infrav1.VSphereCluster
	PatchHelper    *patch.Helper
	Logger         logr.Logger
}

ClusterContext is a Go context used with a VSphereCluster.

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 VSphereClusterGroupVersionKind VSphereClusterNamespace/VSphereClusterName.

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

	// Username is the username for the account used to access remote vSphere
	// endpoints.
	Username string

	// Password is the password for the account used to access remote vSphere
	// endpoints.
	Password string

	// EnableKeepAlive is a session feature to enable keep alive handler
	// for better load management on vSphere 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 MachineContext

type MachineContext struct {
	*ControllerContext
	Cluster        *clusterv1.Cluster
	Machine        *clusterv1.Machine
	VSphereCluster *infrav1.VSphereCluster
	VSphereMachine *infrav1.VSphereMachine
	Logger         logr.Logger
	PatchHelper    *patch.Helper
}

MachineContext is a Go context used with a VSphereMachine.

func (*MachineContext) GetLogger

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

GetLogger returns this context's logger.

func (*MachineContext) Patch

func (c *MachineContext) Patch() error

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

func (*MachineContext) String

func (c *MachineContext) String() string

String returns VSphereMachineGroupVersionKind VSphereMachineNamespace/VSphereMachineName.

type VMContext added in v0.6.0

type VMContext struct {
	*ControllerContext
	VSphereVM            *infrav1.VSphereVM
	PatchHelper          *patch.Helper
	Logger               logr.Logger
	Session              *session.Session
	VSphereFailureDomain *infrav1.VSphereFailureDomain
}

VMContext is a Go context used with a VSphereVM.

func (*VMContext) GetLogger added in v0.6.0

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

GetLogger returns this context's logger.

func (*VMContext) GetSession added in v0.6.0

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

GetSession returns this context's session.

func (*VMContext) Patch added in v0.6.0

func (c *VMContext) Patch() error

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

func (*VMContext) String added in v0.6.0

func (c *VMContext) String() string

String returns VSphereVMGroupVersionKind VSphereVMNamespace/VSphereVMName.

type VSphereDeploymentZoneContext added in v0.7.9

type VSphereDeploymentZoneContext struct {
	*ControllerContext
	VSphereDeploymentZone *infrav1.VSphereDeploymentZone
	VSphereFailureDomain  *infrav1.VSphereFailureDomain
	Logger                logr.Logger
	PatchHelper           *patch.Helper
	AuthSession           *session.Session
}

func (*VSphereDeploymentZoneContext) GetSession added in v0.7.9

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

func (*VSphereDeploymentZoneContext) GetVsphereFailureDomain added in v0.7.9

func (c *VSphereDeploymentZoneContext) GetVsphereFailureDomain() infrav1.VSphereFailureDomain

func (*VSphereDeploymentZoneContext) Patch added in v0.7.9

func (*VSphereDeploymentZoneContext) String added in v0.7.9

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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