client

package
v0.0.0-...-a4d05e0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 19 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, opts ...Option) *httpClient

Types

type Option

type Option func(*httpClient)

func WithHeader

func WithHeader(name, value string) Option

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

Jump to

Keyboard shortcuts

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