cluster

package
v1.60.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInsufficientPermissions added in v1.47.0

func IsInsufficientPermissions(err error) bool

IsInsufficientPermissions asserts insufficientPermissionsError.

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 {
	Cluster *capiv1alpha3.Cluster

	AWSCluster   *infrastructurev1alpha3.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)

func (*FakeService) Patch added in v1.58.0

func (ms *FakeService) Patch(ctx context.Context, object runtime.Object, options PatchOptions) error

type GetOptions

type GetOptions struct {
	Name      string
	Provider  string
	Namespace string
}

type Interface

type Interface interface {
	Get(context.Context, GetOptions) (Resource, error)
	Patch(context.Context, runtime.Object, PatchOptions) 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 PatchOptions added in v1.58.0

type PatchOptions struct {
	PatchSpecs []PatchSpec
}

type PatchSpec added in v1.58.0

type PatchSpec struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value"`
}

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)

func (*Service) Patch added in v1.58.0

func (s *Service) Patch(ctx context.Context, object runtime.Object, options PatchOptions) error

Jump to

Keyboard shortcuts

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