Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Addr     net.Addr
	Client   pb.EnosServiceClient
	Log      hclog.Logger
	Level    pb.UI_Settings_Level
	DialOpts []grpc.DialOption
}

Connection is a client connection to the enos server.

func Connect

func Connect(ctx context.Context, opts ...Opt) (*Connection, error)

Connect takes a context and options and returns a new connection.

func (*Connection) StreamOperations

func (c *Connection) StreamOperations(
	ctx context.Context,
	opRes opRes,
	ui uipkg.View,
) *pb.OperationResponses

StreamOperations handles streaming responses from the server and writing their responses to the UI.

func (*Connection) Trace

func (c *Connection) Trace(msg string, args ...any)

Trace writes an hclog.Logger style message at a "trace" level.

type Opt

type Opt func(*Connection) error

Opt is a client connection option.

func WithGRPCDialOpts

func WithGRPCDialOpts(opts ...grpc.DialOption) Opt

func WithGRPCListenAddr

func WithGRPCListenAddr(addr net.Addr) Opt

func WithGRPCListenURL

func WithGRPCListenURL(url *url.URL) Opt

WithGRPCListenURL sets the listener address from a URL.

func WithLogLevel

func WithLogLevel(lvl pb.UI_Settings_Level) Opt

WithLogLevel sets client log level.

func WithLogger

func WithLogger(log hclog.Logger) Opt

WithLogger sets client logger.

Jump to

Keyboard shortcuts

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