grpc

package
v0.2.1-rc0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 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 CollectorOption added in v0.1.1

type CollectorOption func(options *collectorOptions)

CollectorOption allows overriding the default configuration of the CollectorServer instance. Use them in the StartCollector function.

func WithGRPCServerOptions added in v0.1.1

func WithGRPCServerOptions(options ...grpc.ServerOption) CollectorOption

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, options ...CollectorOption,
) (*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