Documentation ¶
Overview ¶
Package grpc provides the basic interfaces to build a gRPC+Protobuf flows client & server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConnection ¶
type ClientConnection struct {
// contains filtered or unexported fields
}
ClientConnection wraps a gRPC+protobuf connection
func ConnectClient ¶
func ConnectClient(address string) (*ClientConnection, error)
func (*ClientConnection) Client ¶
func (cp *ClientConnection) Client() pbflow.CollectorClient
func (*ClientConnection) Close ¶
func (cp *ClientConnection) Close() error
type CollectorServer ¶
type CollectorServer struct {
// contains filtered or unexported fields
}
CollectorServer wraps a Flow Collector connection & session
func StartCollector ¶
func StartCollector(port int, recordForwarder chan<- *pbflow.Records) (*CollectorServer, error)
StartCollector listens in background for gRPC+Protobuf flows in the given port, and forwards each set of *pbflow.Records by the provided channel.
func (*CollectorServer) Close ¶
func (c *CollectorServer) Close() error
Click to show internal directories.
Click to hide internal directories.