storage

package
v0.3.6-dev45 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReconnectDelay = 10 * time.Second // When reconnecting to the server after connection failure
	DefaultReInitDelay    = 5 * time.Second  // When setting up db schema
	DefaultResendDelay    = 3 * time.Second  // When retrying to read/write
	DefaultMaxRetries     = 10               // How many times retrying read/write
	CACertPath            = "/etc/eventstore/certs/db/ca.crt"
	TLSCertPath           = "/etc/eventstore/certs/db/tls.crt"
	TLSKeyPath            = "/etc/eventstore/certs/db/tls.key"
)

Variables

View Source
var ErrConfigDbNameRequired = errors.New("database name must not be empty")

ErrConfigDbNameRequired is when the config doesn't include a name.

View Source
var ErrConfigUrlRequired = errors.New("url must not be empty")

ErrConfigUrlRequired is when the config doesn't include a name.

Functions

func NewPostgresEventStore

func NewPostgresEventStore(config *postgresStoreConfig) (evs.EventStore, error)

NewPostgresEventStore creates a new EventStore.

func NewPostgresStoreConfig

func NewPostgresStoreConfig(url string) (*postgresStoreConfig, error)

NewRabbitEventBusConfig creates a new RabbitEventBusConfig with defaults.

Types

type TestEnv

type TestEnv struct {
	*test.TestEnv

	Store evs.EventStore
	// contains filtered or unexported fields
}

func NewTestEnvWithParent

func NewTestEnvWithParent(parent *test.TestEnv) (*TestEnv, error)

func (*TestEnv) ClearStore

func (env *TestEnv) ClearStore(ctx context.Context)

func (TestEnv) ConfigureTLS

func (conf TestEnv) ConfigureTLS() error

ConfigureTLS adds the configuration for TLS secured connection/auth

func (*TestEnv) Shutdown

func (env *TestEnv) Shutdown() error

func (TestEnv) Validate

func (conf TestEnv) Validate() error

Validate validates the configuration

Jump to

Keyboard shortcuts

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