Documentation ¶
Index ¶
- type ClusterContext
- func (c *ClusterContext) CanLogin() bool
- func (c *ClusterContext) ClusterName() string
- func (c *ClusterContext) GetClient() client.Client
- func (c *ClusterContext) GetCluster() *clusterv1.Cluster
- func (c *ClusterContext) GetLogger() logr.Logger
- func (c *ClusterContext) GetObject() runtime.Object
- func (c *ClusterContext) Pass() string
- func (c *ClusterContext) Patch() error
- func (c *ClusterContext) String() string
- func (c *ClusterContext) User() string
- type ClusterContextParams
- type MachineContext
- func NewMachineContext(params *MachineContextParams) (*MachineContext, error)
- func NewMachineContextFromClusterContext(clusterCtx *ClusterContext, machine *clusterv1.Machine, ...) (*MachineContext, error)
- func NewMachineLoggerContext(parentContext *MachineContext, loggerContext string) *MachineContext
- type MachineContextParams
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterContext ¶
type ClusterContext struct { context.Context Cluster *clusterv1.Cluster VSphereCluster *v1alpha2.VSphereCluster Client client.Client Logger logr.Logger // contains filtered or unexported fields }
ClusterContext is a Go context used with a CAPI cluster.
func NewClusterContext ¶
func NewClusterContext(params *ClusterContextParams) (*ClusterContext, error)
NewClusterContext returns a new ClusterContext.
func NewClusterLoggerContext ¶
func NewClusterLoggerContext(parentContext *ClusterContext, loggerContext string) *ClusterContext
NewClusterLoggerContext creates a new ClusterContext with the given logger context.
func (*ClusterContext) CanLogin ¶
func (c *ClusterContext) CanLogin() bool
CanLogin returns a flag indicating whether the cluster config has enough information to login to the vSphere endpoint.
func (*ClusterContext) ClusterName ¶
func (c *ClusterContext) ClusterName() string
ClusterName returns the name of the cluster.
func (*ClusterContext) GetClient ¶ added in v0.5.0
func (c *ClusterContext) GetClient() client.Client
GetClient returns the controller client.
func (*ClusterContext) GetCluster ¶ added in v0.4.0
func (c *ClusterContext) GetCluster() *clusterv1.Cluster
GetCluster returns the Cluster object.
func (*ClusterContext) GetLogger ¶
func (c *ClusterContext) GetLogger() logr.Logger
GetLogger returns the Logger.
func (*ClusterContext) GetObject ¶
func (c *ClusterContext) GetObject() runtime.Object
GetObject returns the Cluster object.
func (*ClusterContext) Pass ¶
func (c *ClusterContext) Pass() string
Pass returns the password used to access the vSphere endpoint.
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
Strings returns ClusterNamespace/ClusterName
func (*ClusterContext) User ¶
func (c *ClusterContext) User() string
User returns the username used to access the vSphere endpoint.
type ClusterContextParams ¶
type ClusterContextParams struct { Context context.Context Cluster *clusterv1.Cluster VSphereCluster *v1alpha2.VSphereCluster Client client.Client Logger logr.Logger }
ClusterContextParams are the parameters needed to create a ClusterContext.
type MachineContext ¶
type MachineContext struct { *ClusterContext Machine *clusterv1.Machine VSphereMachine *v1alpha2.VSphereMachine Session *Session // contains filtered or unexported fields }
MachineContext is a Go context used with a CAPI cluster.
func NewMachineContext ¶
func NewMachineContext(params *MachineContextParams) (*MachineContext, error)
NewMachineContext returns a new MachineContext.
func NewMachineContextFromClusterContext ¶
func NewMachineContextFromClusterContext( clusterCtx *ClusterContext, machine *clusterv1.Machine, vsphereMachine *v1alpha2.VSphereMachine) (*MachineContext, error)
NewMachineContextFromClusterContext creates a new MachineContext using an existing CluserContext.
func NewMachineLoggerContext ¶
func NewMachineLoggerContext(parentContext *MachineContext, loggerContext string) *MachineContext
NewMachineLoggerContext creates a new MachineContext with the given logger context.
func (*MachineContext) GetObject ¶
func (c *MachineContext) GetObject() runtime.Object
GetObject returns the Machine object.
func (*MachineContext) GetSession ¶
func (c *MachineContext) GetSession() *Session
GetSession returns the login session for this context.
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
Strings returns ClusterNamespace/ClusterName/MachineName
type MachineContextParams ¶
type MachineContextParams struct { ClusterContextParams Machine *clusterv1.Machine VSphereMachine *v1alpha2.VSphereMachine }
MachineContextParams are the parameters needed to create a MachineContext.