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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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