client

package
v0.0.0-...-0fa83aa Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consul

type Consul interface {
	KVTransact(datacenter string, operations []KVOperation) ([]KVTransactionResult, []KVTransactionError, error)
	IsVerbSupported(verb string) bool
}

Consul represents the consul client.

func NewConsul

func NewConsul() (Consul, error)

NewConsul produces a new consul client

type KVOperation

type KVOperation struct {
	Verb  string          `json:"verb"`
	Key   string          `json:"key"`
	Value json.RawMessage `json:"value"`
}

KVOperation represents a consul key-value operation.

type KVTransactionError

type KVTransactionError struct {
	Index int    `json:"index"`
	Error string `json:"error"`
}

KVTransactionError represents a key-value transaction error.

type KVTransactionResult

type KVTransactionResult struct {
	Index int             `json:"index"`
	Key   string          `json:"key"`
	Value json.RawMessage `json:"value"`
}

KVTransactionResult represents a key-value transaction result.

Jump to

Keyboard shortcuts

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