file

package
v0.0.0-...-3371d85 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper around the file client

func New

func New(filepath string) (*Client, error)

New returns a new FileClient The filepath can be a local path to a file or a remote http/https location.

func (*Client) Close

func (c *Client) Close()

Close closes the client connection

func (*Client) GetValues

func (c *Client) GetValues(keys []string) (map[string]string, error)

GetValues returns all key-value pairs from the yaml or json file.

func (*Client) WatchPrefix

func (c *Client) WatchPrefix(ctx context.Context, prefix string, opts ...easyKV.WatchOption) (uint64, error)

WatchPrefix watches the file for changes with fsnotify. Prefix, keys and waitIndex are only here to implement the StoreClient interface. WatchPrefix is only supported for local files. Remote files over http/https arent supported.

Jump to

Keyboard shortcuts

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