embed

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 50 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBaseClusterTests

func RunBaseClusterTests(
	fn func(Cluster),
) error

RunBaseClusterTests starting an integration test for a 1 log, 1tn, 3cn base cluster is very slow due to the amount of time it takes to start a cluster (10-20s) when there are a very large number of test cases. So for some special cases that don't need to be restarted, a basicCluster can be reused to run the test cases. in summary, the basic cluster will only be started once!

Types

type Cluster

type Cluster interface {
	ID() uint64
	Start() error
	Close() error
	StartNewCNService(n int) error
	GetService(sid string) (ServiceOperator, error)
	GetCNService(index int) (ServiceOperator, error)
	ForeachServices(fn func(ServiceOperator) bool)
}

Cluster is the mo cluster interface

func NewCluster

func NewCluster(
	opts ...Option,
) (Cluster, error)

type Option

type Option func(*cluster)

func WithCNCount

func WithCNCount(
	cn int,
) Option

func WithConfigs

func WithConfigs(
	configs []string,
) Option

func WithPreStart

func WithPreStart(
	f func(ServiceOperator),
) Option

func WithTesting

func WithTesting() Option

type ServiceConfig

type ServiceConfig struct {
	// DataDir data dir
	DataDir string `toml:"data-dir"`
	// Log log config
	Log logutil.LogConfig `toml:"log"`
	// ServiceType service type, select the corresponding configuration to start the
	// service according to the service type. [CN|TN|LOG|PROXY]
	ServiceType string `toml:"service-type"`
	// FileServices the config for file services
	FileServices []fileservice.Config `toml:"fileservice"`
	// HAKeeperClient hakeeper client config
	HAKeeperClient logservice.HAKeeperClientConfig `toml:"hakeeper-client"`
	// TN tn service config
	TN_please_use_getTNServiceConfig *tnservice.Config `toml:"tn"`
	TNCompatible                     *tnservice.Config `toml:"dn"` // for old config files compatibility
	// LogService is the config for log service
	LogService logservice.Config `toml:"logservice"`
	// CN cn service config
	CN cnservice.Config `toml:"cn"`
	// ProxyConfig is the config of proxy.
	ProxyConfig proxy.Config `toml:"proxy"`
	// PythonUdfServerConfig is the config of python udf server
	PythonUdfServerConfig pythonservice.Config `toml:"python-udf-server"`
	// Observability parameters for the metric/trace
	Observability config.ObservabilityParameters `toml:"observability"`

	// Clock txn clock type. [LOCAL|HLC]. Default is LOCAL.
	Clock struct {
		// Backend clock backend implementation. [LOCAL|HLC], default LOCAL.
		Backend string `toml:"source"`
		// MaxClockOffset max clock offset between two nodes. Default is 500ms.
		// Only valid when enable-check-clock-offset is true
		MaxClockOffset tomlutil.Duration `toml:"max-clock-offset"`
		// EnableCheckMaxClockOffset enable local clock offset checker
		EnableCheckMaxClockOffset bool `toml:"enable-check-clock-offset"`
	}

	// Limit limit configuration
	Limit struct {
		// Memory memory usage limit, see mpool for details
		Memory tomlutil.ByteSize `toml:"memory"`
	}

	// MetaCache the config for objectio metacache
	MetaCache objectio.CacheConfig `toml:"metacache"`

	// IsStandalone denotes the matrixone is running in standalone mode
	// For the tn does not boost an independent queryservice.
	// cn,tn shares the same queryservice in standalone mode.
	// Under distributed deploy mode, cn,tn are independent os process.
	// they have their own queryservice.
	IsStandalone bool

	// Goroutine goroutine config
	Goroutine goroutine.Config `toml:"goroutine"`

	// Malloc default config
	Malloc malloc.Config `toml:"malloc"`
}

ServiceConfig mo-service configuration

type ServiceOperator

type ServiceOperator interface {
	ServiceID() string
	ServiceType() metadata.ServiceType
	Index() int
	Adjust(func(*ServiceConfig))
	RawService() interface{}
	GetServiceConfig() ServiceConfig

	Start() error
	Close() error
}

Jump to

Keyboard shortcuts

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