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 router.PeerName, addr address.Address) error
- func (n *Nameserver) ContainerDied(ident string)
- func (n *Nameserver) ContainerStarted(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, dockerCli *docker.Client)
- 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 SortableEntries
- 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 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 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) 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) 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, 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) (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()
type SortableEntries ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.