client

package
v0.0.0-...-410a399 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Scalar(ctx context.Context, message string) (string, error)
	Stream(ctx context.Context, it provider.MessageIterator) error
}

func NewClient

func NewClient(target string) (Client, error)

type SimpleClient

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

func (*SimpleClient) Close

func (c *SimpleClient) Close() error

Close closes the created resources (e.g. connection).

func (*SimpleClient) Connected

func (c *SimpleClient) Connected() bool

func (*SimpleClient) GetTarget

func (c *SimpleClient) GetTarget() string

func (*SimpleClient) Scalar

func (c *SimpleClient) Scalar(ctx context.Context, message string) (string, error)

Scalar sends a message to the server and returns the response.

func (*SimpleClient) Stream

Stream sends a message to the server and receives the response.

Jump to

Keyboard shortcuts

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