aggregator

package
v0.0.0-...-c2b3dc6 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Subscribe

func Subscribe(p *PeerGraphMap) chan bool

Subscripe to dest, consuming events into PeerGraphMap. We'll return a bool channel which can be used to cancel the subscription

Types

type AggGraphMap

type AggGraphMap struct {
	Graph *graph.NetworkGraph
	// contains filtered or unexported fields
}

This is an aggregated graph of the cluster peerMap is a mapping of peerName -> peergraphmap (which keeps track of what items in the graph where due to the given peer)

func NewAggGraphMap

func NewAggGraphMap() *AggGraphMap

func (*AggGraphMap) AddPeer

func (p *AggGraphMap) AddPeer(peer string)

func (*AggGraphMap) GetPeerMap

func (p *AggGraphMap) GetPeerMap(peer string) *PeerGraphMap

func (*AggGraphMap) RemovePeer

func (p *AggGraphMap) RemovePeer(peer string)

remove all routes associated with a peer

type HTTPApi

type HTTPApi struct {
	// contains filtered or unexported fields
}

func NewHTTPApi

func NewHTTPApi(p *AggGraphMap) *HTTPApi

func (*HTTPApi) Start

func (h *HTTPApi) Start(mux *http.ServeMux)

type PeerGraphMap

type PeerGraphMap struct {
	Name string

	// pointer to the graph for us to use
	Graph *graph.NetworkGraph
	// contains filtered or unexported fields
}

This wraps graph.NetworkGraph to keep track of a given peer's refcounts on the graph, so that when a peer goes away we can cleanup after it

func NewPeerGraphMap

func NewPeerGraphMap(name string, g *graph.NetworkGraph) *PeerGraphMap
func (p *PeerGraphMap) AddLink(l *graph.NetworkLink)

func (*PeerGraphMap) AddNode

func (p *PeerGraphMap) AddNode(n *graph.NetworkNode)

func (*PeerGraphMap) AddRoute

func (p *PeerGraphMap) AddRoute(r *graph.NetworkRoute)
func (p *PeerGraphMap) RemoveLink(l *graph.NetworkLink)

func (*PeerGraphMap) RemoveNode

func (p *PeerGraphMap) RemoveNode(n *graph.NetworkNode)

func (*PeerGraphMap) RemoveRoute

func (p *PeerGraphMap) RemoveRoute(r *graph.NetworkRoute)

func (*PeerGraphMap) Stop

func (p *PeerGraphMap) Stop()

Jump to

Keyboard shortcuts

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