functionManager

package
v0.0.0-...-0cead13 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FunctionSetType is the type of function set
	GroupOfFunctions funcSetType = iota
	SingleFunction
	IdealFunction
)

Variables

This section is empty.

Functions

func NewFuncRuntimeDetails

func NewFuncRuntimeDetails(id uint16, funcSet functionSet) *funcRuntimeDetails

func NewFunctionManager

func NewFunctionManager(id string, cluster *gocb.Cluster, clusterSettings *common.ClusterSettings,
	observer notifier.Observer, interrupt InterruptHandler,
	systemResourceDetails SystemResourceDetails,
	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(instanceID string, fType funcSetType, id string, funcSetConfig config, clusterSettings *common.ClusterSettings, appCallback processManager.AppLogFunction, systemConfig serverConfig.SystemConfig) functionSet

func NewIdealFunctionSet

func NewIdealFunctionSet(id uint16, interruptHandler functionHandler.InterruptHandler, funcHandler functionHandler.FunctionHandler) 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, statsType common.StatsType) *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(version string)
	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)
}

type SystemResourceDetails

type SystemResourceDetails interface {
	MemRequiredPerThread(application.KeyspaceInfo) float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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