types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package types defines the contracts that are used to provision a supported edge cluster and managing them

Package types defines the contracts that are used to provision a supported edge cluster and managing them

Package types defines the contracts that are used to provision a supported edge cluster and managing them

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEdgeClusterTypeNotSupportedError added in v0.0.24

func IsEdgeClusterTypeNotSupportedError(err error) bool

IsEdgeClusterTypeNotSupportedError indicates whether the error is of type EdgeClusterTypeNotSupportedError

func IsUnknownError

func IsUnknownError(err error) bool

IsUnknownError indicates whether the error is of type UnknownError

func NewEdgeClusterTypeNotSupportedError added in v0.0.24

func NewEdgeClusterTypeNotSupportedError(clusterType models.ClusterType) error

NewEdgeClusterTypeNotSupportedError creates a new EdgeClusterTypeNotSupportedError error clusterType: Mandatory. The edge cluster type that is not supported

func NewEdgeClusterTypeNotSupportedErrorWithError added in v0.0.24

func NewEdgeClusterTypeNotSupportedErrorWithError(clusterType models.ClusterType, err error) error

NewEdgeClusterTypeNotSupportedErrorWithError creates a new EdgeClusterTypeNotSupportedError error clusterType: Mandatory. The edge cluster type that is not supported

func NewUnknownError

func NewUnknownError(message string) error

NewUnknownError creates a new UnknownError error

func NewUnknownErrorWithError

func NewUnknownErrorWithError(message string, err error) error

NewUnknownErrorWithError creates a new UnknownError error

Types

type DeleteProvisionRequest added in v0.0.18

type DeleteProvisionRequest struct {
	EdgeClusterID string
}

DeleteProvisionRequest contains the request to delete an existing provision

type DeleteProvisionResponse added in v0.0.18

type DeleteProvisionResponse struct {
}

DeleteProvisionResponse contains the result of deleting an existing edge cluster provision

type EdgeClusterFactoryContract

type EdgeClusterFactoryContract interface {
	// Create instantiates a new edge cluster provisioner of a requested edge cluster type and returns
	// it to the caller.
	// ctx: Mandatory The reference to the context
	// clusterType: Mandatory. The type of edge cluster provisioner to be instantiated
	// Returns either the result of instantiating a edge cluster provisioner or error if something goes wrong.
	Create(
		ctx context.Context,
		clusterType models.ClusterType) (EdgeClusterProvisionerContract, error)
}

EdgeClusterFactoryContract defines the factory method that are used to create provisioner for different supported type of edge cluster (e.g. K3S)

type EdgeClusterProvisionerContract

type EdgeClusterProvisionerContract interface {
	// NewProvision provisions a new edge cluster.
	// ctx: Mandatory The reference to the context
	// request: Mandatory. The request to provision a new edge cluster
	// Returns either the result of provisioning new edge cluster or error if something goes wrong.
	NewProvision(
		ctx context.Context,
		request *NewProvisionRequest) (*NewProvisionResponse, error)

	// UpdateProvisionWithRetry updates an existing edge cluster.
	// ctx: Mandatory The reference to the context
	// request: Mandatory. The request to update an existing edge cluster.
	// Returns either the result of updating an existing edge cluster or error if something goes wrong.
	UpdateProvisionWithRetry(
		ctx context.Context,
		request *UpdateProvisionRequest) (response *UpdateProvisionResponse, err error)

	// DeleteProvision deletes an edge cluster.
	// ctx: Mandatory The reference to the context
	// request: Mandatory. The request to delete an edge cluster
	// Returns either the result of deleting an edge cluster or error if something goes wrong.
	DeleteProvision(
		ctx context.Context,
		request *DeleteProvisionRequest) (response *DeleteProvisionResponse, err error)
}

EdgeClusterProvisionerContract defines the methods that are required to provision a supported type of edge cluster

type EdgeClusterTypeNotSupportedError added in v0.0.24

type EdgeClusterTypeNotSupportedError struct {
	ClusterType models.ClusterType
	Err         error
}

EdgeClusterTypeNotSupportedError indicates that the edge cluster type is not supported

func (EdgeClusterTypeNotSupportedError) Error added in v0.0.24

Error returns message for the EdgeClusterTypeNotSupportedError error type Returns the error nessage

func (EdgeClusterTypeNotSupportedError) Unwrap added in v0.0.24

Unwrap returns the err if provided through NewEdgeClusterTypeNotSupportedErrorWithError function, otherwise returns nil

type NewProvisionRequest

type NewProvisionRequest struct {
	EdgeClusterID string
	ClusterSecret string
}

NewProvisionRequest contains the request to provision a new supported edge cluser

type NewProvisionResponse

type NewProvisionResponse struct {
}

NewProvisionResponse contains the result of provisioning a new supported edge cliuster

type UnknownError

type UnknownError struct {
	Message string
	Err     error
}

UnknownError indicates that an unknown error has happened<Paste>

func (UnknownError) Error

func (e UnknownError) Error() string

Error returns message for the UnknownError error type Returns the error nessage

func (UnknownError) Unwrap

func (e UnknownError) Unwrap() error

Unwrap returns the err if provided through NewUnknownErrorWithError function, otherwise returns nil

type UpdateProvisionRequest added in v0.0.18

type UpdateProvisionRequest struct {
	EdgeClusterID string
	ClusterSecret string
}

UpdateProvisionRequest contains the request to update an existing supported edge cluser

type UpdateProvisionResponse added in v0.0.18

type UpdateProvisionResponse struct {
}

UpdateProvisionResponse contains the result of updating an existing supported edge cliuster

Directories

Path Synopsis
Package mock_types is a generated GoMock package.
Package mock_types is a generated GoMock package.

Jump to

Keyboard shortcuts

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