Registry / networking / hashicorp-consul-sdk

hashicorp-consul-sdk

JSON →
library0.18.1gogounverified

Provides the Consul API client and related utilities for interacting with HashiCorp Consul.

go get github.com/hashicorp/consul/sdk
INSTALL
IMPORT
SIG · HASHICORP-CONSUL-S
H
hashicorp-consul-sdk
networkinggov0.18.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sdk
github.com/hashicorp/consul/sdk

Creates a Consul client and lists agent members.

package main import ( "fmt" "github.com/hashicorp/consul/sdk" ) func main() { client, err := sdk.NewClient(sdk.DefaultConfig()) if err != nil { panic(err) } members, _ := client.Agent().Members(false) fmt.Println(members) }
Debug
Known issues
gotchaThe sdk package is separate from the main consul module; ensure you import the correct path.
fix
Use github.com/hashicorp/consul/sdk instead of github.com/hashicorp/consul.
affects: >=0.1.0
Upgrade
Version history
0.18.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
hashicorp-consul-sdk — go get hashicorp-consul-sdk · libregistry