respondertest

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*config)

Option is a function that modifies the config parameter of the Responder.

func WithInputBufferSize

func WithInputBufferSize(size int) Option

WithInputBufferSize sets the input buffer size for the Responder.

func WithOutputBufferSize

func WithOutputBufferSize(size int) Option

WithOutputBufferSize sets the output buffer size for the Responder.

type Responder

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

Responder is a mock implementation of the operator.Responder interface.

func NewResponder

func NewResponder(opts ...Option) *Responder

NewResponder creates a new Responder instance. It allows options to configure the buffer size of the input and output channel.

func (*Responder) NewRequest

func (r *Responder) NewRequest(req orbital.TaskRequest)

NewRequest sends the task request to the input channel.

func (*Responder) NewResponse

func (r *Responder) NewResponse() orbital.TaskResponse

NewResponse receives the task response from the output channel.

func (*Responder) ReceiveTaskRequest

func (r *Responder) ReceiveTaskRequest(ctx context.Context) (orbital.TaskRequest, error)

ReceiveTaskRequest receives a task request from the input channel.

func (*Responder) SendTaskResponse

func (r *Responder) SendTaskResponse(ctx context.Context, resp orbital.TaskResponse) error

SendTaskResponse sends a task response to the output channel.

Jump to

Keyboard shortcuts

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