Documentation ¶
Index ¶
- Constants
- type DNSServer
- type Entries
- type Entry
- type EntryStatus
- type GossipData
- type Nameserver
- func (n *Nameserver) AddEntry(hostname, containerid string, origin router.PeerName, addr address.Address) error
- func (n *Nameserver) ContainerDied(ident string)
- func (n *Nameserver) Delete(hostname, containerid, ipStr string, ip address.Address) error
- func (n *Nameserver) Gossip() router.GossipData
- func (n *Nameserver) HandleHTTP(router *mux.Router)
- func (n *Nameserver) Lookup(hostname string) []address.Address
- func (n *Nameserver) OnGossip(msg []byte) (router.GossipData, error)
- func (n *Nameserver) OnGossipBroadcast(_ router.PeerName, msg []byte) (router.GossipData, error)
- func (n *Nameserver) OnGossipUnicast(sender router.PeerName, msg []byte) error
- func (n *Nameserver) PeerGone(peer *router.Peer)
- func (n *Nameserver) ReverseLookup(ip address.Address) (string, error)
- func (n *Nameserver) SetGossip(gossip router.Gossip)
- func (n *Nameserver) Start()
- func (n *Nameserver) Stop()
- type Status
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 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) Encode ¶ added in v1.1.0
func (g *GossipData) Encode() [][]byte
func (*GossipData) Merge ¶ added in v1.1.0
func (g *GossipData) Merge(o router.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) ContainerDied ¶ added in v1.1.0
func (n *Nameserver) ContainerDied(ident string)
func (*Nameserver) Delete ¶ added in v1.1.0
func (n *Nameserver) Delete(hostname, containerid, ipStr string, ip address.Address) error
func (*Nameserver) Gossip ¶ added in v1.1.0
func (n *Nameserver) Gossip() router.GossipData
func (*Nameserver) HandleHTTP ¶ added in v1.1.0
func (n *Nameserver) HandleHTTP(router *mux.Router)
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) (router.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(_ router.PeerName, msg []byte) (router.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 router.PeerName, msg []byte) error
func (*Nameserver) PeerGone ¶ added in v1.1.0
func (n *Nameserver) PeerGone(peer *router.Peer)
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 router.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()
Click to show internal directories.
Click to hide internal directories.