engineconfig

package
v0.0.0-...-48a8f37 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package engineconfig builds configuration for an engine.

Index

Constants

This section is empty.

Variables

View Source
var FerriteRegistry = ferrite.NewRegistry(
	"dogmatiq.veracity",
	"Veracity",
	ferrite.WithDocumentationURL("https://github.com/dogmatiq/veracity#readme"),
)

FerriteRegistry is a registry of the environment variables used by Veracity.

Functions

This section is empty.

Types

type Config

type Config struct {
	UseEnv    bool
	SiteID    *identitypb.Identity
	NodeID    *uuidpb.UUID
	Telemetry *telemetry.Provider
	Tasks     []func(context.Context) error

	Persistence struct {
		Journals  journal.BinaryStore
		Keyspaces kv.BinaryStore
	}

	GRPC struct {
		DialOptions        []grpc.DialOption
		ServerOptions      []grpc.ServerOption
		ListenAddress      string
		AdvertiseAddresses []string
	}

	Application struct {
		Executors map[reflect.Type]dogma.CommandExecutor
	}
}

Config encapsulates the configuration of a [veracity.Engine], built by applying [veracity.EngineOption] functions, and visiting the configkit.RichApplication that represents the Dogma application that the engine hosts.

func New

func New[Option ~func(*Config)](
	app dogma.Application,
	options []Option,
) Config

New returns a new configuration for a [veracity.Engine] that hosts the given Dogma application.

Jump to

Keyboard shortcuts

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