puller

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModelDir

func ModelDir() string

ModelDir returns the directory where models are stored.

func PreferredModelFormat

func PreferredModelFormat(runtime string, supportedFormats []mv1.ModelFormat) (mv1.ModelFormat, error)

PreferredModelFormat returns the preferred model format.

Types

type Client

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

Client is a client for the puller server.

func NewClient

func NewClient(addr string) *Client

NewClient creates a new puller client.

func (*Client) GetModel

func (c *Client) GetModel(ctx context.Context, modelID string) (int, error)

GetModel sends a request to the puller server to get the status of a model.

func (*Client) PullModel

func (c *Client) PullModel(ctx context.Context, modelID string) error

PullModel sends a request to the puller server to pull a model.

type P

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

P is a puller.

func New

func New(
	mconfig *config.ProcessedModelConfig,
	runtimeName string,
	mClient modelClient,
	downloader modelDownloader,
) *P

New creates a new puller.

func (*P) Pull

func (p *P) Pull(ctx context.Context, modelID string) error

Pull pulls the model from the Model Manager Server.

type Server

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

Server represents a server that handles pull requests.

func NewServer

func NewServer(p puller) *Server

NewServer creates a new server instance.

func (*Server) ProcessPullRequests

func (s *Server) ProcessPullRequests(ctx context.Context) error

ProcessPullRequests processes pull requests.

func (*Server) QueuePullRequest

func (s *Server) QueuePullRequest(modelID string)

QueuePullRequest queues a pull request for the given model ID.

func (*Server) Start

func (s *Server) Start(port int) error

Start starts an HTTP server that listens for pull requests.

Jump to

Keyboard shortcuts

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