Documentation ¶
Overview ¶
Description: This file has the package server.
Description: This file has the package server.
Description: This file has the package server.
Description: This file has the package server.
Description: This file has the package server.
Description: This file has the package server.
Package server has helpers for creating gRPC server ¶
Description: This file has the package server.
Index ¶
- type Exposer
- type GRPCService
- type GRPCServiceHandler
- func (h *GRPCServiceHandler) ExposeService(req *api.ExposeServiceRequest, res api.LocalizerService_ExposeServiceServer) error
- func (*GRPCServiceHandler) Kill(ctx context.Context, _ *api.Empty) (*api.Empty, error)
- func (h *GRPCServiceHandler) List(ctx context.Context, req *api.ListRequest) (*api.ListResponse, error)
- func (h *GRPCServiceHandler) Ping(ctx context.Context, req *api.PingRequest) (*api.PingResponse, error)
- func (g *GRPCServiceHandler) Stable(ctx context.Context, _ *api.Empty) (*api.StableResponse, error)
- func (h *GRPCServiceHandler) StopExpose(req *api.StopExposeRequest, res api.LocalizerService_StopExposeServer) error
- type RunOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exposer ¶
type Exposer struct {
// contains filtered or unexported fields
}
func NewExposer ¶
func NewExposer(parentCtx context.Context, k kubernetes.Interface, kconf *rest.Config, log logrus.FieldLogger) (*Exposer, error)
NewExposer creates a service that can maintain multiple expose instances
type GRPCService ¶
type GRPCService struct {
// contains filtered or unexported fields
}
func NewGRPCService ¶
func NewGRPCService(opts *RunOpts) *GRPCService
func (*GRPCService) CleanupPreviousInstance ¶
func (g *GRPCService) CleanupPreviousInstance(ctx context.Context, log logrus.FieldLogger) error
CleanupPreviousInstance attempts to cleanup after a dead localizer instance if a not dead one is found, an error is returned or if it fails to cleanup
func (*GRPCService) Run ¶
func (g *GRPCService) Run(ctx context.Context, log logrus.FieldLogger) error
Run starts a grpc server with the internal server handler
type GRPCServiceHandler ¶
type GRPCServiceHandler struct { api.UnimplementedLocalizerServiceServer // contains filtered or unexported fields }
func NewServiceHandler ¶
func NewServiceHandler(ctx context.Context, log logrus.FieldLogger, opts *RunOpts) (*GRPCServiceHandler, error)
func (*GRPCServiceHandler) ExposeService ¶
func (h *GRPCServiceHandler) ExposeService(req *api.ExposeServiceRequest, res api.LocalizerService_ExposeServiceServer) error
func (*GRPCServiceHandler) Kill ¶ added in v1.12.0
Kill implements the Kill RPC for the localizer gRPC server.
This RPC just kills the current localizer process. Note that it actually waits until after the RPC returns (responds) before killing the process because if it kills it before it attempts to respond, the transport will have been closed already, resulting in a perceived error. Because of this stipulation, this RPC is only BEST EFFORT.
func (*GRPCServiceHandler) List ¶
func (h *GRPCServiceHandler) List(ctx context.Context, req *api.ListRequest) (*api.ListResponse, error)
func (*GRPCServiceHandler) Ping ¶
func (h *GRPCServiceHandler) Ping(ctx context.Context, req *api.PingRequest) (*api.PingResponse, error)
func (*GRPCServiceHandler) Stable ¶ added in v1.12.0
func (g *GRPCServiceHandler) Stable(ctx context.Context, _ *api.Empty) (*api.StableResponse, error)
Stable implements the Stable RPC for the localizer gRPC server.
func (*GRPCServiceHandler) StopExpose ¶
func (h *GRPCServiceHandler) StopExpose(req *api.StopExposeRequest, res api.LocalizerService_StopExposeServer) error