scope

package
v0.0.0-...-685acd0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package scope implements scope types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterScope

type ClusterScope struct {
	logr.Logger

	VpsieClients
	Cluster      *clusterv1.Cluster
	VpsieCluster *infrav1.VpsieCluster
	// contains filtered or unexported fields
}

ClusterScope defines the basic context for an actuator to operate upon.

func NewClusterScope

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

func (*ClusterScope) APIServerLoadbalancers

func (s *ClusterScope) APIServerLoadbalancers() *infrav1.LoadBalancer

APIServerLoadbalancers get the VpsieCluster Spec Network APIServerLoadbalancers.

func (*ClusterScope) Close

func (s *ClusterScope) Close() error

Close closes the current scope persisting the cluster configuration and status.

func (*ClusterScope) ControlPlaneEndpoint

func (s *ClusterScope) ControlPlaneEndpoint() clusterv1.APIEndpoint

ControlPlaneEndpoint returns the cluster control-plane endpoint.

func (*ClusterScope) Name

func (s *ClusterScope) Name() string

func (*ClusterScope) NameSpace

func (s *ClusterScope) NameSpace() string

func (*ClusterScope) Network

Network returns the cluster network object.

func (*ClusterScope) PatchObject

func (s *ClusterScope) PatchObject() error

PatchObject persists the cluster configuration and status

func (*ClusterScope) Region

func (s *ClusterScope) Region() string

func (*ClusterScope) SetControlPlaneEndpoint

func (s *ClusterScope) SetControlPlaneEndpoint(endpoint clusterv1.APIEndpoint)

SetControlPlaneEndpoint sets cluster control-plane endpoint.

func (*ClusterScope) SetReady

func (s *ClusterScope) SetReady()

SetReady sets cluster ready status.

func (*ClusterScope) UID

func (s *ClusterScope) UID() string

UID returns the cluster UID.

type ClusterScopeParams

type ClusterScopeParams struct {
	VpsieClients
	Client       client.Client
	Logger       logr.Logger
	Cluster      *clusterv1.Cluster
	VpsieCluster *infrav1.VpsieCluster
}

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

type MachineScope

type MachineScope struct {
	logr.Logger

	VpsieClients

	Machine      *clusterv1.Machine
	Cluster      *clusterv1.Cluster
	VpsieCluster *infrav1.VpsieCluster
	VpsieMachine *infrav1.VpsieMachine
	// contains filtered or unexported fields
}

func NewMachineScope

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

NewMachineScope creates a new MachineScope from the supplied parameters. This is meant to be called for each reconcile iteration.

func (*MachineScope) Close

func (m *MachineScope) Close() error

func (*MachineScope) GetBootstrapData

func (m *MachineScope) GetBootstrapData() (string, error)

func (*MachineScope) GetInstanceID

func (m *MachineScope) GetInstanceID() *string

func (*MachineScope) GetInstanceStatus

func (m *MachineScope) GetInstanceStatus() *infrav1.VpsieInstanceStatus

GetInstanceStatus returns the VpsieMachine instance status.

func (*MachineScope) GetProviderID

func (m *MachineScope) GetProviderID() string

func (*MachineScope) Name

func (m *MachineScope) Name() string

func (*MachineScope) NameSpace

func (m *MachineScope) NameSpace() string

func (*MachineScope) SetAddresses

func (m *MachineScope) SetAddresses(addrs []corev1.NodeAddress)

func (*MachineScope) SetFailureMessage

func (m *MachineScope) SetFailureMessage(v error)

func (*MachineScope) SetFailureReason

func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)

func (*MachineScope) SetInstanceStatus

func (m *MachineScope) SetInstanceStatus(v infrav1.VpsieInstanceStatus)

SetInstanceStatus sets the VpsieMachine instance status.

func (*MachineScope) SetProviderID

func (m *MachineScope) SetProviderID(v string)

func (*MachineScope) SetReady

func (m *MachineScope) SetReady()

type MachineScopeParams

type MachineScopeParams struct {
	Client client.Client
	Logger logr.Logger
	VpsieClients

	Machine      *clusterv1.Machine
	Cluster      *clusterv1.Cluster
	VpsieCluster *infrav1.VpsieCluster
	VpsieMachine *infrav1.VpsieMachine
}

type TokenSource

type TokenSource struct {
	AccessToken string
}

TokenSource ...

func (*TokenSource) Token

func (t *TokenSource) Token() (*oauth2.Token, error)

Token return the oauth token.

type VpsieClients

type VpsieClients struct {
	Services *govpsie.Client
}

func (*VpsieClients) Session

func (c *VpsieClients) Session() (*govpsie.Client, error)

Jump to

Keyboard shortcuts

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