functionManager

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFuncDetails

func NewFuncDetails(id uint16) *funcDetails

func NewFunctionManager

func NewFunctionManager(id string, cluster *gocb.Cluster, clusterSettings *common.ClusterSettings,
	observer notifier.Observer, interrupt InterruptHandler,
	ownershipRoutine common.OwnershipRoutine,
	serverConfig serverConfig.ServerConfig,
	systemConfig serverConfig.SystemConfig,
	cursorCheckpointHandler functionHandler.CursorCheckpointHandler,
	broadcaster common.Broadcaster) *functionManager

func NewFunctionNameCache

func NewFunctionNameCache(ctx context.Context, id string, observer notifier.Observer, interrupt InterruptHandler) *funcCache

func NewFunctionSet

func NewFunctionSet(id string, funcSetConfig config, clusterSettings *common.ClusterSettings, appCallback processManager.AppLogFunction, systemConfig serverConfig.SystemConfig) functionSet

func NewKeyspaceObserverWithContext

func NewKeyspaceObserverWithContext(ctx context.Context, id string, observer notifier.Observer, interrupt InterruptHandler) *keyspaceObserver

Types

type FunctionManager

type FunctionManager interface {
	// Stats operation
	GetStats(appLocation application.AppLocation) *common.Stats
	GetInsight(appLocation application.AppLocation) *common.Insight
	GetApplicationLog(appLocation application.AppLocation, size int64) ([]string, error)
	RebalanceProgress(version string, appLocation application.AppLocation, rebalanceProgress *common.AppRebalanceProgress)
	ResetStats(appLocation application.AppLocation)

	// Lifecycle operations
	DeployFunction(fd *application.FunctionDetails)
	PauseFunction(fd *application.FunctionDetails)
	StopFunction(fd *application.FunctionDetails)
	RemoveFunction(fd *application.FunctionDetails) int

	// Notification for changes
	NotifyOwnershipChange()
	NotifyGlobalConfigChange()
	NotifyTlsChanges(cluster *gocb.Cluster)

	// For debugger
	TrapEventOp(trapEvent functionHandler.TrapEventOp, appLocation application.AppLocation, value interface{}) error

	// Close the function manager
	CloseFunctionManager()
}

type InterruptHandler

type InterruptHandler interface {
	// Interrupt called when state changed request done
	StateChangeInterupt(seq uint32, appLocation application.AppLocation)

	// Undeploy due to internal changes
	StopCalledInterupt(seq uint32, msg common.LifecycleMsg)

	// Revert to previous app state
	FailStateInterrupt(seq uint32, appLocation application.AppLocation, msg common.LifecycleMsg)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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