service

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 1

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 AsyncConfigurer added in v0.1.7

type AsyncConfigurer interface {
	AsyncConfig(toolName string) *asynccfg.Config
	AsyncConfigs() []*asynccfg.Config
}

type CacheableProvider added in v0.1.7

type CacheableProvider interface {
	CacheableMethods() map[string]bool
}

CacheableProvider can be implemented by services to declare which methods produce cacheable (supersession-eligible) outputs. The registry queries this at AddInternalService time. Keys are method names (e.g., "status", "list"); values indicate cacheability.

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

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
shared
os

Jump to

Keyboard shortcuts

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