opentofu/vendor/github.com/hashicorp/consul/api
Paul Hinze 6fe2703665 Vendor all dependencies w/ Godep
* Remove `make updatedeps` from Travis build. We'll follow up with more
   specific plans around dependency updating in subsequent PRs.
 * Update all `make` targets to set `GO15VENDOREXPERIMENT=1` and to
   filter out `/vendor/` from `./...` where appropriate.
 * Temporarily remove `vet` from the `make test` target until we can
   figure out how to get it to not vet `vendor/`. (Initial
   experimentation failed to yield the proper incantation.)

Everything is pinned to current master, with the exception of:

 * Azure/azure-sdk-for-go which is pinned before the breaking change today
 * aws/aws-sdk-go which is pinned to the most recent tag

The documentation still needs to be updated, which we can do in a follow
up PR. The goal here is to unblock release.
2016-01-29 15:08:48 -06:00
..
acl_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
acl.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
agent_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
agent.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
api_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
api.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
catalog_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
catalog.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
coordinate_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
coordinate.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
event_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
event.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
health_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
health.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
kv_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
kv.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
lock_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
lock.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
prepared_query_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
prepared_query.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
raw.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
README.md Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
semaphore_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
semaphore.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
session_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
session.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
status_test.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00
status.go Vendor all dependencies w/ Godep 2016-01-29 15:08:48 -06:00

Consul API client

This package provides the api package which attempts to provide programmatic access to the full Consul API.

Currently, all of the Consul APIs included in version 0.6.0 are supported.

Documentation

The full documentation is available on Godoc

Usage

Below is an example of using the Consul client:

// Get a new client
client, err := api.NewClient(api.DefaultConfig())
if err != nil {
    panic(err)
}

// Get a handle to the KV API
kv := client.KV()

// PUT a new KV pair
p := &api.KVPair{Key: "foo", Value: []byte("test")}
_, err = kv.Put(p, nil)
if err != nil {
    panic(err)
}

// Lookup the pair
pair, _, err := kv.Get("foo", nil)
if err != nil {
    panic(err)
}
fmt.Printf("KV: %v", pair)