etcdtest

package
v0.21.64 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Overview

Package etcdtest implements an easy startup script to start a local etcd instance for testing purpose.

Index

Constants

This section is empty.

Variables

View Source
var Urls []string

Functions

func DeleteAll

func DeleteAll() error

Deletes the 'routes' directory from etcd with the prefix '/skippertest'.

func DeleteAllFrom

func DeleteAllFrom(prefix string) error

Deletes the 'routes' directory with the specified prefix.

func DeleteData

func DeleteData(key string) error

Deletes a route from etcd with the prefix '/skippertest'.

func DeleteDataFrom

func DeleteDataFrom(prefix, key string) error

Deletes a route from etcd with the specified prefix.

func GetNode

func GetNode(key string) (string, error)

Loads an etcd route node from the prefix '/skippertest'.

func GetNodeFrom

func GetNodeFrom(prefix, key string) (string, error)

Loads an etcd route node from the specified prefix.

func PutData

func PutData(key, data string) error

Saves a route in etcd with the prefix '/skippertest'.

func PutDataTo

func PutDataTo(prefix, key, data string) error

Saves a route in etcd with the specified prefix.

func PutDataToTTL added in v0.16.78

func PutDataToTTL(prefix, key, data string, ttl int) error

Saves a route with TTL in etcd with the specified prefix.

func ResetData

func ResetData() error

Deletes all routes in etcd and creates a test route under the prefix '/skippertest'.

func ResetDataIn

func ResetDataIn(prefix string) error

Deletes all routes in etcd and creates a test route under the specified prefix.

func Start

func Start() error

Starts an etcd server.

func StartProjectRoot added in v0.11.89

func StartProjectRoot(projectRoot string) error

StartProjectRoot starts an etcd server. If projectRoot is not empty, then it checks if the .bin/etcd binary exists, and uses that instead of the one in the path.

func Stop

func Stop() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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