mocks

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package mocks implements an embedded etcd mock used in unit & integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedded

type Embedded struct {
	ETCD *embed.Etcd
	// contains filtered or unexported fields
}

Embedded ETCD instance with tmp directory for serialized key&vals and etcd client.

func (*Embedded) CleanDs

func (embd *Embedded) CleanDs()

CleanDs deletes all stored key-value pairs.

func (*Embedded) Client

func (embd *Embedded) Client() *clientv3.Client

Client is a getter for embedded ETCD client.

func (*Embedded) Start

func (embd *Embedded) Start(t *testing.T)

Start starts embedded ETCD.

func (*Embedded) Stop

func (embd *Embedded) Stop()

Stop stops the embedded ETCD & cleanups the tmp dir.

Jump to

Keyboard shortcuts

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