server

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S

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

S is a server.

func New

func New(store *store.S, log logr.Logger) *S

New creates a server.

func (*S) DeleteModel

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

DeleteModel deletes a model.

func (*S) GetModel

func (s *S) GetModel(
	ctx context.Context,
	req *v1.GetModelRequest,
) (*v1.Model, error)

GetModel gets a model.

func (*S) ListBaseModels

func (s *S) ListBaseModels(
	ctx context.Context,
	req *v1.ListBaseModelsRequest,
) (*v1.ListBaseModelsResponse, error)

ListBaseModels lists base models.

func (*S) ListModels

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

ListModels lists models.

func (*S) Run

func (s *S) Run(ctx context.Context, port int, authConfig config.AuthConfig, usage sender.UsageSetter) error

Run starts the gRPC server.

func (*S) Stop

func (s *S) Stop()

Stop stops the gRPC server.

type WS

type WS struct {
	v1.UnimplementedModelsWorkerServiceServer
	// contains filtered or unexported fields
}

WS is a server for worker services.

func NewWorkerServiceServer

func NewWorkerServiceServer(s *store.S, log logr.Logger) *WS

NewWorkerServiceServer creates a new worker service server.

func (*WS) CreateBaseModel

func (s *WS) CreateBaseModel(
	ctx context.Context,
	req *v1.CreateBaseModelRequest,
) (*v1.BaseModel, error)

CreateBaseModel creates a base model.

func (*WS) CreateStorageConfig

func (s *WS) CreateStorageConfig(
	ctx context.Context,
	req *v1.CreateStorageConfigRequest,
) (*v1.StorageConfig, error)

CreateStorageConfig creates a storage config.

func (*WS) GetBaseModelPath

func (s *WS) GetBaseModelPath(
	ctx context.Context,
	req *v1.GetBaseModelPathRequest,
) (*v1.GetBaseModelPathResponse, error)

GetBaseModelPath gets a model path.

func (*WS) GetModel

func (s *WS) GetModel(
	ctx context.Context,
	req *v1.GetModelRequest,
) (*v1.Model, error)

GetModel gets a model.

func (*WS) GetModelAttributes

func (s *WS) GetModelAttributes(
	ctx context.Context,
	req *v1.GetModelAttributesRequest,
) (*v1.ModelAttributes, error)

GetModelAttributes gets the model attributes.

func (*WS) GetModelPath

func (s *WS) GetModelPath(
	ctx context.Context,
	req *v1.GetModelPathRequest,
) (*v1.GetModelPathResponse, error)

GetModelPath gets a model path.

func (*WS) GetStorageConfig

func (s *WS) GetStorageConfig(
	ctx context.Context,
	req *v1.GetStorageConfigRequest,
) (*v1.StorageConfig, error)

GetStorageConfig gets a storage config.

func (*WS) PublishModel

func (s *WS) PublishModel(
	ctx context.Context,
	req *v1.PublishModelRequest,
) (*v1.PublishModelResponse, error)

PublishModel publishes a model.

func (*WS) RegisterModel

func (s *WS) RegisterModel(
	ctx context.Context,
	req *v1.RegisterModelRequest,
) (*v1.RegisterModelResponse, error)

RegisterModel registers a model.

func (*WS) Run

func (ws *WS) Run(ctx context.Context, port int, authConfig config.AuthConfig) error

Run runs the worker service server.

func (*WS) Stop

func (ws *WS) Stop()

Stop stops the worker service server.

Jump to

Keyboard shortcuts

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