etcdstruct

package module
v0.0.0-...-824d913 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2017 License: BSD-3-Clause Imports: 3 Imported by: 11

README

Storing Structured Data in etcd

This is a library for storing structured data in etcd (coreos/etcd).

Documentation

Overview

Package etcdstruct implements tools to retrieve and store structured configuration data in etcd.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEtcdStructs

func DeleteEtcdStructs(ctx context.Context, etcdClient *etcd.Client, etcdKey string, opts ...etcd.OpOption) (int64, error)

func RetrieveEtcdStruct

func RetrieveEtcdStruct(ctx context.Context, etcdClient *etcd.Client, etcdKey string, retrieveInto EtcdStruct) (bool, error)

func RetrieveEtcdStructs

func RetrieveEtcdStructs(ctx context.Context, etcdClient *etcd.Client, tofill func(key []byte) EtcdStruct, seterror func(es EtcdStruct, key []byte), etcdKey string, opts ...etcd.OpOption) error

func UpsertEtcdStruct

func UpsertEtcdStruct(ctx context.Context, etcdClient *etcd.Client, etcdKey string, tok EtcdStruct) error

func UpsertEtcdStructAtomic

func UpsertEtcdStructAtomic(ctx context.Context, etcdClient *etcd.Client, etcdKey string, tok EtcdStruct) (bool, error)

Types

type EtcdStruct

type EtcdStruct interface {
	SetRetrievedRevision(rev int64)
	GetRetrievedRevision() int64
}

EtcdStruct abstracts a structured configuration stored in a single key-value pair in etcd. It is encoded using the MsgPack standard.

Jump to

Keyboard shortcuts

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