Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunBaseClusterTests ¶
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 ¶
type Option ¶
type Option func(*cluster)
func WithCNCount ¶
func WithConfigs ¶
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
}
Click to show internal directories.
Click to hide internal directories.