server

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IS

type IS struct {
	v1.UnimplementedModelsInternalServiceServer
	// contains filtered or unexported fields
}

IS is an internal server.

func NewInternal

func NewInternal(store *store.S, pathPrefix string) *IS

NewInternal creates an internal server.

func (*IS) PublishModel added in v0.2.0

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

PublishModel publishes a model.

func (*IS) RegisterModel added in v0.2.0

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

RegisterModel registers a model.

func (*IS) Run

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

Run starts the gRPC server.

type S

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

S is a server.

func New

func New(store *store.S) *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) ListModels

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

ListModels lists models.

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