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 CreateProvisionRequest
- type CreateProvisionResponse
- type DeleteProvisionRequest
- type DeleteProvisionResponse
- type EdgeClusterFactoryContract
- type EdgeClusterProvisionerContract
- type EdgeClusterTypeNotSupportedError
- type GetProvisionDetailsRequest
- type GetProvisionDetailsResponse
- type ListNodesRequest
- type ListNodesResponse
- type ListPodsRequest
- type ListPodsResponse
- type ListServicesRequest
- type ListServicesResponse
- 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 CreateProvisionRequest ¶ added in v0.5.0
CreateProvisionRequest contains the request to provision a new supported edge cluser
type CreateProvisionResponse ¶ added in v0.5.0
type CreateProvisionResponse struct { }
CreateProvisionResponse contains the result of provisioning a new supported edge cliuster
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 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 { // CreateProvision 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. CreateProvision( ctx context.Context, request *CreateProvisionRequest) (*CreateProvisionResponse, error) // UpdateProvisionWithRetry updates an existing provision. // ctx: Mandatory The reference to the context // request: Mandatory. The request to update an existing provision // Returns either the result of updating an existing provision or error if something goes wrong. UpdateProvisionWithRetry( ctx context.Context, request *UpdateProvisionRequest) (*UpdateProvisionResponse, error) // DeleteProvision deletes an existing provision. // ctx: Mandatory The reference to the context // request: Mandatory. The request to delete an existing provision // Returns either the result of deleting an existing provision or error if something goes wrong. DeleteProvision( ctx context.Context, request *DeleteProvisionRequest) (*DeleteProvisionResponse, error) // GetProvisionDetails retrieves information on an existing provision. // ctx: Mandatory The reference to the context // request: Mandatory. The request to retrieve information on an existing provision // Returns either the result of retrieving information on an provision or error if something goes wrong. GetProvisionDetails( ctx context.Context, request *GetProvisionDetailsRequest) (*GetProvisionDetailsResponse, error) // ListNodes lists an existing edge cluster nodes details // ctx: Mandatory The reference to the context // request: Mandatory. The request to list an existing edge cluster nodes details // Returns an existing edge cluster nodes details or error if something goes wrong. ListNodes( ctx context.Context, request *ListNodesRequest) (*ListNodesResponse, error) // ListPods lists an existing edge cluster pods that matchs the given search criteria // ctx: Mandatory The reference to the context // request: Mandatory. The request that contains the search criteria to filter the pods // Returns the list of running pods that matchs the given search criteria or error if something goes wrong. ListPods( ctx context.Context, request *ListPodsRequest) (*ListPodsResponse, error) // ListServices lists an existing edge cluster services that matchs the given search criteria // ctx: Mandatory The reference to the context // request: Mandatory. The request that contains the search criteria to filter services // Returns the list of services that matchs the given search criteria or error if something goes wrong. ListServices( ctx context.Context, request *ListServicesRequest) (*ListServicesResponse, 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 GetProvisionDetailsRequest ¶ added in v0.5.0
type GetProvisionDetailsRequest struct {
EdgeClusterID string
}
GetProvisionDetailsRequest contains the request to retrieve an existing provision details
type GetProvisionDetailsResponse ¶ added in v0.5.0
type GetProvisionDetailsResponse struct {
ProvisionDetails models.ProvisionDetails
}
GetProvisionDetailsResponse contains the result of retrieving an existing provision
type ListNodesRequest ¶ added in v0.8.0
type ListNodesRequest struct {
EdgeClusterID string
}
ListNodesRequest contains the request to list an existing edge cluster nodes details
type ListNodesResponse ¶ added in v0.8.0
type ListNodesResponse struct {
Nodes []models.EdgeClusterNode
}
ListNodesResponse contains the result of listing an existing edge cluster nodes details
type ListPodsRequest ¶ added in v0.8.0
ListPodsRequest contains the request to list an existing edge cluster pods
type ListPodsResponse ¶ added in v0.8.0
type ListPodsResponse struct {
Pods []models.EdgeClusterPod
}
ListPodsResponse contains the result of listing an existing edge cluster pods
type ListServicesRequest ¶ added in v0.9.0
ListServicesRequest contains the request to list an existing edge cluster services
type ListServicesResponse ¶ added in v0.9.0
type ListServicesResponse struct {
Services []models.EdgeClusterService
}
ListServicesResponse contains the result of listing an existing edge cluster services
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 provision
type UpdateProvisionResponse ¶ added in v0.0.18
type UpdateProvisionResponse struct { }
UpdateProvisionResponse contains the result of updating an existing provision