{"modulePath":"github.com/openshift/machine-api-operator","version":"v0.2.1-0.20261119161144-2615267e69e2","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package machine\n\n## Constants\n\n```go\nconst (\n\tNodeNameEnvVar = \"NODE_NAME\"\n\n\t// ExcludeNodeDrainingAnnotation annotation explicitly skips node draining if set\n\tExcludeNodeDrainingAnnotation = \"machine.openshift.io/exclude-node-draining\"\n\n\t// MachineRegionLabelName as annotation name for a machine region\n\tMachineRegionLabelName = \"machine.openshift.io/region\"\n\n\t// MachineAZLabelName as annotation name for a machine AZ\n\tMachineAZLabelName = \"machine.openshift.io/zone\"\n\n\t// MachineInstanceStateAnnotationName as annotation name for a machine instance state\n\tMachineInstanceStateAnnotationName = \"machine.openshift.io/instance-state\"\n\n\t// MachineInstanceTypeLabelName as annotation name for a machine instance type\n\tMachineInstanceTypeLabelName = \"machine.openshift.io/instance-type\"\n\n\t// MachineInterruptibleInstanceLabelName as annotaiton name for interruptible instances\n\tMachineInterruptibleInstanceLabelName = \"machine.openshift.io/interruptible-instance\"\n)\n```\n\n```go\nconst (\n\tPausedCondition machinev1.ConditionType = \"Paused\"\n\n\tPausedConditionReason = \"AuthoritativeAPINotMachineAPI\"\n\n\tNotPausedConditionReason = \"AuthoritativeAPIMachineAPI\"\n)\n```\nWe export the PausedCondition and reasons as they're shared across the Machine and MachineSet controllers.\n\n## Functions\n\n```go\nfunc AddWithActuator(mgr manager.Manager, actuator Actuator, gate featuregate.MutableFeatureGate) error\n```\n\n```go\nfunc AddWithActuatorOpts(mgr manager.Manager, actuator Actuator, opts controller.Options, gate featuregate.MutableFeatureGate) error\n```\n\n## Types\n\n```go\ntype Actuator interface {\n\t// Create the machine.\n\tCreate(context.Context, *machinev1.Machine) error\n\t// Delete the machine. If no error is returned, it is assumed that all dependent resources have been cleaned up.\n\tDelete(context.Context, *machinev1.Machine) error\n\t// Update the machine to the provided definition.\n\tUpdate(context.Context, *machinev1.Machine) error\n\t// Checks if the machine currently exists.\n\tExists(context.Context, *machinev1.Machine) (bool, error)\n}\n```\nActuator controls machines on a specific infrastructure. All methods should be idempotent unless otherwise specified.\n\n```go\nvar DefaultActuator Actuator\n```\n\n```go\ntype MachineError struct {\n\tReason  machinev1.MachineStatusError\n\tMessage string\n}\n```\nA more descriptive kind of error that represents an error condition that should be set in the Machine.Status. The \"Reason\" field is meant for short, enum-style constants meant to be interpreted by machines. The \"Message\" field is meant to be read by humans.\n\n```go\nfunc CreateMachine(msg string, args ...interface{}) *MachineError\n```\n\n```go\nfunc DeleteMachine(msg string, args ...interface{}) *MachineError\n```\n\n```go\nfunc InvalidMachineConfiguration(msg string, args ...interface{}) *MachineError\n```\n\n```go\nfunc UpdateMachine(msg string, args ...interface{}) *MachineError\n```\n\n```go\nfunc (e *MachineError) Error() string\n```\n\n```go\ntype ReconcileMachine struct {\n\tclient.Client\n\t// contains filtered or unexported fields\n}\n```\nReconcileMachine reconciles a Machine object\n\n```go\nfunc (r *ReconcileMachine) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)\n```\nReconcile reads that state of the cluster for a Machine object and makes changes based on the state read and what is in the Machine.Spec +kubebuilder:rbac:groups=machine.openshift.io,resources=machines;machines/status,verbs=get;list;watch;create;update;patch;delete\n\n```go\ntype RequeueAfterError struct {\n\tRequeueAfter time.Duration\n}\n```\nRequeueAfterError represents that an actuator managed object should be requeued for further processing after the given RequeueAfter time has passed.\n\n```go\nfunc (e *RequeueAfterError) Error() string\n```\nError implements the error interface\n\n```go\ntype TestActuator struct {\n\tBlockOnCreate     bool\n\tBlockOnDelete     bool\n\tBlockOnUpdate     bool\n\tBlockOnExists     bool\n\tCreateCallCount   int64\n\tDeleteCallCount   int64\n\tUpdateCallCount   int64\n\tExistsCallCount   int64\n\tExistsValue       bool\n\tExistsErr         error\n\tUpdateErr         error\n\tExistsMachineHook func(*machinev1.Machine)\n\tUpdateMachineHook func(*machinev1.Machine)\n\tLock              sync.Mutex\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (a *TestActuator) Create(context.Context, *machinev1.Machine) error\n```\n\n```go\nfunc (a *TestActuator) Delete(context.Context, *machinev1.Machine) error\n```\n\n```go\nfunc (a *TestActuator) Exists(_ context.Context, machine *machinev1.Machine) (bool, error)\n```\n\n```go\nfunc (a *TestActuator) Unblock()\n```\n\n```go\nfunc (a *TestActuator) Update(ctx context.Context, machine *machinev1.Machine) error\n```\n\n","path":"github.com/openshift/machine-api-operator/pkg/controller/machine","name":"machine","synopsis":"","isRedistributable":true}
