Documentation ¶
Overview ¶
Package grpcthrottlerserver contains the gRPC implementation of the server side of the throttler service.
Index ¶
- func RegisterServer(s *grpc.Server, m throttler.Manager)
- type Server
- func (s *Server) GetConfiguration(_ context.Context, request *throttlerdatapb.GetConfigurationRequest) (_ *throttlerdatapb.GetConfigurationResponse, err error)
- func (s *Server) MaxRates(_ context.Context, request *throttlerdatapb.MaxRatesRequest) (_ *throttlerdatapb.MaxRatesResponse, err error)
- func (s *Server) ResetConfiguration(_ context.Context, request *throttlerdatapb.ResetConfigurationRequest) (_ *throttlerdatapb.ResetConfigurationResponse, err error)
- func (s *Server) SetMaxRate(_ context.Context, request *throttlerdatapb.SetMaxRateRequest) (_ *throttlerdatapb.SetMaxRateResponse, err error)
- func (s *Server) UpdateConfiguration(_ context.Context, request *throttlerdatapb.UpdateConfigurationRequest) (_ *throttlerdatapb.UpdateConfigurationResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct { throttlerservicepb.UnimplementedThrottlerServer // contains filtered or unexported fields }
Server is the gRPC server implementation of the Throttler service.
func (*Server) GetConfiguration ¶
func (s *Server) GetConfiguration(_ context.Context, request *throttlerdatapb.GetConfigurationRequest) (_ *throttlerdatapb.GetConfigurationResponse, err error)
GetConfiguration implements the gRPC server interface.
func (*Server) MaxRates ¶
func (s *Server) MaxRates(_ context.Context, request *throttlerdatapb.MaxRatesRequest) (_ *throttlerdatapb.MaxRatesResponse, err error)
MaxRates implements the gRPC server interface. It returns the current max rate for each throttler of the process.
func (*Server) ResetConfiguration ¶
func (s *Server) ResetConfiguration(_ context.Context, request *throttlerdatapb.ResetConfigurationRequest) (_ *throttlerdatapb.ResetConfigurationResponse, err error)
ResetConfiguration implements the gRPC server interface.
func (*Server) SetMaxRate ¶
func (s *Server) SetMaxRate(_ context.Context, request *throttlerdatapb.SetMaxRateRequest) (_ *throttlerdatapb.SetMaxRateResponse, err error)
SetMaxRate implements the gRPC server interface. It sets the rate on all throttlers controlled by the manager.
func (*Server) UpdateConfiguration ¶
func (s *Server) UpdateConfiguration(_ context.Context, request *throttlerdatapb.UpdateConfigurationRequest) (_ *throttlerdatapb.UpdateConfigurationResponse, err error)
UpdateConfiguration implements the gRPC server interface.
Click to show internal directories.
Click to hide internal directories.