Documentation ¶
Overview ¶
Package veracity is an event-sourced Dogma engine with a focus on horizontal scalability and "shardability" of data.
Index ¶
- Variables
- type Engine
- type EngineOption
- func WithGRPCAdvertiseAddresses(addresses ...string) EngineOption
- func WithGRPCDialOptions(options ...grpc.DialOption) EngineOption
- func WithGRPCListenAddress(addr string) EngineOption
- func WithGRPCServerOptions(options ...grpc.ServerOption) EngineOption
- func WithJournalStore(s journal.BinaryStore) EngineOption
- func WithKeyValueStore(s kv.BinaryStore) EngineOption
- func WithLogger(l *slog.Logger) EngineOption
- func WithMetricProvider(p metric.MeterProvider) EngineOption
- func WithNodeID(id *uuidpb.UUID) EngineOption
- func WithOptionsFromEnvironment() EngineOption
- func WithTracerProvider(p trace.TracerProvider) EngineOption
Constants ¶
This section is empty.
Variables ¶
var FerriteRegistry = engineconfig.FerriteRegistry
FerriteRegistry is a registry of the environment variables used by Veracity.
It can be used with the [ferrite] package.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine hosts a Dogma application.
func New ¶
func New(app dogma.Application, options ...EngineOption) *Engine
New returns an engine that hosts the given application.
func (*Engine) ExecuteCommand ¶
func (e *Engine) ExecuteCommand( ctx context.Context, c dogma.Command, options ...dogma.ExecuteCommandOption, ) error
ExecuteCommand enqueues a command for execution.
It may be called without calling Engine.Run. In this mode of operation, the engine acts solely as a router that forwards messages to worker nodes.
type EngineOption ¶
type EngineOption func(*engineconfig.Config)
An EngineOption configures the behavior of an Engine.
func WithGRPCAdvertiseAddresses ¶
func WithGRPCAdvertiseAddresses(addresses ...string) EngineOption
WithGRPCAdvertiseAddresses is an EngineOption that sets the network addresses at which the engine's internal gRPC server can be reached by other nodes in the cluster.
func WithGRPCDialOptions ¶
func WithGRPCDialOptions(options ...grpc.DialOption) EngineOption
WithGRPCDialOptions is an EngineOption that sets the gRPC options to use when connecting to other nodes in the cluster.
func WithGRPCListenAddress ¶
func WithGRPCListenAddress(addr string) EngineOption
WithGRPCListenAddress is an EngineOption that sets the network address for the engine's internal gRPC server.
func WithGRPCServerOptions ¶
func WithGRPCServerOptions(options ...grpc.ServerOption) EngineOption
WithGRPCServerOptions is an EngineOption that sets the gRPC options to use when starting the internal gRPC server.
func WithJournalStore ¶
func WithJournalStore(s journal.BinaryStore) EngineOption
WithJournalStore is an EngineOption that sets the journal store used by the engine.
func WithKeyValueStore ¶
func WithKeyValueStore(s kv.BinaryStore) EngineOption
WithKeyValueStore is an EngineOption that sets the key/value store used by the engine.
func WithLogger ¶
func WithLogger(l *slog.Logger) EngineOption
WithLogger is an EngineOption that setes the logger used by the engine.
func WithMetricProvider ¶
func WithMetricProvider(p metric.MeterProvider) EngineOption
WithMetricProvider is an EngineOption that sets the OpenTelemetry meter provider used by the engine.
func WithNodeID ¶
func WithNodeID(id *uuidpb.UUID) EngineOption
WithNodeID is an EngineOption that sets the node ID of the engine.
func WithOptionsFromEnvironment ¶
func WithOptionsFromEnvironment() EngineOption
WithOptionsFromEnvironment is an engine option that configures the engine using options specified via environment variables.
Any explicit options passed to New take precedence over options from the environment.
func WithTracerProvider ¶
func WithTracerProvider(p trace.TracerProvider) EngineOption
WithTracerProvider is an EngineOption that sets the OpenTelemetry tracer provider used by the engine.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
internal
|
|
cluster
Package cluster represents the nodes within a Veracity cluster.
|
Package cluster represents the nodes within a Veracity cluster. |
engineconfig
Package engineconfig builds configuration for an engine.
|
Package engineconfig builds configuration for an engine. |
eventstream
Package eventstream is the "event stream sub-system".
|
Package eventstream is the "event stream sub-system". |
eventstream/internal/eventstreamjournal
Package eventstreamjournal encapsulates the integration subsystem's use of journal related persistence.
|
Package eventstreamjournal encapsulates the integration subsystem's use of journal related persistence. |
fsm
Package fsm contains tools for implementing simple state machines.
|
Package fsm contains tools for implementing simple state machines. |
integration
Package integration dispatches commands to integration message handlers.
|
Package integration dispatches commands to integration message handlers. |
integration/internal/integrationjournal
Package integrationjournal encapsulates the integration subsystem's use of journal related persistence.
|
Package integrationjournal encapsulates the integration subsystem's use of journal related persistence. |
integration/internal/integrationkv
Package integrationkv encapsulates the integration subsystem's use of key/value related persistence.
|
Package integrationkv encapsulates the integration subsystem's use of key/value related persistence. |
messaging
Package messaging provides higher-order messaging primitives.
|
Package messaging provides higher-order messaging primitives. |
optimistic
Package optimistic contains a set of "lock-free" data types that use optimistic concurrency control to allow atomic mutations.
|
Package optimistic contains a set of "lock-free" data types that use optimistic concurrency control to allow atomic mutations. |
signaling
Package signaling provides higher-order signaling primitives.
|
Package signaling provides higher-order signaling primitives. |
telemetry
Package telemetry is Veracity's internal API for observability/instrumentation.
|
Package telemetry is Veracity's internal API for observability/instrumentation. |
test
Package test contains internal testing utilities.
|
Package test contains internal testing utilities. |