consul

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package consul implements the KVDB interface based on consul. Code from docker/libkv was leveraged to build parts of this module.

Index

Constants

View Source
const (
	// Name is the name of this kvdb implementation.
	Name = "consul-kv"

	// MaxRenewRetries to renew TTL.
	MaxRenewRetries = 5
)

Variables

This section is empty.

Functions

func New

func New(
	domain string,
	servers []string,
	options map[string]string,
	fatalErrorCb kvdb.FatalErrorCB,
) (kvdb.Kvdb, error)

New constructs a new kvdb.Kvdb given a list of end points to conntect to.

func Version

func Version(url string, kvdbOptions map[string]string) (string, error)

Version returns the supported version for consul api

Types

type CKVPairs

type CKVPairs api.KVPairs

CKVPairs sortable KVPairs

func (CKVPairs) Len

func (c CKVPairs) Len() int

func (CKVPairs) Less

func (c CKVPairs) Less(i, j int) bool

func (CKVPairs) Swap

func (c CKVPairs) Swap(i, j int)

Jump to

Keyboard shortcuts

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