agentclient

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package agentclient provides the provider-neutral Agent Operations V1 client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client owns provider-neutral operation transport and wait mechanics.

func New

func New(options Options) (*Client, error)

New validates and constructs an Agent Operations V1 client.

func (*Client) Cancel

func (c *Client) Cancel(ctx context.Context, id string) (agentv1.Operation, error)

Cancel cancels requester-owned work that has not started executing.

func (*Client) Get

func (c *Client) Get(ctx context.Context, id string) (agentv1.Operation, error)

Get retrieves one operation owned by the authenticated client.

func (*Client) Submit

func (c *Client) Submit(ctx context.Context, request agentv1.SubmitRequest) (agentv1.Operation, error)

Submit creates or idempotently replays one provider operation.

func (*Client) Wait

func (c *Client) Wait(ctx context.Context, operation agentv1.Operation) (agentv1.Operation, error)

Wait follows revision-bounded long polls until operation terminates or ctx ends.

type Error

type Error struct {
	Status  int
	Code    string
	Message string
}

Error is one stable Agent V1 error envelope.

func (*Error) Error

func (e *Error) Error() string

type Options

type Options struct {
	BaseURL    string
	Credential string
	HTTPClient *http.Client
}

Options configures an Agent Operations V1 client.

Jump to

Keyboard shortcuts

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