server

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 67 Imported by: 5 modules, 12 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

This section is empty.

Types

type BackendStorageTransformFn added in v1.2.0

type BackendStorageTransformFn func(
	storage.Storage,
	m3.Options,
	instrument.Options,
) (storage.Storage, error)

BackendStorageTransformFn is a transformation function for backend storage.

type CustomHandlerOptionsFn added in v1.2.0

type CustomHandlerOptionsFn func(instrument.Options) (options.CustomHandlerOptions, error)

CustomHandlerOptionsFn is a factory for options.CustomHandlerOptions.

type CustomTSDBOptionsFn added in v0.15.0

type CustomTSDBOptionsFn func(m3.Options, instrument.Options) (m3.Options, error)

CustomTSDBOptionsFn is a transformation function for TSDB Options.

type InstrumentOptionsReady added in v0.15.0

type InstrumentOptionsReady struct {
	InstrumentOptions instrument.Options
	MetricsReporters  instrument.MetricsConfigurationReporters
}

InstrumentOptionsReady is a set of instrument options and metric reporters that is delivered when constructed.

type RunOptions

type RunOptions struct {
	// Config is an alternate way to provide configuration and will be used
	// instead of parsing ConfigFile if ConfigFile is not specified.
	Config config.Configuration

	// DBConfig is the local M3DB config when running embedded.
	DBConfig *dbconfig.DBConfiguration

	// DBClient is the local M3DB client when running embedded.
	DBClient <-chan client.Client

	// ClusterClient is the local M3DB cluster client when running embedded.
	ClusterClient <-chan clusterclient.Client

	// InterruptCh is a programmatic interrupt channel to supply to
	// interrupt and shutdown the server.
	InterruptCh <-chan error

	// ShutdownCh is an optional channel to supply if interested in receiving
	// a notification that the server has shutdown.
	ShutdownCh chan<- struct{}

	// ListenerCh is a programmatic channel to receive the server listener
	// on once it has opened.
	ListenerCh chan<- net.Listener

	// M3MsgListenerCh is a programmatic channel to receive the M3Msg server
	// listener on once it has opened.
	M3MsgListenerCh chan<- net.Listener

	// DownsamplerReadyCh is a programmatic channel to receive the downsampler
	// ready signal once it is open.
	DownsamplerReadyCh chan<- struct{}

	// LocalSessionReadyCh is a programmatic channel to receive the
	// local DB session ready signal once it is open.
	LocalSessionReadyCh chan struct{}

	// InstrumentOptionsReadyCh is a programmatic channel to receive a set of
	// instrument options and metric reporters that is delivered when
	// constructed.
	InstrumentOptionsReadyCh chan<- InstrumentOptionsReady

	// ClockOptions is an optional clock to use instead of the default one.
	ClockOptions clock.Options

	// CustomHandlerOptions creates custom handler options.
	CustomHandlerOptions CustomHandlerOptionsFn

	// CustomPromQLParseFunction is a custom PromQL parsing function.
	CustomPromQLParseFunction promql.ParseFn

	// ApplyCustomTSDBOptions is a transform that allows for custom tsdb options.
	ApplyCustomTSDBOptions CustomTSDBOptionsFn

	// BackendStorageTransform is a custom backend storage transform.
	BackendStorageTransform BackendStorageTransformFn

	// AggregatorServerOptions are server options for aggregator.
	AggregatorServerOptions []server.AdminOption

	// CustomBuildTags are additional tags to be added to the instrument build
	// reporter.
	CustomBuildTags map[string]string

	// ApplyCustomRuleStore provides an option to swap the backend used for the rule stores.
	ApplyCustomRuleStore downsample.CustomRuleStoreFn
}

RunOptions provides options for running the server with backwards compatibility if only solely adding fields.

type RunResult added in v1.2.0

type RunResult struct {
	MultiProcessRun               bool
	MultiProcessIsParentCleanExit bool
}

RunResult returns metadata about the process run.

func Run

func Run(runOpts RunOptions) RunResult

Run runs the server programmatically given a filename for the configuration file.

Jump to

Keyboard shortcuts

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