conduit

package
v0.3.0-nightly.20220413 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 42 Imported by: 1

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

View Source
const (
	DBTypeBadger   = "badger"
	DBTypePostgres = "postgres"
	DBTypeInMemory = "inmemory"
)

Variables

This section is empty.

Functions

func Splash added in v0.2.0

func Splash() string

func Version

func Version(appendOSArch bool) string

Types

type Config

type Config struct {
	DB struct {
		Type   string
		Badger struct {
			Path string
		}
		Postgres struct {
			ConnectionString string
			Table            string
		}
	}

	HTTP struct {
		Address string
	}
	GRPC struct {
		Address string
	}

	Log struct {
		Level  string
		Format string
	}
}

Config holds all configurable values for Conduit.

func (Config) Validate

func (c Config) Validate() error

type Runtime

type Runtime struct {
	Config Config

	DB           database.DB
	Orchestrator *orchestrator.Orchestrator
	// contains filtered or unexported fields
}

Runtime sets up all services for serving and monitoring a Conduit instance.

func NewRuntime

func NewRuntime(cfg Config) (*Runtime, error)

NewRuntime sets up a Runtime instance and primes it for start.

func (*Runtime) Run

func (r *Runtime) Run(ctx context.Context) (err error)

Run initializes all of Conduit's underlying services and starts the GRPC and HTTP APIs. This function blocks until the supplied context is cancelled or one of the services experiences a fatal error.

Jump to

Keyboard shortcuts

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