Documentation ¶
Overview ¶
Package throttlerclient defines the generic RPC client interface for the throttler service. It has to be implemented for the different RPC frameworks e.g. gRPC.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFactory ¶
RegisterFactory allows a client implementation to register itself.
Types ¶
type Client ¶
type Client interface { // MaxRates returns the current max rate for each throttler of the process. MaxRates(ctx context.Context) (map[string]int64, error) // SetMaxRate allows to change the current max rate for all throttlers // of the process. // It returns the names of the updated throttlers. SetMaxRate(ctx context.Context, rate int64) ([]string, error) // GetConfiguration returns the configuration of the MaxReplicationlag module // for the given throttler or all throttlers if "throttlerName" is empty. GetConfiguration(ctx context.Context, throttlerName string) (map[string]*throttlerdata.Configuration, error) // UpdateConfiguration (partially) updates the configuration of the // MaxReplicationlag module for the given throttler or all throttlers if // "throttlerName" is empty. // If "copyZeroValues" is true, fields with zero values will be copied // as well. // The function returns the names of the updated throttlers. UpdateConfiguration(ctx context.Context, throttlerName string, configuration *throttlerdata.Configuration, copyZeroValues bool) ([]string, error) // ResetConfiguration resets the configuration of the MaxReplicationlag module // to the initial configuration for the given throttler or all throttlers if // "throttlerName" is empty. // The function returns the names of the updated throttlers. ResetConfiguration(ctx context.Context, throttlerName string) ([]string, error) // Close will terminate the connection and free resources. Close() }
Client defines the generic RPC interface for the throttler service.
Click to show internal directories.
Click to hide internal directories.