etcd

package
v0.0.0-...-94b2ea0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: MIT Imports: 7 Imported by: 74

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

Jump to

Keyboard shortcuts

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