Documentation
¶
Index ¶
- Constants
- type ClientAuthType
- type Config
- type HealthCheckServer
- func (h *HealthCheckServer) Check(_ context.Context, _ *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
- func (h *HealthCheckServer) List(context.Context, *grpc_health_v1.HealthListRequest) (*grpc_health_v1.HealthListResponse, error)
- func (h *HealthCheckServer) RegisterServer(serv *grpc.Server)
- func (h *HealthCheckServer) SetServingStatus(servingStatus grpc_health_v1.HealthCheckResponse_ServingStatus)
- func (h *HealthCheckServer) Shutdown()
- func (h *HealthCheckServer) Watch(_ *grpc_health_v1.HealthCheckRequest, stream grpc_health_v1.Health_WatchServer) error
- type Informer
- type Plugin
- func (p *Plugin) AddWorker() error
- func (p *Plugin) Collects() []*dep.In
- func (p *Plugin) Init(cfg api.Configurer, log api.Logger, server api.Server) error
- func (p *Plugin) MetricsCollector() []prometheus.Collector
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() (*status.Status, error)
- func (p *Plugin) RemoveWorker(ctx context.Context) error
- func (p *Plugin) Reset() error
- func (p *Plugin) Serve() chan error
- func (p *Plugin) Status() (*status.Status, error)
- func (p *Plugin) Stop(ctx context.Context) error
- func (p *Plugin) Workers() []*process.State
- type ReflectionConfig
- type StatsExporter
- type TLS
- type Tracer
Constants ¶
View Source
const (
RrMode string = "RR_MODE"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientAuthType ¶
type ClientAuthType string
const ( NoClientCert ClientAuthType = "no_client_cert" RequestClientCert ClientAuthType = "request_client_cert" RequireAnyClientCert ClientAuthType = "require_any_client_cert" VerifyClientCertIfGiven ClientAuthType = "verify_client_cert_if_given" RequireAndVerifyClientCert ClientAuthType = "require_and_verify_client_cert" )
type Config ¶
type Config struct {
Listen string `mapstructure:"listen"`
Proto []string `mapstructure:"proto"`
Reflection *ReflectionConfig `mapstructure:"reflection"`
TLS *TLS `mapstructure:"tls"`
// Env is environment variables passed to the http pool
Env map[string]string `mapstructure:"env"`
GrpcPool *pool.Config `mapstructure:"pool"`
MaxSendMsgSize int64 `mapstructure:"max_send_msg_size"`
MaxRecvMsgSize int64 `mapstructure:"max_recv_msg_size"`
MaxConnectionIdle time.Duration `mapstructure:"max_connection_idle"`
MaxConnectionAge time.Duration `mapstructure:"max_connection_age"`
MaxConnectionAgeGrace time.Duration `mapstructure:"max_connection_age_grace"`
MaxConcurrentStreams int64 `mapstructure:"max_concurrent_streams"`
PingTime time.Duration `mapstructure:"ping_time"`
Timeout time.Duration `mapstructure:"timeout"`
}
func (*Config) EnableReflection ¶ added in v5.2.19
func (*Config) InitDefaults ¶
type HealthCheckServer ¶
type HealthCheckServer struct {
grpc_health_v1.HealthCheckRequest
// contains filtered or unexported fields
}
func NewHeathServer ¶
func NewHeathServer(p *Plugin, log *zap.Logger) *HealthCheckServer
func (*HealthCheckServer) Check ¶
func (h *HealthCheckServer) Check(_ context.Context, _ *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
func (*HealthCheckServer) List ¶
func (h *HealthCheckServer) List(context.Context, *grpc_health_v1.HealthListRequest) (*grpc_health_v1.HealthListResponse, error)
List provides a non-atomic snapshot of the health of all the available services.
The server may respond with a RESOURCE_EXHAUSTED error if too many services exist.
Clients should set a deadline when calling List, and can declare the server unhealthy if they do not receive a timely response.
Clients should keep in mind that the list of health services exposed by an application can change over the lifetime of the process.
func (*HealthCheckServer) RegisterServer ¶
func (h *HealthCheckServer) RegisterServer(serv *grpc.Server)
func (*HealthCheckServer) SetServingStatus ¶
func (h *HealthCheckServer) SetServingStatus(servingStatus grpc_health_v1.HealthCheckResponse_ServingStatus)
func (*HealthCheckServer) Shutdown ¶
func (h *HealthCheckServer) Shutdown()
func (*HealthCheckServer) Watch ¶
func (h *HealthCheckServer) Watch(_ *grpc_health_v1.HealthCheckRequest, stream grpc_health_v1.Health_WatchServer) error
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) MetricsCollector ¶
func (p *Plugin) MetricsCollector() []prometheus.Collector
type ReflectionConfig ¶ added in v5.2.19
type ReflectionConfig struct {
ImportPaths []string `mapstructure:"import_paths"`
}
type StatsExporter ¶
type StatsExporter struct {
TotalMemoryDesc *prometheus.Desc
StateDesc *prometheus.Desc
WorkerMemoryDesc *prometheus.Desc
TotalWorkersDesc *prometheus.Desc
WorkersReady *prometheus.Desc
WorkersWorking *prometheus.Desc
WorkersInvalid *prometheus.Desc
Workers Informer
}
func (*StatsExporter) Collect ¶
func (s *StatsExporter) Collect(ch chan<- prometheus.Metric)
func (*StatsExporter) Describe ¶
func (s *StatsExporter) Describe(d chan<- *prometheus.Desc)
type TLS ¶
type TLS struct {
Key string `mapstructure:"key"`
Cert string `mapstructure:"cert"`
RootCA string `mapstructure:"root_ca"`
AuthType ClientAuthType `mapstructure:"client_auth_type"`
// contains filtered or unexported fields
}
type Tracer ¶
type Tracer interface {
Tracer() *sdktrace.TracerProvider
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.