etcd

package
v0.0.0-...-f2f2c0d Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDialTimeout      = time.Second * 3
	DefaultSlowTxnTimeToLog = time.Second * 1
	DefaultRequestTimeout   = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdStore

type EtcdStore struct {
	Prefix         string
	HostPath       string
	AuthPath       string
	RoutePath      string
	ServicePath    string
	ServicePrefix  string
	ApiPath        string
	ServerPath     string
	ServiceCfgPath string
	GatewayPath    string
	ConfigPath     string
	// contains filtered or unexported fields
}

func NewStore

func NewStore(addrs []string, prefix string, options map[string]interface{}) (*EtcdStore, error)

func (*EtcdStore) Clean

func (s *EtcdStore) Clean() error

func (*EtcdStore) Client

func (s *EtcdStore) Client() interface{}

func (*EtcdStore) Close

func (s *EtcdStore) Close() error

func (*EtcdStore) GetApi

func (s *EtcdStore) GetApi(service, id string) (*meta.Api, error)

func (*EtcdStore) GetApis

func (s *EtcdStore) GetApis(service string, handler func(item *meta.Api)) error

func (*EtcdStore) GetAuth

func (s *EtcdStore) GetAuth(id string) (*meta.Auth, error)

func (*EtcdStore) GetAuths

func (s *EtcdStore) GetAuths(handler func(item *meta.Auth)) error

func (*EtcdStore) GetGateways

func (s *EtcdStore) GetGateways(handler func(item *meta.Gateway)) error

func (*EtcdStore) GetHost

func (s *EtcdStore) GetHost(id string) (*meta.Host, error)

func (*EtcdStore) GetHosts

func (s *EtcdStore) GetHosts(handler func(item *meta.Host)) error

func (*EtcdStore) GetRoute

func (s *EtcdStore) GetRoute(id string) (*meta.Route, error)

func (*EtcdStore) GetRoutes

func (s *EtcdStore) GetRoutes(handler func(item *meta.Route)) error

func (*EtcdStore) GetServer

func (s *EtcdStore) GetServer(service, id string) (*meta.Server, error)

func (*EtcdStore) GetServers

func (s *EtcdStore) GetServers(service string, handler func(item *meta.Server)) error

func (*EtcdStore) GetService

func (s *EtcdStore) GetService(id string) (*meta.Service, error)

func (*EtcdStore) GetServiceCfg

func (s *EtcdStore) GetServiceCfg(service string) (*meta.ServiceConfig, error)

func (*EtcdStore) GetServices

func (s *EtcdStore) GetServices(handler func(item *meta.Service)) error

func (*EtcdStore) Name

func (s *EtcdStore) Name() string

func (*EtcdStore) PutApi

func (s *EtcdStore) PutApi(service string, api *meta.Api) error

func (*EtcdStore) PutAuth

func (s *EtcdStore) PutAuth(auth *meta.Auth) error

func (*EtcdStore) PutHost

func (s *EtcdStore) PutHost(host *meta.Host) error

func (*EtcdStore) PutRoute

func (s *EtcdStore) PutRoute(route *meta.Route) error

func (*EtcdStore) PutServer

func (s *EtcdStore) PutServer(service string, server *meta.Server) error

func (*EtcdStore) PutService

func (s *EtcdStore) PutService(ser *meta.Service) error

func (*EtcdStore) PutServiceCfg

func (s *EtcdStore) PutServiceCfg(service string, cfg *meta.ServiceConfig) error

func (*EtcdStore) RegistryGateway

func (s *EtcdStore) RegistryGateway(gateway *meta.Gateway, keepAlive time.Duration) error

func (*EtcdStore) RemoveApi

func (s *EtcdStore) RemoveApi(service, id string) error

func (*EtcdStore) RemoveAuth

func (s *EtcdStore) RemoveAuth(id string) error

func (*EtcdStore) RemoveHost

func (s *EtcdStore) RemoveHost(id string) error

func (*EtcdStore) RemoveRoute

func (s *EtcdStore) RemoveRoute(id string) error

func (*EtcdStore) RemoveServer

func (s *EtcdStore) RemoveServer(service, id string) error

func (*EtcdStore) RemoveService

func (s *EtcdStore) RemoveService(service string, cascade bool) error

func (*EtcdStore) RemoveServiceCfg

func (s *EtcdStore) RemoveServiceCfg(service string) error

func (*EtcdStore) Watch

func (s *EtcdStore) Watch(ln meta.EventListener, stopCh <-chan struct{}, waitStop *sync.WaitGroup) error

Jump to

Keyboard shortcuts

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