model

package
v0.0.0-...-64decf6 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventExecutorOnline indicates that an executor has gone online.
	EventExecutorOnline = ExecutorStatusChangeType("online")
	// EventExecutorOffline indicates that an executor has gone offline.
	EventExecutorOffline = ExecutorStatusChangeType("offline")
)
View Source
const (
	JobTypeInvalid = JobType(iota)
	// job type for job manager, only for inner use
	JobTypeJobManager
	JobTypeCVSDemo
	JobTypeDM
	JobTypeCDC
	JobTypeFakeJob
)

Define job type

View Source
const (
	JobTypeNameInvalid    = "Invalid"
	JobTypeNameJobManager = "JobManager"
	JobTypeNameCVSDemo    = "CVSDemo"
	JobTypeNameDM         = "DM"
	JobTypeNameCDC        = "CDC"
	JobTypeNameFakeJob    = "FakeJob"
)

Define job type name

Variables

View Source
var ExecutorStatusNameMapping = map[ExecutorStatus]string{
	Initing:      "initializing",
	Running:      "running",
	Disconnected: "disconnected",
	Tombstone:    "tombstone",
}

ExecutorStatusNameMapping maps from executor status to human-readable string

Functions

This section is empty.

Types

type DeployNodeID

type DeployNodeID string

DeployNodeID means the identify of a node

type ExecutorID

type ExecutorID = DeployNodeID

ExecutorID is an alias for executor when NodeType is NodeTypeExecutor.

type ExecutorStatus

type ExecutorStatus int32

ExecutorStatus describes the node aliveness status of an executor

const (
	Initing ExecutorStatus = iota
	Running
	Disconnected
	Tombstone
)

All ExecutorStatus

func (ExecutorStatus) String

func (s ExecutorStatus) String() string

String implements fmt.Stringer

type ExecutorStatusChange

type ExecutorStatusChange struct {
	ID   ExecutorID
	Tp   ExecutorStatusChangeType
	Addr string
}

ExecutorStatusChange describes an event where an executor's status has changed.

type ExecutorStatusChangeType

type ExecutorStatusChangeType string

ExecutorStatusChangeType describes the types of ExecutorStatusChange.

type JobID

type JobID = string

JobID is the unique identifier of a job

type JobType

type JobType int32

JobType is the type of a type, like `CVSDEMO`, `DM`, `CDC`.

func GetJobTypeByName

func GetJobTypeByName(name string) (JobType, bool)

GetJobTypeByName get JobType by readable job name

func (JobType) String

func (j JobType) String() string

Jump to

Keyboard shortcuts

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