mocks

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: Apache-2.0 Imports: 9 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 key-value pair stored

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 ebeded ETCD & cleanups the tmp dir

Jump to

Keyboard shortcuts

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