rpcserver

package
v2.0.8-beta.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPeerCacheExpiration is default expiration of peer cache.
	DefaultPeerCacheExpiration = 10 * time.Minute

	// DefaultPeerCacheCleanupInterval is default cleanup interval of peer cache.
	DefaultPeerCacheCleanupInterval = 1 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v2.0.6

type Option func(s *Server) error

Option is a functional option for rpc server.

func WithGRPCServerOptions added in v2.0.6

func WithGRPCServerOptions(opts []grpc.ServerOption) Option

WithGRPCServerOptions set the server options of grpc.

func WithSelfSignedCert added in v2.0.6

func WithSelfSignedCert(tlsCert *tls.Certificate) Option

WithCertificate set the self signed certificate for server.

type SelfSignedCert added in v2.0.6

type SelfSignedCert struct {
	// TLSCert is certificate of tls.
	TLSCert *tls.Certificate

	// X509Cert is certificate of x509.
	X509Cert *x509.Certificate

	// CertChain is certificate chain of ASN.1 DER form.
	CertChain [][]byte
}

SelfSignedCert is self signed certificate.

type Server

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

Server is grpc server.

func New

func New(
	cfg *config.Config, database *database.Database, cache *cache.Cache, searcher searcher.Searcher,
	objectStorage objectstorage.ObjectStorage, objectStorageConfig *config.ObjectStorageConfig, opts ...Option,
) (*Server, *grpc.Server, error)

New returns a new manager server from the given options.

func (*Server) CreateModel added in v2.0.6

func (s *Server) CreateModel(ctx context.Context, req *managerv1.CreateModelRequest) (*managerv1.Model, error)

Create model information.

func (*Server) CreateModelVersion added in v2.0.6

Create model version information.

func (*Server) DeleteModel added in v2.0.6

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

Delete model information.

func (*Server) DeleteModelVersion added in v2.0.6

func (s *Server) DeleteModelVersion(ctx context.Context, req *managerv1.DeleteModelVersionRequest) (*emptypb.Empty, error)

Delete model version information.

func (*Server) GetModel added in v2.0.6

func (s *Server) GetModel(ctx context.Context, req *managerv1.GetModelRequest) (*managerv1.Model, error)

Get model information.

func (*Server) GetModelVersion added in v2.0.6

Get model version information.

func (*Server) GetObjectStorage added in v2.0.4

Get object storage configuration.

func (*Server) GetScheduler

Get Scheduler and Scheduler cluster configuration.

func (*Server) GetSeedPeer added in v2.0.3

func (s *Server) GetSeedPeer(ctx context.Context, req *managerv1.GetSeedPeerRequest) (*managerv1.SeedPeer, error)

Get SeedPeer and SeedPeer cluster configuration.

func (*Server) IssueCertificate added in v2.0.6

func (*Server) KeepAlive

func (s *Server) KeepAlive(stream managerv1.Manager_KeepAliveServer) error

KeepAlive with manager.

func (*Server) ListBuckets added in v2.0.4

List buckets configuration.

func (*Server) ListModelVersions added in v2.0.6

List model versions information.

func (*Server) ListModels added in v2.0.6

List models information.

func (*Server) ListSchedulers

List acitve schedulers configuration.

func (*Server) UpdateModel added in v2.0.6

func (s *Server) UpdateModel(ctx context.Context, req *managerv1.UpdateModelRequest) (*managerv1.Model, error)

Update model information.

func (*Server) UpdateModelVersion added in v2.0.6

Update model version information.

func (*Server) UpdateScheduler

func (s *Server) UpdateScheduler(ctx context.Context, req *managerv1.UpdateSchedulerRequest) (*managerv1.Scheduler, error)

Update scheduler configuration.

func (*Server) UpdateSeedPeer added in v2.0.3

func (s *Server) UpdateSeedPeer(ctx context.Context, req *managerv1.UpdateSeedPeerRequest) (*managerv1.SeedPeer, error)

Update SeedPeer configuration.

Jump to

Keyboard shortcuts

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