embedded

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

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) Close

func (c *Client) Close()

Close closes the link channel.

func (*Client) ReceiveTaskResponse

func (c *Client) ReceiveTaskResponse(ctx context.Context) (orbital.TaskResponse, error)

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

func (c *Client) SendTaskRequest(ctx context.Context, request orbital.TaskRequest) error

SendTaskRequest sends the task request to the link channel.

type OperatorFunc

OperatorFunc is a function type that processes a TaskRequest and returns a TaskResponse.

type Option

type Option func(*config)

Option is a function type that modifies the configuration of the Client.

Jump to

Keyboard shortcuts

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