scope

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterScope

type ClusterScope struct {
	logr.Logger

	Cluster           *clusterv1.Cluster
	CloudscaleCluster *infrastructurev1beta2.CloudscaleCluster
	CloudscaleClient  *cloudscale.Client
	// contains filtered or unexported fields
}

ClusterScope defines the basic context for a reconciler acting on a CloudscaleCluster.

func NewClusterScope

func NewClusterScope(params ClusterScopeParams) (*ClusterScope, error)

NewClusterScope creates a new ClusterScope from the given parameters.

func (*ClusterScope) Close

func (s *ClusterScope) Close(ctx context.Context) error

Close persists the CloudscaleCluster status and spec changes.

func (*ClusterScope) Name

func (s *ClusterScope) Name() string

Name returns the cluster name.

func (*ClusterScope) Namespace

func (s *ClusterScope) Namespace() string

Namespace returns the cluster namespace.

type ClusterScopeParams

type ClusterScopeParams struct {
	Client            client.Client
	Logger            logr.Logger
	Cluster           *clusterv1.Cluster
	CloudscaleCluster *infrastructurev1beta2.CloudscaleCluster
	CloudscaleClient  *cloudscale.Client
}

ClusterScopeParams defines the input parameters used to create a new ClusterScope.

type MachineScope

type MachineScope struct {
	logr.Logger

	Cluster           *clusterv1.Cluster
	Machine           *clusterv1.Machine
	CloudscaleCluster *infrastructurev1beta2.CloudscaleCluster
	CloudscaleMachine *infrastructurev1beta2.CloudscaleMachine
	CloudscaleClient  *cloudscale.Client
	// contains filtered or unexported fields
}

MachineScope defines the basic context for a reconciler acting on a CloudscaleMachine.

func NewMachineScope

func NewMachineScope(params MachineScopeParams) (*MachineScope, error)

NewMachineScope creates a new MachineScope from the given parameters.

func (*MachineScope) Close

func (s *MachineScope) Close(ctx context.Context) error

Close persists the CloudscaleMachine status and spec changes.

func (*MachineScope) GetBootstrapData

func (s *MachineScope) GetBootstrapData(ctx context.Context) (string, error)

GetBootstrapData returns the bootstrap data from the Machine's bootstrap secret.

func (*MachineScope) GetProviderID

func (s *MachineScope) GetProviderID() string

GetProviderID returns the provider ID for the server.

func (*MachineScope) IsControlPlane

func (s *MachineScope) IsControlPlane() bool

IsControlPlane returns true if the machine is a control plane node.

func (*MachineScope) Name

func (s *MachineScope) Name() string

Name returns the machine name.

func (*MachineScope) Namespace

func (s *MachineScope) Namespace() string

Namespace returns the machine namespace.

func (*MachineScope) SetProviderID

func (s *MachineScope) SetProviderID(serverID string)

SetProviderID sets the provider ID for the server.

type MachineScopeParams

type MachineScopeParams struct {
	Client            client.Client
	Logger            logr.Logger
	Cluster           *clusterv1.Cluster
	Machine           *clusterv1.Machine
	CloudscaleCluster *infrastructurev1beta2.CloudscaleCluster
	CloudscaleMachine *infrastructurev1beta2.CloudscaleMachine
	CloudscaleClient  *cloudscale.Client
}

MachineScopeParams defines the input parameters used to create a new MachineScope.

Jump to

Keyboard shortcuts

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