consul

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadCheck = 1 << iota
	WriteCheck
	ListCheck
	DeleteCheck
	StdCheck = ReadCheck | WriteCheck | ListCheck | DeleteCheck
)

TODO: this needs to be modified, like vault checks. see pull request #28 https://github.com/ExpediaGroup/vsync/pull/28

Variables

View Source
var ErrCastPathData = fmt.Errorf("type cast errors on data from path")
View Source
var ErrConnection = fmt.Errorf("consul connection refused")
View Source
var ErrInitialize = fmt.Errorf("cannot initialize consul client")
View Source
var ErrInvalidPath = fmt.Errorf("invalid consul path")
View Source
var ErrInvalidToken = fmt.Errorf("check token permission")

Functions

This section is empty.

Types

type Client

type Client struct {
	*api.Client
	Dc      string
	Address string
}

func NewClient

func NewClient(address string, dc string) (*Client, error)

func (*Client) IsSyncPathInitialized

func (c *Client) IsSyncPathInitialized(path string) (bool, error)

func (*Client) SyncPathChecks

func (c *Client) SyncPathChecks(path string, checks int) error

SyncPathChecks checks if path not present, else create along with permissions to create, read, list, delete

Jump to

Keyboard shortcuts

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