protocols

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package protocols explicitly assembles protocol modules and owns their shared HTTP boundary.

Index

Constants

This section is empty.

Variables

View Source
var ErrClientClosed = errors.New("protocol client is closed")
View Source
var ErrInvalidBinding = errors.New("invalid protocol run binding")
View Source
var ErrInvalidExecution = errors.New("invalid protocol execution configuration")

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(
	registry *Registry,
	lease *credentials.Lease,
	channel domain.ChannelSnapshot,
	transport http.RoundTripper,
) (*Client, error)

func (*Client) Close

func (client *Client) Close() error

func (*Client) Execute

func (client *Client) Execute(ctx context.Context, execution Execution) (testspec.Result, error)

func (Client) GoString

func (Client) GoString() string

func (Client) MarshalJSON

func (Client) MarshalJSON() ([]byte, error)

func (*Client) Send

func (client *Client) Send(ctx context.Context, request runtime.Request) (runtime.Response, error)

func (Client) String

func (Client) String() string

type Execution

type Execution struct {
	Spec     testspec.Spec
	Inputs   map[string]json.RawMessage
	Random   testspec.RandomContext
	Settings testspec.RunSettings
	Assets   runtime.AssetResolver
}

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) DecodeSpec

func (registry *Registry) DecodeSpec(protocol string, raw json.RawMessage) (testspec.Spec, error)

DecodeSpec validates raw authoring input once, then applies native protocol rules.

func (*Registry) Descriptors

func (registry *Registry) Descriptors() []runtime.Descriptor

func (*Registry) Register

func (registry *Registry) Register(module runtime.Module) error

func (*Registry) Validate

func (registry *Registry) Validate(protocol string, spec testspec.Spec) error

Directories

Path Synopsis
Package anthropicmessages observes the native Anthropic Messages contract.
Package anthropicmessages observes the native Anthropic Messages contract.
Package minimaxvideo registers the MiniMax video task lifecycle and observations.
Package minimaxvideo registers the MiniMax video task lifecycle and observations.
Package openaichat executes and observes OpenAI Chat without implicit assertions.
Package openaichat executes and observes OpenAI Chat without implicit assertions.
Package openairesponses observes the native OpenAI Responses contract.
Package openairesponses observes the native OpenAI Responses contract.
Package runtime contains the small shared boundary implemented by protocol modules.
Package runtime contains the small shared boundary implemented by protocol modules.
Package seedance registers the Seedance task lifecycle and observations.
Package seedance registers the Seedance task lifecycle and observations.
Package textapi shares bounded HTTP/SSE execution between text protocols.
Package textapi shares bounded HTTP/SSE execution between text protocols.
Package wanvideo registers the Wan video task lifecycle and observations.
Package wanvideo registers the Wan video task lifecycle and observations.

Jump to

Keyboard shortcuts

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