consul

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 2 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() *consulapi.Client

Client creates a consul client from the consul api (legacy function)

Types

type Consul

type Consul struct {
	Client     interfaces.ConsulClient
	KeyData    consulapi.KVPairs
	KeyDataLen int
	PQData     []*consulapi.PreparedQueryDefinition
	PQDataLen  int
	ACLData    []*consulapi.ACLEntry
	ACLDataLen int
}

Consul struct is used for consul client such as the client and the actual key data.

func NewConsul added in v0.3.0

func NewConsul(client interfaces.ConsulClient) *Consul

NewConsul creates a consul instance with the given client

func (*Consul) ListACLs added in v0.1.6

func (c *Consul) ListACLs() error

ListACLs lists all the ACLs from consul

func (*Consul) ListKeys

func (c *Consul) ListKeys() error

ListKeys lists all the keys from consul with no prefix.

func (*Consul) ListPQs added in v0.1.6

func (c *Consul) ListPQs() error

ListPQs lists all the prepared queries from consul

func (*Consul) RestoreACLs added in v0.3.0

func (c *Consul) RestoreACLs(acls []*consulapi.ACLEntry) error

RestoreACLs restores ACLs to consul

func (*Consul) RestoreKeys added in v0.3.0

func (c *Consul) RestoreKeys(keys consulapi.KVPairs) error

RestoreKeys restores keys to consul

func (*Consul) RestorePQs added in v0.3.0

func (c *Consul) RestorePQs(pqs []*consulapi.PreparedQueryDefinition) error

RestorePQs restores prepared queries to consul

Jump to

Keyboard shortcuts

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