Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLoggingFlag ¶
AddLoggingFlag adds logging flag for SharedFlags
Types ¶
type AdminServer ¶
type AdminServer struct {
// contains filtered or unexported fields
}
AdminServer runs an HTTP server with admin endpoints, such as healthcheck at /, /metrics, etc.
func NewAdminServer ¶
func NewAdminServer(hostPort string) *AdminServer
NewAdminServer creates a new admin server.
func (*AdminServer) AddFlags ¶
func (s *AdminServer) AddFlags(flagSet *flag.FlagSet)
AddFlags registers CLI flags.
func (*AdminServer) HC ¶
func (s *AdminServer) HC() *healthcheck.HealthCheck
HC returns the reference to HeathCheck.
type Service ¶
type Service struct { // AdminPort is the HTTP ports number for admin server. AdminPort int // NoStorage indicates that storage type CLI flag is not applicable NoStorage bool // Admin is the admin server that hosts the health check and metrics endpoints. Admin *AdminServer // Logger is initialized after parsing Viper flags like --log-level. Logger *zap.Logger // MetricsFactory is the root factory without a namespace. MetricsFactory metrics.Factory // contains filtered or unexported fields }
Service represents an abstract Jaeger backend component with some basic shared functionality.
func (*Service) HC ¶
func (s *Service) HC() *healthcheck.HealthCheck
HC returns the reference to HeathCheck.
func (*Service) RunAndThen ¶
func (s *Service) RunAndThen(shutdown func())
RunAndThen sets the health check to Ready and blocks until SIGTERM is received. If then runs the shutdown function and exits.
func (*Service) SetHealthCheckStatus ¶
func (s *Service) SetHealthCheckStatus(status healthcheck.Status)
SetHealthCheckStatus sets status of healthcheck
type SharedFlags ¶
type SharedFlags struct {
Logging logging
}SharedFlags holds flags configuration
func (*SharedFlags) InitFromViper ¶
func (flags *SharedFlags) InitFromViper(v *viper.Viper) *SharedFlags
InitFromViper initializes SharedFlags with properties from viper