mocks

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package mocks implements an embedded etcdv3 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 etcdv3 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