etcd

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package etcd implemets a hugot store over an etcd datastore

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a hugot Storer that is backed by etcd v3

func New

func New(cli *clientv3.Client) *Store

New creates anew etcdv3 store

func (*Store) Get

func (s *Store) Get(key []string) (string, bool, error)

Get retries a key from the store

func (*Store) List

func (s *Store) List(path []string) ([][]string, error)

List all items under the provided prefix

func (*Store) Set

func (s *Store) Set(path []string, value string) error

Set a key in the store

func (*Store) Unset

func (s *Store) Unset(path []string) error

Unset a key in the store

Jump to

Keyboard shortcuts

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