Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ProbePort is the default port that the probe(s) will listen on to // publish reports. ProbePort = 4030 // AppPort is the default port that the app will use for its HTTP server. AppPort = 4040 )
var ( // MaxBackoff is the maximum time between connect retries. // It's exported so it's externally configurable. MaxBackoff = 1 * time.Minute )
Functions ¶
This section is empty.
Types ¶
type Collector ¶
Collector describes anything that can have addresses added and removed, and which produces reports that represent aggregate reports from all collected addresses.
type HandshakeRequest ¶ added in v0.3.0
type HandshakeRequest struct {
ID string
}
HandshakeRequest contains the unique ID of the connecting app.
type TCPPublisher ¶
type TCPPublisher struct {
// contains filtered or unexported fields
}
TCPPublisher is a Publisher implementation which uses TCP and gob encoding.
func NewTCPPublisher ¶
func NewTCPPublisher(listenAddress string) (*TCPPublisher, error)
NewTCPPublisher listens for connections on listenAddress. Only one client is accepted at a time; other clients are accepted, but disconnected right away. Reports published via publish() will be written to the connected client, if any. Gentle shutdown of the returned publisher via close().
func (*TCPPublisher) Close ¶
func (p *TCPPublisher) Close()
Close stops a TCPPublisher and closes the socket.
func (*TCPPublisher) Publish ¶
func (p *TCPPublisher) Publish(msg report.Report)
Publish sens a Report to the client, if any.