Documentation
¶
Index ¶
- Variables
- func GetMachinePreferredIPAddress(nma *infrav1.NutanixMachine) (string, error)
- func GetRemoteClient(ctx context.Context, client ctlclient.Client, clusterKey ctlclient.ObjectKey) (ctlclient.Client, error)
- func IsControlPlaneMachine(nma *infrav1.NutanixMachine) bool
- func RemoveRemoteClient(clusterKey ctlclient.ObjectKey)
- type ClusterContext
- type MachineContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMachineIPAddr = errors.New("no IP addresses found for machine")
ErrNoMachineIPAddr indicates that no valid IP addresses were found in a machine context
View Source
var (
RemoteClientCache = map[ctlclient.ObjectKey]ctlclient.Client{}
)
Functions ¶
func GetMachinePreferredIPAddress ¶
func GetMachinePreferredIPAddress(nma *infrav1.NutanixMachine) (string, error)
GetMachinePreferredIPAddress returns the preferred IP address associated with the NutanixMachine
func GetRemoteClient ¶
func IsControlPlaneMachine ¶
func IsControlPlaneMachine(nma *infrav1.NutanixMachine) bool
IsControlPlaneMachine returns true if the provided resource is a member of the control plane.
func RemoveRemoteClient ¶
Types ¶
type ClusterContext ¶
type ClusterContext struct {
Context context.Context
NutanixClient *nutanixClientV3.Client
Cluster *capiv1.Cluster
NutanixCluster *infrav1.NutanixCluster
// The prefix to prepend to logs
LogPrefix string
}
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
// The prefix to prepend to logs
LogPrefix string
}
MachineContext is a context used with a NutanixMachine reconciler
func (*MachineContext) SetFailureStatus ¶
func (clctx *MachineContext) SetFailureStatus(failureReason capierrors.MachineStatusError, failureMessage error)
Click to show internal directories.
Click to hide internal directories.