Documentation ¶
Index ¶
- type AddDeploymentRequest
- type Application
- type ApplicationPersistentVolume
- type ApplicationPort
- type ApplicationResources
- type ComparatorType
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type Deployment
- type DeploymentPlanListFilters
- type DeploymentPlanRecord
- type DeploymentPlanState
- type DeploymentPlanStatus
- type DeploymentState
- type DeploymentStatus
- type GetResponse
- type Ledger
- type ListRequest
- type ListResponse
- type MatchingComputeCapability
- type PayloadCoordinates
- type Repository
- type UpdateDeploymentStatusRequest
- type UpdateResponse
- type UpdateStatusRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddDeploymentRequest ¶
type AddDeploymentRequest struct { Metadata core.Metadata DeploymentID string PayloadCoordinates []PayloadCoordinates InstanceCount uint32 }
type Application ¶
type Application struct { PayloadName string Resources ApplicationResources Ports []ApplicationPort PersistentVolumes []ApplicationPersistentVolume }
type ApplicationPort ¶
type ApplicationResources ¶
type ComparatorType ¶
type ComparatorType string
const ( ComparatorTypeIn ComparatorType = "ComparatorType_IN" ComparatorTypeNotIn ComparatorType = "ComparatorType_NOT_IN" ComparatorTypeGte ComparatorType = "ComparatorType_GTE" ComparatorTypeLte ComparatorType = "ComparatorType_LTE" )
type CreateRequest ¶
type CreateRequest struct { Name string Namespace string // Namespace is the namespace of the Deployment. ServiceName string // ServiceName is the name of the service associated with the Deployment. Certs will be issued for this service. MatchingComputeCapabilities []MatchingComputeCapability // MatchingCapabilities is a list of capabilities that the Deployment requires. Applications []Application // Applications is a list of applications that the Deployment requires. }
CreateRequest represents the Deployment creation request.
type CreateResponse ¶
type CreateResponse struct {
Record DeploymentPlanRecord
}
CreateResponse represents the response after creating a new Deployment.
type DeleteRequest ¶
type Deployment ¶
type Deployment struct { ID string // ID is the ID of the DeploymentPlan. Status DeploymentStatus // Status is the status of the Deployment. PayloadCoordinates []PayloadCoordinates // PayloadCoordinates is a list of coordinates for the payloads that the Deployment requires. InstanceCount uint32 // InstanceCount is the number of instances of the Deployment. }
type DeploymentPlanListFilters ¶
type DeploymentPlanListFilters struct { IDIn []string // IN condition NameIn []string // IN condition VersionGte *uint64 // Greater than or equal condition VersionLte *uint64 // Less than or equal condition VersionEq *uint64 // Equal condition PayloadNameIn []string // IN condition ServiceNameIn []string // IN condition DeploymentPlanIDIn []string // IN condition DeploymentPlanStatusIn []DeploymentState IncludeDeleted bool // IncludeDeleted indicates whether to include soft-deleted records in the result. Limit uint32 // Limit is the maximum number of records to return. StateIn []DeploymentPlanState StateNotIn []DeploymentPlanState }
DeploymentFilters contains filters for querying the Deployment table.
type DeploymentPlanRecord ¶
type DeploymentPlanRecord struct { Metadata core.Metadata // Metadata is the metadata that identifies the Deployment. It is a combination of the Deployment's name and version. Name string // Name is the name for this Deployment. Status DeploymentPlanStatus // Status is the status of the Deployment. Namespace string // Namespace is the namespace of the Deployment. ServiceName string // ServiceName is the name of the service associated with the Deployment. Certs will be issued for this service. MatchingComputeCapabilities []MatchingComputeCapability // MatchingCapabilities is a list of capabilities that the Deployment requires. Applications []Application // Applications is a list of applications that the Deployment requires. Deployments []Deployment // Deployment is an instantiation of the DeploymentPlan. }
Deployment is a representation of a workload which is expected to be deployed.
type DeploymentPlanState ¶
type DeploymentPlanState string
DeploymentPlanState is the state of a Deployment.
const ( DeploymentPlanStateUnknown DeploymentPlanState = "DeploymentPlanState_UNKNOWN" DeploymentPlanStateActive DeploymentPlanState = "DeploymentPlanState_ACTIVE" DeploymentPlanStateInactive DeploymentPlanState = "DeploymentPlanState_INACTIVE" )
type DeploymentPlanStatus ¶
type DeploymentPlanStatus struct { State DeploymentPlanState // State is the discrete condition of the resource. Message string // Message is a human-readable description of the resource's state. }
type DeploymentState ¶
type DeploymentState string
DeploymentState is the state of a Deployment.
const ( DeploymentStateUnknown DeploymentState = "DeploymentState_UNKNOWN" DeploymentStatePending DeploymentState = "DeploymentState_PENDING" DeploymentStateInProgress DeploymentState = "DeploymentState_IN_PROGRESS" DeploymentStateCancelled DeploymentState = "DeploymentState_CANCELLED" DeploymentStateFailed DeploymentState = "DeploymentState_FAILED" DeploymentStatePaused DeploymentState = "DeploymentState_PAUSED" DeploymentStateCompleted DeploymentState = "DeploymentState_COMPLETED" )
type DeploymentStatus ¶
type DeploymentStatus struct { State DeploymentState // State is the discrete condition of the resource. Message string // Message is a human-readable description of the resource's state. }
type GetResponse ¶
type GetResponse struct {
Record DeploymentPlanRecord
}
GetResponse represents the response for fetching a Deployment.
type Ledger ¶
type Ledger interface { // Create creates a new Deployment. Create(context.Context, *CreateRequest) (*CreateResponse, error) // GetByID retrieves a Deployment by its ID. GetByID(context.Context, string) (*GetResponse, error) // GetByName retrieves a Deployment by its name. GetByName(context.Context, string) (*GetResponse, error) // UpdateStatus updates the state and message of an existing Deployment. UpdateStatus(context.Context, *UpdateStatusRequest) (*UpdateResponse, error) // List returns a list of Deployment that match the provided filters. List(context.Context, *ListRequest) (*ListResponse, error) // Delete soft-deletes a Deployment. Delete(context.Context, *DeleteRequest) error AddDeployment(context.Context, *AddDeploymentRequest) (*UpdateResponse, error) UpdateDeploymentStatus(context.Context, *UpdateDeploymentStatusRequest) (*UpdateResponse, error) }
Ledger provides the methods for managing Deployment records.
type ListRequest ¶
type ListRequest struct {
Filters DeploymentPlanListFilters
}
ListRequest represents the request to list Deployments with filters.
type ListResponse ¶
type ListResponse struct {
Records []DeploymentPlanRecord
}
ListResponse represents the response to a list request.
type MatchingComputeCapability ¶
type MatchingComputeCapability struct { CapabilityType string Comparator ComparatorType CapabilityNames []string }
type PayloadCoordinates ¶
type Repository ¶
type Repository interface { Insert(context.Context, DeploymentPlanRecord) error GetByID(context.Context, string) (DeploymentPlanRecord, error) GetByName(context.Context, string) (DeploymentPlanRecord, error) UpdateStatus(context.Context, core.Metadata, DeploymentPlanStatus) error Delete(context.Context, core.Metadata) error List(context.Context, DeploymentPlanListFilters) ([]DeploymentPlanRecord, error) InsertDeployment(context.Context, core.Metadata, Deployment) error UpdateDeploymentStatus(ctx context.Context, metadata core.Metadata, deploymentID string, status DeploymentStatus) error }
Repository provides the methods that the storage layer must implement to support the ledger.
type UpdateDeploymentStatusRequest ¶
type UpdateDeploymentStatusRequest struct { Metadata core.Metadata DeploymentID string Status DeploymentStatus }
type UpdateResponse ¶
type UpdateResponse struct {
Record DeploymentPlanRecord
}
UpdateResponse represents the response after updating the state of a Deployment.
type UpdateStatusRequest ¶
type UpdateStatusRequest struct { Metadata core.Metadata Status DeploymentPlanStatus }
UpdateStatusRequest represents the request to update the state and message of a Deployment.