etcd

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package etcd contains a helper to start an embedded etcd server.

Index

Constants

View Source
const (

	// MaxEtcdStartAttempts is the max number of start attempts made before it fails.
	MaxEtcdStartAttempts = 3
)

Variables

This section is empty.

Functions

func StartEtcd

func StartEtcd() (e *embed.Etcd, c *clientv3.Client, cleanup func(), err error)

StartEtcd returns a started, ready to use embedded etcd, along with a client and a cleanup function (that must be defer-called). There's no need to defer-close etcd of client, cleanup closes both.

A temp directory and random ports are used to setup etcd.

Types

This section is empty.

Jump to

Keyboard shortcuts

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