Documentation ¶
Overview ¶
Package agent provides access to an Auklet agent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataPointServer ¶
type DataPointServer struct {
// contains filtered or unexported fields
}
DataPointServer reads a stream of data point JSON messages.
func NewDataPointServer ¶
func NewDataPointServer(in io.Reader) *DataPointServer
NewDataPointServer returns a new DataPointServer.
func (*DataPointServer) Output ¶
func (s *DataPointServer) Output() <-chan Message
Output returns s's output stream.
type Merger ¶
type Merger struct {
// contains filtered or unexported fields
}
Merger is a MessageSource that merges multiple other MessageSources into one stream.
func Merge ¶
func Merge(src ...MessageSource) Merger
Merge returns a Merger that merges the streams of each element in src.
type Message ¶
type Message struct { Type string `json:"type"` Data json.RawMessage `json:"data"` }
Message represents messages that can be received by a Server, and thus, would be sent by an agent.
type MessageSource ¶
type MessageSource interface {
Output() <-chan Message
}
MessageSource is a source of messages.
type PeriodicRequester ¶
type PeriodicRequester struct {
// contains filtered or unexported fields
}
PeriodicRequester periodically sends emission requests over a connection.
func NewPeriodicRequester ¶
func NewPeriodicRequester(conn io.Writer, done <-chan struct{}, conf <-chan int) PeriodicRequester
NewPeriodicRequester creates a PeriodicRequester that sends requests over conn. When done closes, the requester closes its output and terminates.
func (PeriodicRequester) Output ¶
func (r PeriodicRequester) Output() <-chan broker.Message
Output returns r's output channel, which might generate an error message.
type Server ¶
type Server struct { // Done closes when the Server gets EOF. Done chan struct{} // contains filtered or unexported fields }
Server provides a connection server for an Auklet agent.