mnemosyned

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestDaemon

func TestDaemon(t *testing.T, opts TestDaemonOpts) (net.Addr, io.Closer)

TestDaemon returns address of fully started in-memory daemon and closer to close it.

Types

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

Daemon represents single daemon instance that can be run.

func NewDaemon

func NewDaemon(opts *DaemonOpts) (*Daemon, error)

NewDaemon allocates new daemon instance using given options.

func (*Daemon) Addr

func (d *Daemon) Addr() net.Addr

Addr returns net.Addr that rpc service is listening on.

func (*Daemon) Close

func (d *Daemon) Close() (err error)

Close implements io.Closer interface.

func (*Daemon) Run

func (d *Daemon) Run() (err error)

Run starts daemon and all services within.

type DaemonOpts

type DaemonOpts struct {
	Version             string
	IsTest              bool
	SessionTTL          time.Duration
	SessionTTC          time.Duration
	TLS                 bool
	TLSCertFile         string
	TLSKeyFile          string
	Storage             string
	PostgresAddress     string
	PostgresTable       string
	PostgresSchema      string
	Logger              *zap.Logger
	RPCOptions          []grpc.ServerOption
	RPCListener         net.Listener
	DebugListener       net.Listener
	ClusterListenAddr   string
	ClusterSeeds        []string
	TracingAgentAddress string
}

DaemonOpts it is constructor argument that can be passed to the NewDaemon constructor function.

type TestDaemonOpts

type TestDaemonOpts struct {
	StoragePostgresAddress string
}

TestDaemonOpts set of options that are used with TestDaemon instance.

Jump to

Keyboard shortcuts

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