modelcache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetModelFunc

type GetModelFunc func(context.Context, string) (*schema.Model, error)

type ListModelsFunc

type ListModelsFunc func(context.Context, ...opt.Opt) ([]schema.Model, error)

type ModelCache

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

func NewModelCache

func NewModelCache(ttl time.Duration, cap int) *ModelCache

func (*ModelCache) GetModel

func (mc *ModelCache) GetModel(ctx context.Context, name string, fn GetModelFunc) (*schema.Model, error)

func (*ModelCache) ListModels

func (mc *ModelCache) ListModels(ctx context.Context, opts []opt.Opt, fn ListModelsFunc) ([]schema.Model, error)

Jump to

Keyboard shortcuts

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