supervisor2

package
v0.0.0-...-31abfad Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OldEventingVersionPriority = service.Priority(0)
	ReserverdPriority          = service.Priority(-1)
	LeaderPriority             = service.Priority(-2)
	NewEventingVersionPriority = service.Priority(-3)
	NewlyAddedPriority         = service.Priority(-4)
)

Variables

This section is empty.

Functions

func NewCursorRegistry

func NewCursorRegistry(limit uint8) *cursorRegistry

func PrintTrackerMap

func PrintTrackerMap(tracker *cursorTracker, level int)

Types

type Callbacks

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

type DoneCallback

type DoneCallback func(err error, cancel <-chan struct{})

type ProgressCallback

type ProgressCallback func(progress float64, cancel <-chan struct{})

type Service

type Service interface {
	InitServiceManagerWithSup(sup Supervisor)

	GetNodeInfo() (*service.NodeInfo, error)
	Shutdown() error

	GetTaskList(rev service.Revision, cancel service.Cancel) (*service.TaskList, error)
	CancelTask(id string, rev service.Revision) error

	GetCurrentTopology(rev service.Revision, cancel service.Cancel) (*service.Topology, error)

	PrepareTopologyChange(change service.TopologyChange) error
	StartTopologyChange(change service.TopologyChange) error
}

func NewServiceManager

func NewServiceManager(distributor distributor.Distributor, nodeUUID string) Service

type Supervisor

type Supervisor interface {
	GetGlobalRebalanceProgress(version string) (float64, error)
	SyncPhaseDone() bool
}

type Supervisor2

type Supervisor2 interface {
	GetStats(application.AppLocation) (*common.Stats, error)
	ClearStats(application.AppLocation) error

	CreateInitCheckpoint(*application.FunctionDetails) (bool, error)
	CompileHandler(*application.FunctionDetails) (*common.CompileStatus, error)
	DebuggerOp(op common.DebuggerOp, funcDetails *application.FunctionDetails, value interface{}) (string, error)

	GetApplicationLog(appLocation application.AppLocation, size int64) ([]string, error)
	GetInsights(appLocation application.AppLocation) *common.Insight
	RebalanceProgress(vbMapVersion string, appLocation application.AppLocation) *common.AppRebalanceProgress
	GetOwnershipDetails() string

	StateChangeInterupt(seq uint32, appLocation application.AppLocation)
	StopCalledInterupt(seq uint32, msg common.LifecycleMsg)
	FailStateInterrupt(seq uint32, appLocation application.AppLocation, msg common.LifecycleMsg)

	PopulateID(keyspace application.Keyspace) (keyID application.KeyspaceInfo, err error)

	LifeCycleOperationAllowed() bool

	GetCollectionObject(funcDetails application.Keyspace) (*gocb.Collection, error)
}

func StartSupervisor

func StartSupervisor(ctx context.Context, cs *common.ClusterSettings) (Supervisor2, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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