Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingOperatorFunc = errors.New("missing operator function")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a implementation of the orbital.Initiator interface.
func NewClient ¶
func NewClient(f OperatorFunc, opts ...Option) (*Client, error)
NewClient creates a new embedded Client instance. It expects an OperatorFunc which is used to process the task requests. It allows options to configure the buffer size of the link channel.
func (*Client) ReceiveTaskResponse ¶
ReceiveTaskResponse waits for a task request from the link channel, passes the task request to the operator function, and returns the task response.
func (*Client) SendTaskRequest ¶
SendTaskRequest sends the task request to the link channel.
type OperatorFunc ¶
type OperatorFunc func(context.Context, orbital.TaskRequest) (orbital.TaskResponse, error)
OperatorFunc is a function type that processes a TaskRequest and returns a TaskResponse.
Click to show internal directories.
Click to hide internal directories.