cetcd

package module
v0.0.0-...-d3e3bdb Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

README

cetcd

A consul "personality" for etcd. Point a consul client at cetcd to dispatch the operations on an etcd cluster.

Usage

Forwarding consul requests on :8500 to an etcd server listening on localhost:2379:

go install github.com/coreos/cetcd/cmd/cetcd
cetcd -etcd localhost:2379  -consuladdr 0.0.0.0:8500

Cross-checking consul emulation with a native consul server on 127.0.0.1:8501:

cetcd -etcd localhost:2379  -consuladdr 0.0.0.0:8500 -oracle 127.0.0.1:8501

Simple testing with curl:

goreman start
curl -X PUT -d 'test' http://127.0.0.1:8500/v1/kv/testkey?flags=42
curl http://127.0.0.1:8500/v1/kv/testkey

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKVHandler

func NewKVHandler(cli *etcd.Client) http.Handler

get http handler for kv

func NewSessionHandler

func NewSessionHandler(cli *etcd.Client) http.Handler

func NewTxnHandler

func NewTxnHandler(cli *etcd.Client) http.Handler

Types

type Xchk

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

func NewXchk

func NewXchk(oracle url.URL) *Xchk

func (*Xchk) Handler

func (xchk *Xchk) Handler(candidate http.Handler) http.Handler

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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