fleetspeak

package
v0.0.0-...-6e31670 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package fleetspeak provides functionality for network sensors to communicate with the Emitto service via Fleetspeak.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client contains functionality to send and receive messages to/from a Fleetspeak Client.

func New

func New(socket string) *Client

New initializes a Client.

func (*Client) Messages

func (c *Client) Messages() chan *fspb.Message

Messages returns the channel containing incoming Fleetspeak messages.

func (*Client) Receive

func (c *Client) Receive(done <-chan struct{})

Receive continuously receives new messages from the Fleetspeak client's In channel. Once it receives a message, it will send it to the Messages channel for the sensor client to process.

func (*Client) SendMessage

func (c *Client) SendMessage(m *pb.SensorMessage) (string, error)

SendMessage a message to the Fleetspeak client. This call blocks until Fleetspeak has acknowledged the message.

Jump to

Keyboard shortcuts

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