toolstore

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CacheValidDuration = 24 * time.Hour

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	GetTools(serverName string) ([]CachedTool, error)
	SetTools(serverName string, tools []CachedTool) error
	Invalidate(serverName string) error
	GetCacheDir() string
}

type CachedTool

type CachedTool struct {
	Name        string          `json:"name"`
	Description string          `json:"description"`
	InputSchema json.RawMessage `json:"inputSchema"`
}

type FileCache

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

func NewFileCache

func NewFileCache(logger *slog.Logger) (*FileCache, error)

func (*FileCache) GetCacheDir

func (c *FileCache) GetCacheDir() string

func (*FileCache) GetTools

func (c *FileCache) GetTools(serverName string) ([]CachedTool, error)

func (*FileCache) Invalidate

func (c *FileCache) Invalidate(serverName string) error

func (*FileCache) ListCachedServers

func (c *FileCache) ListCachedServers() ([]string, error)

func (*FileCache) SetTools

func (c *FileCache) SetTools(serverName string, tools []CachedTool) error

type NoOpCache

type NoOpCache struct{}

func NewNoOpCache

func NewNoOpCache() *NoOpCache

func (*NoOpCache) GetCacheDir

func (c *NoOpCache) GetCacheDir() string

func (*NoOpCache) GetTools

func (c *NoOpCache) GetTools(serverName string) ([]CachedTool, error)

func (*NoOpCache) Invalidate

func (c *NoOpCache) Invalidate(serverName string) error

func (*NoOpCache) SetTools

func (c *NoOpCache) SetTools(serverName string, tools []CachedTool) error

Jump to

Keyboard shortcuts

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