Documentation ¶
Index ¶
- Constants
- Variables
- type Action
- type CreateLogicalVolumeAction
- type CreatePhysicalVolumeAction
- type CreateVolumeGroupAction
- type DiskImageStore
- type EventContent
- type EventType
- type Events
- type ImageStore
- type ImageStoreSaveOptions
- type Manager
- type ReviewLogicalVolumeAction
- type ReviewPhysicalVolumeAction
- type ReviewVolumeGroupAction
- type State
- type StateCreateFailAction
- type StateEventContext
- type StateMachine
- type StateReviewCompleteAction
- type StateReviewFailAction
- type StateType
- type States
Constants ¶
View Source
const ( Default StateType = "" NoOp EventType = "NoOp" )
Variables ¶
View Source
var ( CreateCompleted EventType = EventType(api.ResourceStatus_CREATE_COMPLETED.String()) CreateFailed EventType = EventType(api.ResourceStatus_CREATE_FAILED.String()) CreateInProgressLogicalVolume EventType = EventType("CreateInProgressLogicalVolume") CreateInProgressPhysicalVolume EventType = EventType("CreateInProgressPhysicalVolume") CreateInProgressVolumeGroup EventType = EventType("CreateInProgressVolumeGroup") ReviewCompleted EventType = EventType(api.ResourceStatus_REVIEW_COMPLETED.String()) ReviewFailed EventType = EventType(api.ResourceStatus_REVIEW_FAILED.String()) ReviewInProgressLogicalVolume EventType = EventType("ReviewInProgressLogicalVolume") ReviewInProgressPhysicalVolume EventType = EventType("ReviewInProgressPhysicalVolume") ReviewInProgressVolumeGroup EventType = EventType("ReviewInProgressVolumeGroup") CreateComplete StateType = StateType("CreateComplete") CreateFail StateType = StateType("CreateFail") CreateLogicalVolume StateType = StateType("CreateLogicalVolume") CreatePhysicalVolume StateType = StateType("CreatePhysicalVolume") CreateVolumeGroup StateType = StateType("CreateVolumeGroup") ReviewComplete StateType = StateType("ReviewComplete") ReviewFail StateType = StateType("ReviewFail") ReviewLogicalVolume StateType = StateType("ReviewLogicalVolume") ReviewPhysicalVolume StateType = StateType("ReviewPhysicalVolume") ReviewVolumeGroup StateType = StateType("ReviewVolumeGroup") )
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface {
Execute(eventCtx EventContent) EventType
}
type CreateLogicalVolumeAction ¶
type CreateLogicalVolumeAction struct{}
func (*CreateLogicalVolumeAction) Execute ¶
func (a *CreateLogicalVolumeAction) Execute(eventCtx EventContent) EventType
type CreatePhysicalVolumeAction ¶
type CreatePhysicalVolumeAction struct{}
func (*CreatePhysicalVolumeAction) Execute ¶
func (a *CreatePhysicalVolumeAction) Execute(eventCtx EventContent) EventType
type CreateVolumeGroupAction ¶
type CreateVolumeGroupAction struct{}
func (*CreateVolumeGroupAction) Execute ¶
func (a *CreateVolumeGroupAction) Execute(eventCtx EventContent) EventType
type DiskImageStore ¶
type DiskImageStore struct {
Path string
}
DiskImageStore : used for storing images to disk
func NewDiskImageStore ¶
func NewDiskImageStore(path string) (*DiskImageStore, error)
NewDiskImageStore : creates a new disk image store
func (*DiskImageStore) Save ¶
func (s *DiskImageStore) Save(options ImageStoreSaveOptions) error
Save : save handler for disk image store
type EventContent ¶
type EventContent interface{}
type ImageStore ¶
type ImageStore interface {
Save(options ImageStoreSaveOptions) (*api.Image, error)
}
ImageStore : base image store implementation
type ImageStoreSaveOptions ¶
type ImageStoreSaveOptions struct { Data bytes.Buffer Description string File string Name string Size int64 }
ImageStoreSaveOptions : generic configuration for store save handler
type Manager ¶
type Manager struct { ErrorC chan error State *StateMachine // contains filtered or unexported fields }
Manager : defines manager service
type ReviewLogicalVolumeAction ¶
type ReviewLogicalVolumeAction struct{}
func (*ReviewLogicalVolumeAction) Execute ¶
func (a *ReviewLogicalVolumeAction) Execute(eventCtx EventContent) EventType
type ReviewPhysicalVolumeAction ¶
type ReviewPhysicalVolumeAction struct{}
func (*ReviewPhysicalVolumeAction) Execute ¶
func (a *ReviewPhysicalVolumeAction) Execute(eventCtx EventContent) EventType
type ReviewVolumeGroupAction ¶
type ReviewVolumeGroupAction struct{}
func (*ReviewVolumeGroupAction) Execute ¶
func (a *ReviewVolumeGroupAction) Execute(eventCtx EventContent) EventType
type StateCreateFailAction ¶
type StateCreateFailAction struct{}
func (*StateCreateFailAction) Execute ¶
func (a *StateCreateFailAction) Execute(eventCtx EventContent) EventType
type StateEventContext ¶
type StateEventContext struct { Manager *Manager ResourceID uuid.UUID ResourceType api.ResourceType }
type StateMachine ¶
type StateMachine struct { Current StateType Previous StateType States States // contains filtered or unexported fields }
func (*StateMachine) SendEvent ¶
func (s *StateMachine) SendEvent(event EventType, eventCtx EventContent)
type StateReviewCompleteAction ¶
type StateReviewCompleteAction struct{}
func (*StateReviewCompleteAction) Execute ¶
func (a *StateReviewCompleteAction) Execute(eventCtx EventContent) EventType
type StateReviewFailAction ¶
type StateReviewFailAction struct{}
func (*StateReviewFailAction) Execute ¶
func (a *StateReviewFailAction) Execute(eventCtx EventContent) EventType
Click to show internal directories.
Click to hide internal directories.