grpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

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 (*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

Jump to

Keyboard shortcuts

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