server

package
v0.122.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeModelSyncer added in v0.111.0

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

FakeModelSyncer is a fake implementation of model syncer.

func NewFakeModelSyncer added in v0.111.0

func NewFakeModelSyncer() *FakeModelSyncer

NewFakeModelSyncer returns a FakeModelSyncer.

func (*FakeModelSyncer) DeleteModel added in v0.111.0

func (s *FakeModelSyncer) DeleteModel(ctx context.Context, modelID string) error

DeleteModel deletes a model.

func (*FakeModelSyncer) ListSyncedModelIDs added in v0.111.0

func (s *FakeModelSyncer) ListSyncedModelIDs(ctx context.Context) []string

ListSyncedModelIDs lists all models that have been synced.

func (*FakeModelSyncer) PullModel added in v0.111.0

func (s *FakeModelSyncer) PullModel(ctx context.Context, modelID string) error

PullModel downloads and registers a model from model manager.

type ModelSyncer added in v0.111.0

type ModelSyncer interface {
	PullModel(ctx context.Context, modelID string) error
	ListSyncedModelIDs(ctx context.Context) []string
	DeleteModel(ctx context.Context, modelID string) error
}

ModelSyncer syncs models.

type S

type S struct {
	v1.UnimplementedInferenceEngineInternalServiceServer
	// contains filtered or unexported fields
}

S is a server.

func New

func New(syncer ModelSyncer) *S

New creates a server.

func (*S) DeleteModel added in v0.56.0

func (s *S) DeleteModel(ctx context.Context, req *v1.DeleteModelRequest) (*emptypb.Empty, error)

DeleteModel removes a model from the engine.

func (*S) ListModels added in v0.56.0

func (s *S) ListModels(ctx context.Context, req *v1.ListModelsRequest) (*v1.ListModelsResponse, error)

ListModels lists all downloaded models in the engine.

func (*S) PullModel added in v0.56.0

func (s *S) PullModel(ctx context.Context, req *v1.PullModelRequest) (*emptypb.Empty, error)

PullModel downloads and registers a model with the engine.

func (*S) Run

func (s *S) Run(port int) error

Run starts the gRPC server.

func (*S) Stop

func (s *S) Stop()

Stop stops the gRPC server.

Jump to

Keyboard shortcuts

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