servicemanager

package
v0.0.0-...-2416616 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	METRICS_PREFIX      = "eventing_"
	APPROX_METRIC_COUNT = 27
	APPROX_METRIC_SIZE  = 50
	PASSWORD_MASK       = "*****"
)

Variables

This section is empty.

Functions

func CheckAndGetQueryParam

func CheckAndGetQueryParam(params map[string][]string, key string) (string, *response.RuntimeInfo)

func CheckIfAppKeyspacesAreSame

func CheckIfAppKeyspacesAreSame(app1, app2 application) bool

func ConstructKeyspace

func ConstructKeyspace(keyspace string) common.Keyspace

func GetNodesHostname

func GetNodesHostname(data map[string]interface{}) []string

GetNodesHostname returns hostnames of all nodes with alternate Addresses if any

func NewState

func NewState() state

Types

type AppStore

type AppStore interface {
	GetFromLocation(location string) (*application, error)
	Get(identity common.Identity) (*application, error)
	ListApps(funcScope *common.FunctionScope) []*application
	GetActiveAppsInternalLocation() []string

	Set(identity common.Identity, app *application) error
	Delete(identity common.Identity) error
}

func NewAppStore

func NewAppStore() AppStore

type ServiceMgr

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

ServiceMgr implements cbauth_service interface

func NewServiceMgr

func NewServiceMgr(config util.Config, rebalanceRunning bool,
	superSup common.EventingSuperSup) *ServiceMgr

NewServiceMgr creates handle for ServiceMgr, which implements cbauth service.Manager

func (*ServiceMgr) AppStats

func (m *ServiceMgr) AppStats(cred cbauth.Creds, identity common.Identity, fullStats bool) (stats, *response.RuntimeInfo)

func (*ServiceMgr) CancelTask

func (m *ServiceMgr) CancelTask(id string, rev service.Revision) error

CancelTask callback for cbauth service.Manager

func (*ServiceMgr) CheckLifeCycleOpsDuringRebalance

func (m *ServiceMgr) CheckLifeCycleOpsDuringRebalance() bool

func (*ServiceMgr) GetCurrentTopology

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

GetCurrentTopology callback for cbauth service.Manager

func (*ServiceMgr) GetFailoverStatus

func (m *ServiceMgr) GetFailoverStatus() (failoverNotifTs int64, changeId string)

func (*ServiceMgr) GetFunctionId

func (m *ServiceMgr) GetFunctionId(id common.Identity) (uint32, error)

func (*ServiceMgr) GetNodeInfo

func (m *ServiceMgr) GetNodeInfo() (*service.NodeInfo, error)

GetNodeInfo callback for cbauth service.Manager

func (*ServiceMgr) GetTaskList

func (m *ServiceMgr) GetTaskList(rev service.Revision, cancel service.Cancel) (*service.TaskList, error)

GetTaskList callback for cbauth service.Manager

func (*ServiceMgr) MaybeEnforceFunctionSchema

func (m *ServiceMgr) MaybeEnforceFunctionSchema(app application) *response.RuntimeInfo

func (*ServiceMgr) MaybeEnforceSettingsSchema

func (m *ServiceMgr) MaybeEnforceSettingsSchema(data []byte) *response.RuntimeInfo

func (*ServiceMgr) NotifySupervisorWaitCh

func (m *ServiceMgr) NotifySupervisorWaitCh()

block until servicemgr's first callback fires

func (*ServiceMgr) PrepareTopologyChange

func (m *ServiceMgr) PrepareTopologyChange(change service.TopologyChange) error

PrepareTopologyChange callback for cbauth service.Manager

func (*ServiceMgr) ResetFailoverStatus

func (m *ServiceMgr) ResetFailoverStatus()

func (*ServiceMgr) SetFailoverStatus

func (m *ServiceMgr) SetFailoverStatus(changeId string)

func (*ServiceMgr) Shutdown

func (m *ServiceMgr) Shutdown() error

Shutdown callback for cbauth service.Manager

func (*ServiceMgr) StartTopologyChange

func (m *ServiceMgr) StartTopologyChange(change service.TopologyChange) error

StartTopologyChange callback for cbauth service.Manager

func (*ServiceMgr) UpdateBucketGraphFromMetakv

func (m *ServiceMgr) UpdateBucketGraphFromMetakv(functionName string) error

type Stats

type Stats interface {
	AppStats(cred cbauth.Creds, identity common.Identity, fullStats bool) (stats, *response.RuntimeInfo)
}

type UserPermissions

type UserPermissions struct {
	FuncScope     []common.Keyspace `json:"func_scope"`
	ReadPerm      []common.Keyspace `json:"read_permission"`
	WritePerm     []common.Keyspace `json:"write_permission"`
	ReadWritePerm []common.Keyspace `json:"read_write_permission"`
	DcpStreamPerm []common.Keyspace `json:"dcp_stream_permission"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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