context

package
v1.3.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RemoteClientCache = map[ctlclient.ObjectKey]ctlclient.Client{}
)

Functions

func GetRemoteClient

func GetRemoteClient(ctx context.Context, client ctlclient.Client, clusterKey ctlclient.ObjectKey) (ctlclient.Client, error)

func IsControlPlaneMachine

func IsControlPlaneMachine(nma *infrav1.NutanixMachine) bool

IsControlPlaneMachine returns true if the provided resource is a member of the control plane.

func RemoveRemoteClient

func RemoveRemoteClient(clusterKey ctlclient.ObjectKey)

Types

type ClusterContext

type ClusterContext struct {
	Context       context.Context
	NutanixClient *nutanixClientV3.Client

	Cluster        *capiv1.Cluster
	NutanixCluster *infrav1.NutanixCluster
}

ClusterContext is a context used with a NutanixCluster reconciler

func (*ClusterContext) GetNutanixMachinesInCluster

func (clctx *ClusterContext) GetNutanixMachinesInCluster(client ctlclient.Client) ([]*infrav1.NutanixMachine, error)

GetNutanixMachinesInCluster gets a cluster's NutanixMachine resources.

func (*ClusterContext) SetFailureStatus

func (clctx *ClusterContext) SetFailureStatus(failureReason capierrors.ClusterStatusError, failureMessage error)

type MachineContext

type MachineContext struct {
	Context       context.Context
	NutanixClient *nutanixClientV3.Client

	Cluster        *capiv1.Cluster
	Machine        *capiv1.Machine
	NutanixCluster *infrav1.NutanixCluster
	NutanixMachine *infrav1.NutanixMachine

	// The VM ip address
	IP string
}

MachineContext is a context used with a NutanixMachine reconciler

func (*MachineContext) SetFailureStatus

func (clctx *MachineContext) SetFailureStatus(failureReason capierrors.MachineStatusError, failureMessage error)

Jump to

Keyboard shortcuts

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