service

package
v0.0.0-...-e8da0a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StepStatusPreparing = iota + 1
	StepStatusProcessing
	StepStatusSuccess
	StepStatusFail
)

Variables

This section is empty.

Functions

func ConvertServiceListServerToClient

func ConvertServiceListServerToClient(server []*apiclient.ServicePollingResponseV1_Data) ([]*Service, []*UpdateService)

func ConvertServiceStepUpdateClientToServer

func ConvertServiceStepUpdateClientToServer(client *UpdateService) *apiclient.UpdateServiceStatusRequestV1

Types

type Object

type Object = map[string]interface{}

type Result

type Result struct {
	Body string
	Err  error
}

type Service

type Service 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.Flow
	// Inputs      map[string]interface{}
	Result Result
}

func (*Service) GetCreatedTime

func (s *Service) GetCreatedTime() time.Time

func (*Service) GetId

func (s *Service) GetId() string

func (*Service) GetPriority

func (s *Service) GetPriority() int

type ServiceStatus

type ServiceStatus int32
const (
	ServiceStatusPreparing ServiceStatus = iota + 1
	ServiceStatusStart
	ServiceStatusProcessing
	ServiceStatusSuccess
	ServiceStatusFailed
)

func (ServiceStatus) String

func (s ServiceStatus) String() string

type StepCommand

type StepCommand struct {
	Method string
	Args   map[string]interface{}
}

type StepStatus

type StepStatus int32

func (StepStatus) String

func (s StepStatus) String() string

type UpdateService

type UpdateService struct {
	Id        string
	StepCount int
	Sequence  int
	Status    StepStatus
	Result    Result
	Started   time.Time
	Ended     time.Time
}

func CreateUpdateService

func CreateUpdateService(id string, seqCount, seq int, status StepStatus, result Result, start, end time.Time) *UpdateService

func (*UpdateService) GetEnded

func (s *UpdateService) GetEnded() time.Time

func (*UpdateService) GetId

func (s *UpdateService) GetId() string

func (*UpdateService) GetResult

func (s *UpdateService) GetResult() Result

func (*UpdateService) GetSequence

func (s *UpdateService) GetSequence() int

func (*UpdateService) GetStarted

func (s *UpdateService) GetStarted() time.Time

func (*UpdateService) GetStatus

func (s *UpdateService) GetStatus() StepStatus

func (*UpdateService) GetStepCount

func (s *UpdateService) GetStepCount() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL