go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/throttler/grpcthrottlerserver Index | Files

package grpcthrottlerserver

import "gopkg.in/src-d/go-vitess.v1/vt/throttler/grpcthrottlerserver"

Package grpcthrottlerserver contains the gRPC implementation of the server side of the throttler service.


Package Files


func RegisterServer Uses

func RegisterServer(s *grpc.Server, m throttler.Manager)

RegisterServer registers a new throttler server instance with the gRPC server.

type Server Uses

type Server struct {
    // contains filtered or unexported fields

Server is the gRPC server implementation of the Throttler service.

func NewServer Uses

func NewServer(m throttler.Manager) *Server

NewServer creates a new RPC server for a given throttler manager.

func (*Server) GetConfiguration Uses

func (s *Server) GetConfiguration(_ context.Context, request *throttlerdatapb.GetConfigurationRequest) (_ *throttlerdatapb.GetConfigurationResponse, err error)

GetConfiguration implements the gRPC server interface.

func (*Server) MaxRates Uses

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 Uses

func (s *Server) ResetConfiguration(_ context.Context, request *throttlerdatapb.ResetConfigurationRequest) (_ *throttlerdatapb.ResetConfigurationResponse, err error)

ResetConfiguration implements the gRPC server interface.

func (*Server) SetMaxRate Uses

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 Uses

func (s *Server) UpdateConfiguration(_ context.Context, request *throttlerdatapb.UpdateConfigurationRequest) (_ *throttlerdatapb.UpdateConfigurationResponse, err error)

UpdateConfiguration implements the gRPC server interface.

Package grpcthrottlerserver imports 6 packages (graph). Updated 2019-06-13. Refresh now. Tools for package owners.