Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MetricsLabels = []string{
metricsMethodLabel,
metricsPathLabel,
metricsCodeLabel,
}
MetricsLabels - Array of labels added to metrics:
var MetricsNames = []string{
requestCount,
requestDuration,
}
MetricsNames - Array of Names of the metrics:
var PathVarSub = "-"
PathVarSub replaces path variables to a same character
Functions ¶
func MetricsMiddleware ¶
MetricsMiddleware creates a new handler that collects metrics for the requests processed by the given handler.
func NewHealthCheckServer ¶
func NewHealthCheckServer() *healthCheckServer
func ResetMetricCollectors ¶
func ResetMetricCollectors()
ResetMetricCollectors resets all prometheus collectors
Types ¶
type ControllersServer ¶
type ControllersServer struct { KindControllerManager *controllers.KindControllerManager DB db.SessionFactory }
func NewControllersServer ¶
func NewControllersServer() *ControllersServer
func (ControllersServer) Start ¶
func (s ControllersServer) Start(ctx context.Context)
Start is a blocking call that starts this controller server
type GRPCServer ¶
type GRPCServer struct { pbv1.UnimplementedCloudEventServiceServer // contains filtered or unexported fields }
GRPCServer includes a gRPC server and a resource service
func NewGRPCServer ¶
func NewGRPCServer(resourceService services.ResourceService, eventBroadcaster *event.EventBroadcaster, config config.GRPCServerConfig) *GRPCServer
NewGRPCServer creates a new GRPCServer
func (*GRPCServer) Publish ¶
func (svr *GRPCServer) Publish(ctx context.Context, pubReq *pbv1.PublishRequest) (*emptypb.Empty, error)
Publish implements the Publish method of the CloudEventServiceServer interface
func (*GRPCServer) Subscribe ¶
func (svr *GRPCServer) Subscribe(subReq *pbv1.SubscriptionRequest, subServer pbv1.CloudEventService_SubscribeServer) error
Subscribe implements the Subscribe method of the CloudEventServiceServer interface
type PulseServer ¶
type PulseServer struct {
// contains filtered or unexported fields
}
PulseServer represents a server responsible for periodic heartbeat updates and checking the liveness of Maestro instances, triggering status resync based on instances' status and other conditions.
func NewPulseServer ¶
func NewPulseServer(eventBroadcaster *event.EventBroadcaster) *PulseServer
func (*PulseServer) Start ¶
func (s *PulseServer) Start(ctx context.Context)
Start initializes and runs the pulse server, updating and checking Maestro instances' liveness, initializes subscription to status update messages and triggers status resync based on instances' status and other conditions.