arrow

package
v0.0.0-...-36e2831 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStreamRestarting = status.Error(codes.Aborted, "stream is restarting")

Functions

This section is empty.

Types

type Exporter

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

Exporter is 1:1 with exporter, isolates arrow-specific functionality.

func NewExporter

func NewExporter(
	numStreams int,
	disableDowngrade bool,
	telemetry component.TelemetrySettings,
	grpcOptions []grpc.CallOption,
	newProducer func() arrowRecord.ProducerAPI,
	client arrowpb.ArrowStreamServiceClient,
	perRPCCredentials credentials.PerRPCCredentials,
) *Exporter

NewExporter configures a new Exporter.

func (*Exporter) SendAndWait

func (e *Exporter) SendAndWait(ctx context.Context, data interface{}) (bool, error)

SendAndWait tries to send using an Arrow stream. The results are:

(true, nil): Arrow send: success at consumer (false, nil): Arrow is not supported by the server, caller expected to fallback. (true, non-nil): Arrow send: server response may be permanent or allow retry. (false, non-nil): Context timeout prevents retry.

consumer should fall back to standard OTLP, (true, nil)

func (*Exporter) Shutdown

func (e *Exporter) Shutdown(ctx context.Context) error

Shutdown returns when all Arrow-associated goroutines have returned.

func (*Exporter) Start

func (e *Exporter) Start(ctx context.Context) error

Start creates the background context used by all streams and starts a stream controller, which initializes the initial set of streams.

type Stream

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

Stream is 1:1 with gRPC stream.

func (*Stream) SendAndWait

func (s *Stream) SendAndWait(ctx context.Context, records interface{}) error

SendAndWait submits a batch of records to be encoded and sent. Meanwhile, this goroutine waits on the incoming context or for the asynchronous response to be received by the stream reader.

Directories

Path Synopsis
Package grpcmock is a generated GoMock package.
Package grpcmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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