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 WithGRPCListenURL ¶
WithGRPCListenURL sets the listener address from a URL.
func WithLogLevel ¶
func WithLogLevel(lvl pb.UI_Settings_Level) Opt
WithLogLevel sets client log level.
Click to show internal directories.
Click to hide internal directories.