Documentation
¶
Index ¶
- Variables
- func GRPCErrorInc()
- func GRPCPanicInc()
- func StartServerWithWaiting(ctx context.Context, f func(errCh chan error)) error
- func WithSQLMetrics(queryName, serviceName string, callFunc func() error) error
- type App
- type Module
- type Provider
- type Runnable
- type ServerList
- type ServerPool
- type ServiceList
- type ServicePool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DBMetrics = promauto.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "connections", Subsystem: "sql", Name: "call_duration_seconds", Help: "query duration seconds", Buckets: []float64{.005, .01, .025, .05, .075, .1, .15, .2, .25, .5, 1, 2.5}, }, []string{"query", "service", "error"}, ) GRPCErrorMetrics = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "grpc", Name: "error_total", Help: "Number of grpc errors.", }) GRPCPanicMetrics = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "grpc", Name: "panic_total", Help: "Number of grpc panic.", }) )
Functions ¶
func GRPCErrorInc ¶
func GRPCErrorInc()
func GRPCPanicInc ¶
func GRPCPanicInc()
func StartServerWithWaiting ¶
func WithSQLMetrics ¶
Types ¶
type Provider ¶
type Provider struct { CreateFunc interface{} Options []dig.ProvideOption }
type ServerList ¶
type ServerList []Runnable
type ServerPool ¶
type ServerPool struct {
// contains filtered or unexported fields
}
func NewServerPool ¶
func NewServerPool(sl ServerList, logger *zap.Logger) *ServerPool
func (*ServerPool) Stop ¶
func (p *ServerPool) Stop(ctx context.Context)
type ServiceList ¶
type ServiceList []Runnable
type ServicePool ¶
type ServicePool struct {
// contains filtered or unexported fields
}
func NewServicePool ¶
func NewServicePool(sl ServiceList, logger *zap.Logger) *ServicePool
func (*ServicePool) Stop ¶
func (p *ServicePool) Stop(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.