service

package
v0.2.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInvalidInputError

func NewInvalidInputError(v interface{}) error

func NewInvalidOutputError

func NewInvalidOutputError(v interface{}) error

func NewMethodNotFoundError

func NewMethodNotFoundError(name string) error

Types

type Executable

type Executable func(ctx context.Context, input, output interface{}) error

Executable represents a callable method accepting an input value and writing into the provided output. Implementations should return an error on failure.

type HasToolTimeout added in v0.2.10

type HasToolTimeout interface {
	ToolTimeout() time.Duration
}

HasToolTimeout can be implemented by services to suggest a per-tool execution timeout. Registries may honor this when executing the service. Returned duration should be >0 to take effect.

type Service

type Service interface {
	Name() string
	Methods() Signatures
	Method(name string) (Executable, error)
}

Service is a minimal abstraction grouping a set of executable methods.

type Signature

type Signature struct {
	Name        string
	Description string
	Internal    bool
	Input       reflect.Type
	Output      reflect.Type
}

Signature describes a single method exposed by a Service.

type Signatures

type Signatures []Signature

Signatures is an ordered collection of method signatures.

Directories

Path Synopsis
llm
orchestration
os

Jump to

Keyboard shortcuts

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