coordinator

package
v0.0.0-...-23becbe Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableState          = "coordinator_states"
	TableHistory        = "coordinator_state_histories"
	TableActionResponse = "coordinator_action_responses"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentData

type CurrentData struct {
	PID       string `gorm:"column:pid"`
	RequestID string `gorm:"column:request_id"`
	State     string
	Action    string
	Event     string
	Payload   string
	Error     string
}

type CurrentPersistent

type CurrentPersistent struct {
	domain.BasePersistent
	domain.BaseEntity
	CurrentData
	EventState string
}

func NewCurrentPersistent

func NewCurrentPersistent(event string, data lifecycle.Current) CurrentPersistent

type HistoryNodePersistent

type HistoryNodePersistent struct {
	domain.BasePersistent
	domain.BaseEntity
	CurrentData
	NodeUID string `gorm:"column:node_uid"`
}

func NewHistoryNodePersistent

func NewHistoryNodePersistent(data lifecycle.HistoryNode) HistoryNodePersistent

type MetaResponse

type MetaResponse struct {
	RequestID            string    `json:"requestID" gorm:"request_id"`
	PID                  string    `json:"pid" gorm:"column:pid"`
	ProjectUID           string    `json:"projectUID" gorm:"column:project_uid"`
	ProjectName          string    `json:"projectName" gorm:"project_name"`
	ActivityName         string    `json:"activityName" gorm:"activity_name"`
	State                string    `json:"state"`
	Event                string    `json:"event"`
	ActionName           string    `json:"actionName" gorm:"column:action_name"`
	ActionType           string    `json:"actionType" gorm:"column:action_type"`
	InternalResponseTime string    `json:"internalResponseTime" gorm:"column:internal_response_time"`
	ResponseSignature    string    `json:"responseSignature" gorm:"column:response_signature"`
	BuildAt              time.Time `json:"buildAt" gorm:"column:build_at"`
}

type MetaResponsePersistent

type MetaResponsePersistent struct {
	domain.BasePersistent
	domain.BaseEntity
	MetaResponse
}

func NewMetaResponsePersistent

func NewMetaResponsePersistent(data runner.MetaResponse) MetaResponsePersistent

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *gorm.DB) *Repository

func (*Repository) SaveActionResponse

func (r *Repository) SaveActionResponse(ctx context.Context, payload runner.MetaResponse) error

func (*Repository) SaveHistory

func (r *Repository) SaveHistory(ctx context.Context, record lifecycle.HistoryNode) error

func (*Repository) SaveState

func (r *Repository) SaveState(ctx context.Context, eventState string, payload lifecycle.Current) error

Jump to

Keyboard shortcuts

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