Documentation
¶
Index ¶
- Constants
- func ConvertServiceStepUpdateAgentToManager(agent ServiceUpdateInterface) *servicev4.HttpReq_AgentServiceUpdate
- type FailedConvertService
- type Flow
- type FlowStep
- type FlowStepInput
- type Result
- type ServiceInterface
- type ServiceStatus
- type ServiceUpdateInterface
- type ServiceV1
- type ServiceV2
- type Step
- type StepCommand
- type StepStatus
- type UpdateServiceV1
- type UpdateServiceV2
- type Version
Constants ¶
View Source
const ( StepStatusPreparing = iota + 1 StepStatusProcessing StepStatusSuccess StepStatusFail )
Variables ¶
This section is empty.
Functions ¶
func ConvertServiceStepUpdateAgentToManager ¶
func ConvertServiceStepUpdateAgentToManager(agent ServiceUpdateInterface) *servicev4.HttpReq_AgentServiceUpdate
Types ¶
type FailedConvertService ¶
type FailedConvertService struct {
Data servicev4.HttpRsp_AgentServicePolling
Err error
}
func ConvertServiceListManagerToAgent ¶
func ConvertServiceListManagerToAgent(manager []servicev4.HttpRsp_AgentServicePolling) (map[string]ServiceInterface, []FailedConvertService)
type FlowStep ¶
type FlowStep struct {
Id string `json:"$id"`
Command string `json:"$command"`
Inputs FlowStepInput `json:"inputs,omitempty"`
Outputs interface{} `json:"outputs,omitempty"`
Error error `json:"error,omitempty"`
}
func (*FlowStep) UnmarshalJSON ¶
type FlowStepInput ¶
type FlowStepInput struct {
// contains filtered or unexported fields
}
func (*FlowStepInput) FindReplaceDeferredInputsFrom ¶
func (f *FlowStepInput) FindReplaceDeferredInputsFrom(in map[string]interface{}) error
func (*FlowStepInput) FindReplacePassedInputsFrom ¶
func (f *FlowStepInput) FindReplacePassedInputsFrom(in map[string]interface{}) error
func (*FlowStepInput) GetInputs ¶
func (f *FlowStepInput) GetInputs() map[string]interface{}
type ServiceInterface ¶
type ServiceStatus ¶
type ServiceStatus int32
const ( ServiceStatusPreparing ServiceStatus = iota + 1 ServiceStatusStart ServiceStatusProcessing ServiceStatusSuccess ServiceStatusFailed )
func (ServiceStatus) String ¶
func (s ServiceStatus) String() string
type ServiceUpdateInterface ¶
type ServiceUpdateInterface interface {
Version() Version
GetId() string
GetStepCount() int
GetSequence() int
GetStatus() StepStatus
}
func CreateUpdateService ¶
func CreateUpdateService(version Version, id string, seqCount, seq int, status StepStatus, result string, start, end time.Time) ServiceUpdateInterface
type ServiceV1 ¶
type ServiceV1 struct {
Id string
Name string
ClusterId string
Priority int
CreatedTime time.Time
StartTime time.Time
UpdateTime time.Time
EndTime time.Time
Status ServiceStatus
Steps []Step
Result Result
}
func (*ServiceV1) GetCreatedTime ¶
func (*ServiceV1) GetPriority ¶
type ServiceV2 ¶
type ServiceV2 struct {
Id string
Name string
ClusterId string
Priority int
CreatedTime time.Time
StartTime time.Time
UpdateTime time.Time
EndTime time.Time
Status ServiceStatus
Flow Flow
// Inputs map[string]interface{}
Result Result
}
func (*ServiceV2) GetCreatedTime ¶
func (*ServiceV2) GetPriority ¶
type Step ¶
type Step struct {
Id string
ParentId string
Command *StepCommand
StartTime time.Time
EndTime time.Time
Status StepStatus
ResultFilter string
Result Result
}
type StepCommand ¶
type StepStatus ¶
type StepStatus int32
type UpdateServiceV1 ¶
type UpdateServiceV1 struct {
Uuid string
StepCount int
Sequence int
Status StepStatus
Result string
Started time.Time
Ended time.Time
}
func (*UpdateServiceV1) GetId ¶
func (s *UpdateServiceV1) GetId() string
func (*UpdateServiceV1) GetSequence ¶
func (s *UpdateServiceV1) GetSequence() int
func (*UpdateServiceV1) GetStatus ¶
func (s *UpdateServiceV1) GetStatus() StepStatus
func (*UpdateServiceV1) GetStepCount ¶
func (s *UpdateServiceV1) GetStepCount() int
func (*UpdateServiceV1) Version ¶
func (s *UpdateServiceV1) Version() Version
type UpdateServiceV2 ¶
type UpdateServiceV2 struct {
Id string
StepCount int
Sequence int
Status StepStatus
Result string
Started time.Time
Ended time.Time
}
func (*UpdateServiceV2) GetId ¶
func (s *UpdateServiceV2) GetId() string
func (*UpdateServiceV2) GetSequence ¶
func (s *UpdateServiceV2) GetSequence() int
func (*UpdateServiceV2) GetStatus ¶
func (s *UpdateServiceV2) GetStatus() StepStatus
func (*UpdateServiceV2) GetStepCount ¶
func (s *UpdateServiceV2) GetStepCount() int
func (*UpdateServiceV2) Version ¶
func (s *UpdateServiceV2) Version() Version
Click to show internal directories.
Click to hide internal directories.