registry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package registry implements an http.Handler for handling local Ollama API model management requests. See Local for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

type Local struct {
	Client *ollama.Registry // required
	Logger *slog.Logger     // required

	// Fallback, if set, is used to handle requests that are not handled by
	// this handler.
	Fallback http.Handler

	// Prune, if set, is called to prune the local disk cache after a model
	// is deleted.
	Prune func() error // optional
}

Local implements an http.Handler for handling local Ollama API model management requests, such as pushing, pulling, and deleting models.

It can be arranged for all unknown requests to be passed through to a fallback handler, if one is provided.

func (*Local) ServeHTTP

func (s *Local) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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