Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterThrottlerServer(s grpc.ServiceRegistrar, srv ThrottlerServer)
- type ThrottlerClient
- type ThrottlerServer
- type UnimplementedThrottlerServer
- func (UnimplementedThrottlerServer) GetConfiguration(context.Context, *dev.GetConfigurationRequest) (*dev.GetConfigurationResponse, error)
- func (UnimplementedThrottlerServer) MaxRates(context.Context, *dev.MaxRatesRequest) (*dev.MaxRatesResponse, error)
- func (UnimplementedThrottlerServer) ResetConfiguration(context.Context, *dev.ResetConfigurationRequest) (*dev.ResetConfigurationResponse, error)
- func (UnimplementedThrottlerServer) SetMaxRate(context.Context, *dev.SetMaxRateRequest) (*dev.SetMaxRateResponse, error)
- func (UnimplementedThrottlerServer) UpdateConfiguration(context.Context, *dev.UpdateConfigurationRequest) (*dev.UpdateConfigurationResponse, error)
- type UnsafeThrottlerServer
Constants ¶
const ( Throttler_MaxRates_FullMethodName = "/vitess.throttlerservice.dev.Throttler/MaxRates" Throttler_SetMaxRate_FullMethodName = "/vitess.throttlerservice.dev.Throttler/SetMaxRate" Throttler_GetConfiguration_FullMethodName = "/vitess.throttlerservice.dev.Throttler/GetConfiguration" Throttler_UpdateConfiguration_FullMethodName = "/vitess.throttlerservice.dev.Throttler/UpdateConfiguration" Throttler_ResetConfiguration_FullMethodName = "/vitess.throttlerservice.dev.Throttler/ResetConfiguration" )
Variables ¶
var Throttler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "vitess.throttlerservice.dev.Throttler", HandlerType: (*ThrottlerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "MaxRates", Handler: _Throttler_MaxRates_Handler, }, { MethodName: "SetMaxRate", Handler: _Throttler_SetMaxRate_Handler, }, { MethodName: "GetConfiguration", Handler: _Throttler_GetConfiguration_Handler, }, { MethodName: "UpdateConfiguration", Handler: _Throttler_UpdateConfiguration_Handler, }, { MethodName: "ResetConfiguration", Handler: _Throttler_ResetConfiguration_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "vitess/throttlerservice/dev/throttlerservice.proto", }
Throttler_ServiceDesc is the grpc.ServiceDesc for Throttler service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterThrottlerServer ¶
func RegisterThrottlerServer(s grpc.ServiceRegistrar, srv ThrottlerServer)
Types ¶
type ThrottlerClient ¶
type ThrottlerClient interface {
// MaxRates returns the current max rate for each throttler of the process.
MaxRates(ctx context.Context, in *dev.MaxRatesRequest, opts ...grpc.CallOption) (*dev.MaxRatesResponse, error)
// SetMaxRate allows to change the current max rate for all throttlers
// of the process.
SetMaxRate(ctx context.Context, in *dev.SetMaxRateRequest, opts ...grpc.CallOption) (*dev.SetMaxRateResponse, error)
// GetConfiguration returns the configuration of the MaxReplicationlag module
// for the given throttler or all throttlers if "throttler_name" is empty.
GetConfiguration(ctx context.Context, in *dev.GetConfigurationRequest, opts ...grpc.CallOption) (*dev.GetConfigurationResponse, error)
// UpdateConfiguration (partially) updates the configuration of the
// MaxReplicationlag module for the given throttler or all throttlers if
// "throttler_name" is empty.
// If "copy_zero_values" is true, fields with zero values will be copied
// as well.
UpdateConfiguration(ctx context.Context, in *dev.UpdateConfigurationRequest, opts ...grpc.CallOption) (*dev.UpdateConfigurationResponse, error)
// ResetConfiguration resets the configuration of the MaxReplicationlag module
// to the initial configuration for the given throttler or all throttlers if
// "throttler_name" is empty.
ResetConfiguration(ctx context.Context, in *dev.ResetConfigurationRequest, opts ...grpc.CallOption) (*dev.ResetConfigurationResponse, error)
}
ThrottlerClient is the client API for Throttler service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
Throttler defines the throttler RPC calls.
func NewThrottlerClient ¶
func NewThrottlerClient(cc grpc.ClientConnInterface) ThrottlerClient
type ThrottlerServer ¶
type ThrottlerServer interface {
// MaxRates returns the current max rate for each throttler of the process.
MaxRates(context.Context, *dev.MaxRatesRequest) (*dev.MaxRatesResponse, error)
// SetMaxRate allows to change the current max rate for all throttlers
// of the process.
SetMaxRate(context.Context, *dev.SetMaxRateRequest) (*dev.SetMaxRateResponse, error)
// GetConfiguration returns the configuration of the MaxReplicationlag module
// for the given throttler or all throttlers if "throttler_name" is empty.
GetConfiguration(context.Context, *dev.GetConfigurationRequest) (*dev.GetConfigurationResponse, error)
// UpdateConfiguration (partially) updates the configuration of the
// MaxReplicationlag module for the given throttler or all throttlers if
// "throttler_name" is empty.
// If "copy_zero_values" is true, fields with zero values will be copied
// as well.
UpdateConfiguration(context.Context, *dev.UpdateConfigurationRequest) (*dev.UpdateConfigurationResponse, error)
// ResetConfiguration resets the configuration of the MaxReplicationlag module
// to the initial configuration for the given throttler or all throttlers if
// "throttler_name" is empty.
ResetConfiguration(context.Context, *dev.ResetConfigurationRequest) (*dev.ResetConfigurationResponse, error)
}
ThrottlerServer is the server API for Throttler service. All implementations should embed UnimplementedThrottlerServer for forward compatibility.
Throttler defines the throttler RPC calls.
type UnimplementedThrottlerServer ¶
type UnimplementedThrottlerServer struct{}
UnimplementedThrottlerServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedThrottlerServer) GetConfiguration ¶
func (UnimplementedThrottlerServer) GetConfiguration(context.Context, *dev.GetConfigurationRequest) (*dev.GetConfigurationResponse, error)
func (UnimplementedThrottlerServer) MaxRates ¶
func (UnimplementedThrottlerServer) MaxRates(context.Context, *dev.MaxRatesRequest) (*dev.MaxRatesResponse, error)
func (UnimplementedThrottlerServer) ResetConfiguration ¶
func (UnimplementedThrottlerServer) ResetConfiguration(context.Context, *dev.ResetConfigurationRequest) (*dev.ResetConfigurationResponse, error)
func (UnimplementedThrottlerServer) SetMaxRate ¶
func (UnimplementedThrottlerServer) SetMaxRate(context.Context, *dev.SetMaxRateRequest) (*dev.SetMaxRateResponse, error)
func (UnimplementedThrottlerServer) UpdateConfiguration ¶
func (UnimplementedThrottlerServer) UpdateConfiguration(context.Context, *dev.UpdateConfigurationRequest) (*dev.UpdateConfigurationResponse, error)
type UnsafeThrottlerServer ¶
type UnsafeThrottlerServer interface {
// contains filtered or unexported methods
}
UnsafeThrottlerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ThrottlerServer will result in compilation errors.
Source Files
¶
- throttlerservice_grpc.pb.go