serverConfig

package
v0.0.0-...-5951314 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnableCurlJSON                = "enable_curl"
	EnableDebuggerJSON            = "enable_debugger"
	RamQuoteJSON                  = "ram_quota"
	FunctionMaxSizeJSON           = "function_size"
	MetakvMaxDocSizeJSON          = "metakv_max_doc_size"
	HttpRequestTimeoutJSON        = "http_request_timeout"
	EnableLifeCycleOpsJSON        = "enable_lifecycle_ops_during_rebalance"
	ForceCompressJSON             = "force_compress"
	AllowInterbucketRecursionJSON = "allow_interbucket_recursion"
	DeploymentModeJSON            = "deployment_mode"
	CursorLimitJSON               = "cursor_limit"
	NumNodesRunningJSON           = "num_nodes_running"
)
View Source
const (
	FunctionGroup   = "function_group"
	IsolateFunction = "isolate_function"
	HybridMode      = "hybrid_mode"
)
View Source
const (
	MetaKvStore source = iota
	RestApi
)
View Source
const (
	SIGAR_CGROUP_SUPPORTED = 1
	BYTES_TO_MB            = float64(1024 * 1024)
)
View Source
const (
	CurlFeature uint32 = 1 << iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FeatureList
	EnableDebugger            bool           `json:"enable_debugger"`
	RamQuota                  float64        `json:"ram_quota"` // This should be only available for "*" not for the individul functions
	FunctionMaxSize           float64        `json:"function_size"`
	MetakvMaxDocSize          float64        `json:"metakv_max_doc_size"`
	HttpRequestTimeout        time.Duration  `json:"http_request_timeout"`
	EnableLifeCycleOps        bool           `json:"enable_lifecycle_ops_during_rebalance"`
	ForceCompress             bool           `json:"force_compress"`
	AllowInterbucketRecursion bool           `json:"allow_interbucket_recursion"` // This should be only available for "*" not for the individul functions
	DeploymentMode            DeploymentMode `json:"deployment_mode"`
	CursorLimit               float64        `json:"cursor_limit"` // This should be only available for "*" not for the individul functions
	NumNodeRunning            int            `json:"num_nodes_running"`
}

func DefaultConfig

func DefaultConfig() (c *Config)

func (*Config) Clone

func (c *Config) Clone() *Config

func (*Config) MergeConfig

func (c *Config) MergeConfig(configMap map[string]interface{}) (changedSlice []string)

Caller should verify first whether map honors the contraint or not

func (Config) String

func (c Config) String() string

func (*Config) ToBytes

func (c *Config) ToBytes() ([]byte, error)

CHECK: can marshalled can be used for this?

type DeploymentMode

type DeploymentMode string

type FeatureList

type FeatureList struct {
	EnableCurl bool `json:"enable_curl"`
}

func DefaultFeatureList

func DefaultFeatureList() (f FeatureList)

func (FeatureList) Clone

func (f FeatureList) Clone() (cloned FeatureList)

func (FeatureList) GetFeatureMatrix

func (f FeatureList) GetFeatureMatrix() uint32

func (FeatureList) String

func (f FeatureList) String() string

type ProcMemStats

type ProcMemStats struct {
	ProcMemSize   uint64
	ProcMemRSS    uint64
	ProcMemShared uint64
}

type ServerConfig

type ServerConfig interface {
	UpsertServerConfig(payloadSource source, namespace application.KeyspaceInfo, payload []byte) ([]string, []byte, error)
	DeleteSettings(namespace application.KeyspaceInfo)
	GetServerConfig(application.KeyspaceInfo) (application.KeyspaceInfo, *Config)
	WillItChange(addingNamespace application.KeyspaceInfo, namespace application.KeyspaceInfo) bool
	GetAllConfigList() []application.KeyspaceInfo
}

func NewServerConfig

func NewServerConfig() (ServerConfig, error)

type SystemConfig

type SystemConfig interface {
	GetCgroupMemLimit() (float64, bool)
	SystemTotalMem() (float64, error)
	GetControlGroupInfo() *sigarControlGroupInfo
	GetProcessRSS(pid int) (ProcMemStats, error)

	Close()
}

func NewSystemConfig

func NewSystemConfig() (SystemConfig, error)

Jump to

Keyboard shortcuts

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