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 ¶
- func IsEdgeClusterNotSupportedError(err error) bool
- func IsUnknownError(err error) bool
- func NewEdgeClusterNotSupportedError(edgeClusterType EdgeClusterType) error
- func NewEdgeClusterNotSupportedErrorWithError(edgeClusterType EdgeClusterType, err error) error
- func NewUnknownError(message string) error
- func NewUnknownErrorWithError(message string, err error) error
- type EdgeClusterFactoryContract
- type EdgeClusterNotSupportedError
- type EdgeClusterProvisionerContract
- type EdgeClusterType
- type NewProvisionRequest
- type NewProvisionResponse
- type UnknownError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEdgeClusterNotSupportedError ¶
IsEdgeClusterNotSupportedError indicates whether the error is of type EdgeClusterNotSupportedError
func IsUnknownError ¶
IsUnknownError indicates whether the error is of type UnknownError
func NewEdgeClusterNotSupportedError ¶
func NewEdgeClusterNotSupportedError(edgeClusterType EdgeClusterType) error
NewEdgeClusterNotSupportedError creates a new EdgeClusterNotSupportedError error edgeClusterType: Mandatory. The type of the edge cluster that is not suppoorted
func NewEdgeClusterNotSupportedErrorWithError ¶
func NewEdgeClusterNotSupportedErrorWithError( edgeClusterType EdgeClusterType, err error) error
NewEdgeClusterNotSupportedErrorWithError creates a new EdgeClusterNotSupportedError error edgeClusterType: Mandatory. The type of the edge cluster that is not suppoorted
func NewUnknownError ¶
NewUnknownError creates a new UnknownError error
func NewUnknownErrorWithError ¶
NewUnknownErrorWithError creates a new UnknownError error
Types ¶
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 // edgeClusterType: 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, edgeClusterType EdgeClusterType) (EdgeClusterProvisionerContract, error) }
EdgeClusterFactoryContract defines the factory method that are used to create provisioner for different supported type of edge cluster (e.g. K3S)
type EdgeClusterNotSupportedError ¶
type EdgeClusterNotSupportedError struct { Err error EdgeClusterType EdgeClusterType }
EdgeClusterNotSupportedError indicates that the requested edge cluster is not suipported
func (EdgeClusterNotSupportedError) Error ¶
func (e EdgeClusterNotSupportedError) Error() string
Error returns message for the EdgeClusterNotSupportedError error type Returns the error nessage
func (EdgeClusterNotSupportedError) Unwrap ¶
func (e EdgeClusterNotSupportedError) Unwrap() error
Unwrap returns the err if provided through NewEdgeClusterNotSupportedErrorWithError function, otherwise returns nil
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) }
EdgeClusterProvisionerContract defines the methods that are required to provision a supported type of edge cluster
type NewProvisionRequest ¶
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 ¶
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