Documentation ¶
Overview ¶
Package conduit wires up everything under the hood of a Conduit instance including metrics, telemetry, logging, and server construction. It should only ever interact with the Orchestrator, never individual services. All of that responsibility should be left to the Orchestrator.
Index ¶
Constants ¶
const ( DBTypeBadger = "badger" DBTypePostgres = "postgres" DBTypeInMemory = "inmemory" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { DB struct { // When Driver is specified it takes precedence over other DB related // fields. Driver database.DB Type string Badger struct { Path string } Postgres struct { ConnectionString string Table string } } API struct { Enabled bool HTTP struct { Address string } GRPC struct { Address string } } Log struct { Level string Format string } Connectors struct { Path string } Pipelines struct { Path string ExitOnError bool } PluginDispenserFactories map[string]builtin.DispenserFactory ProcessorBuilderRegistry *processor.BuilderRegistry }
Config holds all configurable values for Conduit.
func DefaultConfig ¶ added in v0.7.2
func DefaultConfig() Config
type Entrypoint ¶ added in v0.7.2
type Entrypoint struct{}
Entrypoint provides methods related to the Conduit entrypoint (parsing config, managing interrupt signals etc.).
func (*Entrypoint) CancelOnInterrupt ¶ added in v0.7.2
func (*Entrypoint) CancelOnInterrupt(ctx context.Context) context.Context
CancelOnInterrupt returns a context that is canceled when the interrupt signal is received. * After the first signal the function will continue to listen * On the second signal executes a hard exit, without waiting for a graceful shutdown.
func (*Entrypoint) Flags ¶ added in v0.7.2
func (*Entrypoint) Flags(cfg *Config) *flag.FlagSet
Flags returns a flag set that, when parsed, stores the values in the provided config struct.
func (*Entrypoint) ParseConfig ¶ added in v0.7.2
func (e *Entrypoint) ParseConfig(flags *flag.FlagSet)
func (*Entrypoint) Serve ¶ added in v0.7.2
func (e *Entrypoint) Serve(cfg Config)
Serve is the entrypoint for Conduit. It is a convenience function if you want to tweak the Conduit CLI and inject different default values or built-in plugins while retaining the same flags and exit behavior. You can adjust the default values by setting the corresponding field in Config. The default config can be retrieved with DefaultConfig. The config will be populated with values parsed from:
- command line flags (highest priority)
- environment variables
- config file (lowest priority)
func (*Entrypoint) Splash ¶ added in v0.7.2
func (*Entrypoint) Splash() string
type Runtime ¶
type Runtime struct { Config Config DB database.DB Orchestrator *orchestrator.Orchestrator ProvisionService *provisioning.Service // contains filtered or unexported fields }
Runtime sets up all services for serving and monitoring a Conduit instance.
func NewRuntime ¶
NewRuntime sets up a Runtime instance and primes it for start.