service

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 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 HasMethodRetryPolicy added in v0.1.23

type HasMethodRetryPolicy interface {
	MethodRetryable(method string) (retryable bool, configured bool)
}

HasMethodRetryPolicy can be implemented by services that need to override the default retry behavior for individual methods. The second return value reports whether the method has an explicit policy.

type HasMethodToolTimeout added in v0.1.23

type HasMethodToolTimeout interface {
	MethodToolTimeout(method string) time.Duration
}

HasMethodToolTimeout can be implemented by services whose methods need different execution timeouts. A non-positive duration preserves the registry's normal timeout behavior for that method.

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
async
Package async provides the system/async tool service.
Package async provides the system/async tool service.
os
ui

Jump to

Keyboard shortcuts

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