 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package etcd provides the etcd backend middleware.
Index ¶
- type Etcd
- func (e *Etcd) Debug() string
- func (e *Etcd) IsNameError(err error) bool
- func (e *Etcd) Lookup(state request.Request, name string, typ uint16) (*dns.Msg, error)
- func (e *Etcd) Name() string
- func (e *Etcd) Records(name string, exact bool) ([]msg.Service, error)
- func (e *Etcd) Reverse(state request.Request, exact bool, opt middleware.Options) (services, debug []msg.Service, err error)
- func (e *Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)
- func (e *Etcd) Services(state request.Request, exact bool, opt middleware.Options) (services, debug []msg.Service, err error)
- func (e *Etcd) TTL(node *etcdc.Node, serv *msg.Service) uint32
- func (e *Etcd) UpdateStubZones()
 
- type Stub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Etcd ¶
type Etcd struct {
	Next       middleware.Handler
	Zones      []string
	PathPrefix string
	Proxy      proxy.Proxy // Proxy for looking up names during the resolution process
	Client     etcdc.KeysAPI
	Ctx        context.Context
	Inflight   *singleflight.Group
	Stubmap    *map[string]proxy.Proxy // list of proxies for stub resolving.
	Debugging  bool                    // Do we allow debug queries.
	// contains filtered or unexported fields
}
    Etcd is a middleware talks to an etcd cluster.
func (*Etcd) IsNameError ¶
IsNameError implements the ServiceBackend interface.
func (*Etcd) Records ¶
Records looks up records in etcd. If exact is true, it will lookup just this name. This is used when find matches when completing SRV lookups for instance.
func (*Etcd) Reverse ¶
func (e *Etcd) Reverse(state request.Request, exact bool, opt middleware.Options) (services, debug []msg.Service, err error)
Reverse implements the ServiceBackend interface.
func (*Etcd) Services ¶
func (e *Etcd) Services(state request.Request, exact bool, opt middleware.Options) (services, debug []msg.Service, err error)
Services implements the ServiceBackend interface.
func (*Etcd) TTL ¶
TTL returns the smaller of the etcd TTL and the service's TTL. If neither of these are set (have a zero value), a default is used.
func (*Etcd) UpdateStubZones ¶
func (e *Etcd) UpdateStubZones()
UpdateStubZones checks etcd for an update on the stubzones.
 Click to show internal directories. 
   Click to hide internal directories.