idetcd

package
v0.0.0-...-dce9a02 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package idetcd implements a plugin that allows nodes to identify itself in a cluster without domain name collsion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Idetcd

type Idetcd struct {
	Next   plugin.Handler
	Ctx    context.Context
	Client *etcdcv3.Client

	ID int
	// contains filtered or unexported fields
}

Idetcd is a plugin which can configure the cluster without collison.

func (*Idetcd) Name

func (idetcd *Idetcd) Name() string

Name implements the Handler interface.

func (*Idetcd) ServeDNS

func (idetcd *Idetcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the plugin.Handler interface

type Record

type Record struct {
	Ipv4 string `json:"ipv4,omitempty"`
	Ipv6 string `json:"ipv6,omitempty"`
	Port string `json:"port,omitempty"`
}

Record is the format of record that idetcd saves in the etcd.

Jump to

Keyboard shortcuts

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