Versions in this module Expand all Collapse all v0 v0.17.0 Oct 28, 2026 v0.16.0 Oct 28, 2026 v0.15.0 Oct 23, 2026 v0.14.0 Oct 22, 2026 v0.13.1 Oct 21, 2026 v0.13.0 Oct 21, 2026 Changes in this version + const DefaultMaxInflight + const MaxFrameBytes + const Version + var ErrInflightLimit = errors.New("wire: 在途调用数超过硬上限") + func ReadFrame(r io.Reader, v any) error + func WriteFrame(w io.Writer, v any) error + type Budget struct + MaxBytes int + MaxCalls int + func (b *Budget) Used() (calls, bytes int) + type Client struct + func NewClient(rw io.ReadWriter) *Client + func (c *Client) Call(ctx context.Context, tool, args string) (Response, error) + func (c *Client) CallWithID(ctx context.Context, id, tool, args string) (Response, error) + func (c *Client) Close() error + type Handler func(ctx context.Context, req Request) (Response, error) + type Request struct + Args string + DeadlineMS int64 + ID string + Tool string + V int + type Response struct + Error string + ID string + Kind string + OK bool + V int + Value string + type Result struct + Bytes int + Calls int + Error string + Kind string + OK bool + ResultID string + V int + Value string + type Runner struct + func NewRunner(rw io.ReadWriter) *Runner + func (r *Runner) AwaitStart(ctx context.Context) (*Start, error) + func (r *Runner) SendResult(res Result) error + type Server struct + func NewServer(rw io.ReadWriter, h Handler, opts ...ServerOption) *Server + func (s *Server) Close() error + func (s *Server) Serve(ctx context.Context) error + type ServerOption func(*Server) + func WithBudget(b Budget) ServerOption + func WithMaxInflight(n int) ServerOption + type Start struct + Bindings []StartBinding + Budget StartBudget + Program string + ResultID string + V int + type StartBinding struct + Name string + Signature string + type StartBudget struct + MaxBytes int + MaxCalls int + MaxMemory int64 + WallClock time.Duration + type Starter struct + func NewStarter(rw io.ReadWriter) *Starter + func (s *Starter) Start(ctx context.Context, start Start) (Result, error)