etcd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ACLKeyFormat - Format for a ACL's key in a KV Store
	ACLKeyFormat = "/%s/acls/%s/acl"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLKey

type ACLKey string

ACLKey - Points to a stored ACL

func GenACLKey

func GenACLKey(key string) ACLKey

GenACLKey - Generate an ACL Key given etcd's node key

func GenKey

func GenKey(acl *weaver.ACL, pfx string) ACLKey

type ETCDRouteLoader

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

ETCDRouteLoader - To store and modify proxy configuration

func NewRouteLoader

func NewRouteLoader() (*ETCDRouteLoader, error)

func (*ETCDRouteLoader) BootstrapRoutes

func (routeLoader *ETCDRouteLoader) BootstrapRoutes(ctx context.Context, upsertRouteFunc server.UpsertRouteFunc) error

func (*ETCDRouteLoader) DelACL

func (routeLoader *ETCDRouteLoader) DelACL(key ACLKey) error

DelACL - Deletes an ACL given an ACLKey

func (*ETCDRouteLoader) GetACL

func (routeLoader *ETCDRouteLoader) GetACL(key ACLKey) (*weaver.ACL, error)

GetACL - Fetches an ACL given an ACLKey

func (*ETCDRouteLoader) PutACL

func (routeLoader *ETCDRouteLoader) PutACL(acl *weaver.ACL) (ACLKey, error)

PutACL - Upserts a given ACL

func (*ETCDRouteLoader) WatchRoutes

func (routeLoader *ETCDRouteLoader) WatchRoutes(ctx context.Context, upsertRouteFunc server.UpsertRouteFunc, deleteRouteFunc server.DeleteRouteFunc)

Jump to

Keyboard shortcuts

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