appclient

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2016 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppClient

type AppClient interface {
	Details() (xfer.Details, error)
	ControlConnection()
	PipeConnection(string, xfer.Pipe)
	PipeClose(string) error
	Publish(r io.Reader) error
	Stop()
}

AppClient is a client to an app for dealing with controls.

func NewAppClient

func NewAppClient(pc ProbeConfig, hostname, target string, control xfer.ControlHandler) (AppClient, error)

NewAppClient makes a new appClient.

type ClientFactory

type ClientFactory func(string, string) (AppClient, error)

ClientFactory is a thing thats makes AppClients

type MultiAppClient

type MultiAppClient interface {
	Set(hostname string, endpoints []string)
	PipeConnection(appID, pipeID string, pipe xfer.Pipe) error
	PipeClose(appID, pipeID string) error
	Stop()
	Publish(io.Reader) error
}

MultiAppClient maintains a set of upstream apps, and ensures we have an AppClient for each one.

func NewMultiAppClient

func NewMultiAppClient(clientFactory ClientFactory) MultiAppClient

NewMultiAppClient creates a new MultiAppClient.

type ProbeConfig

type ProbeConfig struct {
	Token    string
	ProbeID  string
	Insecure bool
}

ProbeConfig contains all the info needed for a probe to do HTTP requests

type Publisher

type Publisher interface {
	Publish(io.Reader) error
	Stop()
}

Publisher is something which can send a stream of data somewhere, probably to a remote collector.

type ReportPublisher

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

A ReportPublisher uses a buffer pool to serialise reports, which it then passes to a publisher

func NewReportPublisher

func NewReportPublisher(publisher Publisher) *ReportPublisher

NewReportPublisher creates a new report publisher

func (*ReportPublisher) Publish

func (p *ReportPublisher) Publish(r report.Report) error

Publish serialises and compresses a report, then passes it to a publisher

type Resolver

type Resolver interface {
	Stop()
}

Resolver is a thing that can be stopped...

func NewStaticResolver

func NewStaticResolver(targets []string, setters ...setter) Resolver

NewStaticResolver periodically resolves the targets, and calls the set function with all the resolved IPs. It explictiy supports targets which resolve to multiple IPs.

Source Files

  • app_client.go
  • multi_client.go
  • probe_config.go
  • report_publisher.go
  • resolver.go

Jump to

Keyboard shortcuts

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