Documentation
¶
Overview ¶
Package client provides gRPC client implementation for limits service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPool ¶
func NewPool( name string, cfg PoolConfig, ring ring.ReadRing, factory ring_client.PoolFactory, logger log.Logger, ) *ring_client.Pool
NewPool returns a new pool of clients for the ingest-limits.
func NewPoolFactory ¶
func NewPoolFactory(cfg Config) ring_client.PoolFactory
NewPoolFactory returns a new factory for ingest-limits clients.
Types ¶
type Client ¶
type Client struct {
proto.IngestLimitsClient
grpc_health_v1.HealthClient
io.Closer
}
Client is a gRPC client for the ingest-limits.
type Config ¶
type Config struct {
GRPCClientConfig grpcclient.Config `yaml:"grpc_client_config" doc:"description=Configures client gRPC connections to limits service."`
PoolConfig PoolConfig `yaml:"pool_config,omitempty" doc:"description=Configures client gRPC connections pool to limits service."`
GRPCUnaryClientInterceptors []grpc.UnaryClientInterceptor `yaml:"-"`
GRCPStreamClientInterceptors []grpc.StreamClientInterceptor `yaml:"-"`
// Internal is used to indicate that this client communicates on behalf of
// a machine and not a user. When Internal = true, the client won't attempt
// to inject an userid into the context.
Internal bool `yaml:"-"`
}
Config contains the config for an ingest-limits client.
type PoolConfig ¶
type PoolConfig struct {
ClientCleanupPeriod time.Duration `yaml:"client_cleanup_period"`
HealthCheckIngestLimits bool `yaml:"health_check_ingest_limits"`
RemoteTimeout time.Duration `yaml:"remote_timeout"`
}
PoolConfig contains the config for a pool of ingest-limits clients.
func (*PoolConfig) RegisterFlagsWithPrefix ¶
func (cfg *PoolConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
Click to show internal directories.
Click to hide internal directories.