config

package
v0.0.0-...-6dd9c4d Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, c *clientv3.Client, k string) ([]byte, error)

etcd wrap api

func GetObject

func GetObject(ctx context.Context, c *clientv3.Client, k string, v interface{}) error

Types

type Client

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

func New

func New(db *clientv3.Client) *Client

func (*Client) CreateConfig

func (c *Client) CreateConfig(ctx context.Context, parent string, config *pb.Config) error

func (*Client) CreateGroup

func (c *Client) CreateGroup(ctx context.Context, ns, group string) error

func (*Client) CreateNamespace

func (c *Client) CreateNamespace(ctx context.Context, ns string) error

func (*Client) DeleteConfig

func (c *Client) DeleteConfig(ctx context.Context, parent, id string) error

func (*Client) GetConfig

func (c *Client) GetConfig(ctx context.Context, parent, id string) (*pb.Config, error)

func (*Client) ListConfigs

func (c *Client) ListConfigs(ctx context.Context, parent string) ([]*pb.Config, error)

func (*Client) ListGroups

func (c *Client) ListGroups(ctx context.Context, ns string) ([]string, error)

func (*Client) ListNamespaces

func (c *Client) ListNamespaces(ctx context.Context) ([]string, error)

func (*Client) PutConfig

func (c *Client) PutConfig(ctx context.Context, parent string, in *pb.Config) error

func (*Client) WatchConfig

func (c *Client) WatchConfig(ctx context.Context, parent, id string, h OnChange)

type OnChange

type OnChange func(*pb.Config)

Jump to

Keyboard shortcuts

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