Documentation ¶
Overview ¶
Package grpcthrottlerserver contains the gRPC implementation of the server side of the throttler service.
Index ¶
- func StartServer(s *grpc.Server, m throttler.Manager)
- type Server
- func (s *Server) GetConfiguration(_ context.Context, request *throttlerdata.GetConfigurationRequest) (_ *throttlerdata.GetConfigurationResponse, err error)
- func (s *Server) MaxRates(_ context.Context, request *throttlerdata.MaxRatesRequest) (_ *throttlerdata.MaxRatesResponse, err error)
- func (s *Server) ResetConfiguration(_ context.Context, request *throttlerdata.ResetConfigurationRequest) (_ *throttlerdata.ResetConfigurationResponse, err error)
- func (s *Server) SetMaxRate(_ context.Context, request *throttlerdata.SetMaxRateRequest) (_ *throttlerdata.SetMaxRateResponse, err error)
- func (s *Server) UpdateConfiguration(_ context.Context, request *throttlerdata.UpdateConfigurationRequest) (_ *throttlerdata.UpdateConfigurationResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// 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 *throttlerdata.GetConfigurationRequest) (_ *throttlerdata.GetConfigurationResponse, err error)
GetConfiguration implements the gRPC server interface.
func (*Server) MaxRates ¶
func (s *Server) MaxRates(_ context.Context, request *throttlerdata.MaxRatesRequest) (_ *throttlerdata.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 *throttlerdata.ResetConfigurationRequest) (_ *throttlerdata.ResetConfigurationResponse, err error)
ResetConfiguration implements the gRPC server interface.
func (*Server) SetMaxRate ¶
func (s *Server) SetMaxRate(_ context.Context, request *throttlerdata.SetMaxRateRequest) (_ *throttlerdata.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 *throttlerdata.UpdateConfigurationRequest) (_ *throttlerdata.UpdateConfigurationResponse, err error)
UpdateConfiguration implements the gRPC server interface.
Click to show internal directories.
Click to hide internal directories.