client

package
v0.0.0-...-24971f4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCClient

func NewGRPCClient(ctx context.Context, dialFn func(context.Context) (*grpc.ClientConn, error)) (*grpcClient, error)

func NewHTTPClient

func NewHTTPClient(log *zap.Logger, serverAddr string, gitCommit string, appVersion string) *httpClient

Types

type Stream

type Stream interface {
	// Next returns io.EOF when the stream ends or is closed from either side.
	Next(ctx context.Context) (*messagev1.Envelope, error)
	// Closing the stream terminates the subscription.
	Close() error
}

Stream is an abstraction of the subscribe response stream

type Subscribe2Stream

type Subscribe2Stream interface {
	Send(req *messagev1.SubscribeRequest) error
	Stream
}

Jump to

Keyboard shortcuts

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