Documentation ¶
Index ¶
- Constants
- type CaseInsensitive
- type CaseSensitive
- type DNSServer
- type Entries
- type Entry
- type EntryStatus
- type GossipData
- type Nameserver
- func (n *Nameserver) AddEntry(hostname, containerid string, origin mesh.PeerName, addr address.Address)
- func (n *Nameserver) ContainerDestroyed(ident string)
- func (n *Nameserver) ContainerDied(ident string)
- func (n *Nameserver) ContainerStarted(ident string)
- func (n *Nameserver) Delete(hostname, containerid, ipStr string, ip address.Address)
- func (n *Nameserver) Gossip() mesh.GossipData
- func (n *Nameserver) HandleHTTP(router *mux.Router, dockerCli *docker.Client)
- func (n *Nameserver) Lookup(hostname string) []address.Address
- func (n *Nameserver) OnGossip(msg []byte) (mesh.GossipData, error)
- func (n *Nameserver) OnGossipBroadcast(_ mesh.PeerName, msg []byte) (mesh.GossipData, error)
- func (n *Nameserver) OnGossipUnicast(sender mesh.PeerName, msg []byte) error
- func (n *Nameserver) PeerGone(peer mesh.PeerName)
- func (n *Nameserver) ReverseLookup(ip address.Address) (string, error)
- func (n *Nameserver) SetGossip(gossip mesh.Gossip)
- func (n *Nameserver) Start()
- func (n *Nameserver) Stop()
- type SortableEntries
- type Status
- type Upstream
Constants ¶
View Source
const ( DefaultListenAddress = "0.0.0.0:53" DefaultTTL = 1 DefaultClientTimeout = 5 * time.Second )
View Source
const (
// Used by prog/weaver/main.go and proxy/create_container_interceptor.go
DefaultDomain = "weave.local."
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaseInsensitive ¶ added in v1.2.0
type CaseInsensitive Entries
func (CaseInsensitive) Get ¶ added in v1.2.0
func (es CaseInsensitive) Get(i int) Entry
func (CaseInsensitive) Len ¶ added in v1.2.0
func (es CaseInsensitive) Len() int
... but we store entries in a case insensitive order.
func (CaseInsensitive) Less ¶ added in v1.2.0
func (es CaseInsensitive) Less(i, j int) bool
func (CaseInsensitive) Swap ¶ added in v1.2.0
func (es CaseInsensitive) Swap(i, j int)
type CaseSensitive ¶ added in v1.2.0
type CaseSensitive Entries
func (CaseSensitive) Get ¶ added in v1.2.0
func (es CaseSensitive) Get(i int) Entry
func (CaseSensitive) Len ¶ added in v1.2.0
func (es CaseSensitive) Len() int
Gossip messages are sorted in a case sensitive order...
func (CaseSensitive) Less ¶ added in v1.2.0
func (es CaseSensitive) Less(i, j int) bool
func (CaseSensitive) Swap ¶ added in v1.2.0
func (es CaseSensitive) Swap(i, j int)
type DNSServer ¶ added in v0.10.0
type DNSServer struct {
// contains filtered or unexported fields
}
func NewDNSServer ¶ added in v0.10.0
func (*DNSServer) ActivateAndServe ¶ added in v1.0.0
func (d *DNSServer) ActivateAndServe()
type Entry ¶ added in v1.1.0
type EntryStatus ¶ added in v1.1.0
type GossipData ¶ added in v1.1.0
func (*GossipData) Decode ¶ added in v1.2.1
func (g *GossipData) Decode(msg []byte) error
func (*GossipData) Encode ¶ added in v1.1.0
func (g *GossipData) Encode() [][]byte
func (*GossipData) Merge ¶ added in v1.1.0
func (g *GossipData) Merge(o mesh.GossipData) mesh.GossipData
type Nameserver ¶ added in v1.1.0
Nameserver: gossip-based, in memory nameserver. - Holds a sorted list of (hostname, peer, container id, ip) tuples for the whole cluster. - This list is gossiped & merged around the cluser. - Lookup-by-hostname are O(nlogn), and return a (copy of a) slice of the entries - Update is O(n) for now
func (*Nameserver) ContainerDestroyed ¶ added in v1.5.0
func (n *Nameserver) ContainerDestroyed(ident string)
func (*Nameserver) ContainerDied ¶ added in v1.1.0
func (n *Nameserver) ContainerDied(ident string)
func (*Nameserver) ContainerStarted ¶ added in v1.2.0
func (n *Nameserver) ContainerStarted(ident string)
func (*Nameserver) Delete ¶ added in v1.1.0
func (n *Nameserver) Delete(hostname, containerid, ipStr string, ip address.Address)
func (*Nameserver) Gossip ¶ added in v1.1.0
func (n *Nameserver) Gossip() mesh.GossipData
func (*Nameserver) HandleHTTP ¶ added in v1.1.0
func (n *Nameserver) HandleHTTP(router *mux.Router, dockerCli *docker.Client)
func (*Nameserver) Lookup ¶ added in v1.1.0
func (n *Nameserver) Lookup(hostname string) []address.Address
func (*Nameserver) OnGossip ¶ added in v1.1.0
func (n *Nameserver) OnGossip(msg []byte) (mesh.GossipData, error)
merge received data into state and return "everything new I've just learnt", or nil if nothing in the received data was new
func (*Nameserver) OnGossipBroadcast ¶ added in v1.1.0
func (n *Nameserver) OnGossipBroadcast(_ mesh.PeerName, msg []byte) (mesh.GossipData, error)
merge received data into state and return a representation of the received data, for further propagation
func (*Nameserver) OnGossipUnicast ¶ added in v1.1.0
func (n *Nameserver) OnGossipUnicast(sender mesh.PeerName, msg []byte) error
func (*Nameserver) PeerGone ¶ added in v1.1.0
func (n *Nameserver) PeerGone(peer mesh.PeerName)
func (*Nameserver) ReverseLookup ¶ added in v1.1.0
func (n *Nameserver) ReverseLookup(ip address.Address) (string, error)
func (*Nameserver) SetGossip ¶ added in v1.1.0
func (n *Nameserver) SetGossip(gossip mesh.Gossip)
func (*Nameserver) Start ¶ added in v1.1.0
func (n *Nameserver) Start()
func (*Nameserver) Stop ¶ added in v1.1.0
func (n *Nameserver) Stop()
type SortableEntries ¶ added in v1.2.0
type Status ¶ added in v1.1.0
type Status struct { Domain string Upstream []string Address string TTL uint32 Entries []EntryStatus }
func NewStatus ¶ added in v1.1.0
func NewStatus(ns *Nameserver, dnsServer *DNSServer) *Status
type Upstream ¶ added in v1.6.0
type Upstream interface {
Config() *dns.ClientConfig
}
func NewUpstream ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.