cluster

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidProvider

func IsInvalidProvider(err error) bool

IsInvalidProvider asserts invalidProviderError.

func IsNoResources

func IsNoResources(err error) bool

IsNoResources asserts noResourcesError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type Cluster added in v1.21.0

type Cluster struct {
	V1Alpha2Cluster *capiv1alpha2.Cluster
	Cluster         *capiv1alpha3.Cluster

	AWSCluster   *infrastructurev1alpha2.AWSCluster
	AzureCluster *capzv1alpha3.AzureCluster
}

Cluster abstracts away provider-specific node pool resources.

func (*Cluster) Object added in v1.21.0

func (n *Cluster) Object() runtime.Object

type Collection added in v1.21.0

type Collection struct {
	Items []Cluster
}

Collection wraps a list of clusters.

func (*Collection) Object added in v1.21.0

func (cc *Collection) Object() runtime.Object

type Config

type Config struct {
	Client *client.Client
}

type FakeService

type FakeService struct {
	// contains filtered or unexported fields
}

func NewFakeService

func NewFakeService(storage []runtime.Object) *FakeService

func (*FakeService) Get

func (ms *FakeService) Get(ctx context.Context, options GetOptions) (Resource, error)

type GetOptions

type GetOptions struct {
	ID        string
	Provider  string
	Namespace string
}

type Interface

type Interface interface {
	Get(context.Context, GetOptions) (Resource, error)
}

Interface represents the contract for the clusters service. Using this instead of a regular 'struct' makes mocking the service in tests much simpler.

func New

func New(config Config) (Interface, error)

type Resource added in v1.21.0

type Resource interface {
	Object() runtime.Object
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) Get

func (s *Service) Get(ctx context.Context, options GetOptions) (Resource, error)

Jump to

Keyboard shortcuts

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