package etcd

import "github.com/skynetservices/skydns/backends/etcd"

Package etcd provides the default SkyDNS server Backend implementation, which looks up records stored under the `/skydns` key in etcd when queried.

Index

Types

type Backend

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

func NewBackend

func NewBackend(client etcd.KeysAPI, ctx context.Context, config *Config) *Backend

NewBackend returns a new Backend for SkyDNS, backed by etcd.

func (*Backend) Client

func (g *Backend) Client() etcd.KeysAPI

Client exposes the underlying Etcd client (used in tests).

func (*Backend) HasSynced

func (g *Backend) HasSynced() bool

func (*Backend) Records

func (g *Backend) Records(name string, exact bool) ([]msg.Service, error)

func (*Backend) ReverseRecord

func (g *Backend) ReverseRecord(name string) (*msg.Service, error)

type Config

type Config struct {
	Ttl      uint32
	Priority uint16
}

Config represents configuration for the Etcd backend - these values should be taken directly from server.Config

Source Files

etcd.go

Version
v0.0.0-20191015171621-94b2ea0d8bfa (latest)
Published
Oct 15, 2019
Platform
linux/amd64
Imports
7 packages
Last checked
1 month ago

Tools for package owners.