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 IsEdgeClusterTypeNotSupportedError(err error) bool
- func IsUnknownError(err error) bool
- func NewEdgeClusterTypeNotSupportedError(clusterType models.ClusterType) error
- func NewEdgeClusterTypeNotSupportedErrorWithError(clusterType models.ClusterType, err error) error
- func NewUnknownError(message string) error
- func NewUnknownErrorWithError(message string, err error) error
- type DeleteProvisionRequest
- type DeleteProvisionResponse
- type EdgeClusterFactoryContract
- type EdgeClusterProvisionerContract
- type EdgeClusterTypeNotSupportedError
- type NewProvisionRequest
- type NewProvisionResponse
- type UnknownError
- type UpdateProvisionRequest
- type UpdateProvisionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEdgeClusterTypeNotSupportedError ¶ added in v0.0.24
IsEdgeClusterTypeNotSupportedError indicates whether the error is of type EdgeClusterTypeNotSupportedError
func IsUnknownError ¶
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 ¶
NewUnknownError creates a new UnknownError error
func NewUnknownErrorWithError ¶
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
func (e EdgeClusterTypeNotSupportedError) Error() string
Error returns message for the EdgeClusterTypeNotSupportedError error type Returns the error nessage
func (EdgeClusterTypeNotSupportedError) Unwrap ¶ added in v0.0.24
func (e EdgeClusterTypeNotSupportedError) Unwrap() error
Unwrap returns the err if provided through NewEdgeClusterTypeNotSupportedErrorWithError function, otherwise returns nil
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
type UpdateProvisionRequest ¶ added in v0.0.18
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