handlers

package
v0.0.0-...-7c3f5be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AMLabelAlertName           = "alertname"
	AMLabelTemplateName        = "managed_notification_template"
	AMLabelManagedNotification = "send_managed_notification"
	AMLabelAlertMCID           = "_mc_id"
	AMLabelAlertHCID           = "_id"

	LogFieldNotificationName           = "notification"
	LogFieldNotificationRecordName     = "notification_record"
	LogFieldResendInterval             = "resend_interval"
	LogFieldAlertname                  = "alertname"
	LogFieldAlert                      = "alert"
	LogFieldIsFiring                   = "is_firing"
	LogFieldManagedNotification        = "managed_notification_cr"
	LogFieldPostServiceLogOpId         = "post_servicelog_operation_id"
	LogFieldPostServiceLogFailedReason = "post_servicelog_failed_reason"

	// Header returned in OCM responses
	HeaderOperationId = "X-Operation-Id"
)
View Source
const (
	OCMAgentNamespaceName = "openshift-ocm-agent-operator"
)
View Source
const OCM_OPERATION_ID_HEADER = "X-Operation-Id"

Variables

This section is empty.

Functions

This section is empty.

Types

type AMReceiverAlert

type AMReceiverAlert template.Alert

type AMReceiverData

type AMReceiverData template.Data

Use prometheus alertmanager template type for post data

type AMReceiverResponse

type AMReceiverResponse struct {
	Error  error
	Code   int
	Status string
}

Alert Manager receiver response

type ClusterHandler

type ClusterHandler struct {
	// contains filtered or unexported fields
}

func NewClusterHandler

func NewClusterHandler(o ocm.OCMClient, clusterId string) *ClusterHandler

For /api/clusters_mgmt/v1/clusters/{cluster_id} https://api.openshift.com/#/default/get_api_clusters_mgmt_v1_clusters__cluster_id_

type LivezHandler

type LivezHandler struct {
}

func NewLivezHandler

func NewLivezHandler() *LivezHandler

func (*LivezHandler) ServeHTTP

func (h *LivezHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type LivezResponse

type LivezResponse struct {
	Status string
}

live probe endpoint response

type OCMResponseBody

type OCMResponseBody struct {
	Reason string `json:"reason"`
}

type ReadyzHandler

type ReadyzHandler struct {
}

func NewReadyzHandler

func NewReadyzHandler() *ReadyzHandler

func (*ReadyzHandler) ServeHTTP

func (h *ReadyzHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ReadyzResponse

type ReadyzResponse struct {
	Status string
}

ready probe endpoint response

type UpgradePoliciesHandler

type UpgradePoliciesHandler struct {
	// contains filtered or unexported fields
}

UpgradePoliciesHandler represents a request or requests to the upgrade policies endpoint set in OCM.

func NewUpgradePoliciesHandler

func NewUpgradePoliciesHandler(o ocm.OCMClient, clusterId string) *UpgradePoliciesHandler

Creates a new UpgradePoliciesHandler instance.

func (*UpgradePoliciesHandler) ServeUpgradePolicyGet

func (g *UpgradePoliciesHandler) ServeUpgradePolicyGet(w http.ResponseWriter, r *http.Request)

ServeUpgradePolicyGet reads and writes raw HTTP requests and proxies them to the 'get', 'update', and 'delete' endpoints for upgrade policies

func (*UpgradePoliciesHandler) ServeUpgradePolicyList

func (g *UpgradePoliciesHandler) ServeUpgradePolicyList(w http.ResponseWriter, r *http.Request)

ServeUpgradePolicyList reads and writes raw HTTP requests and proxies them to the 'list' endpoints for upgrade policies

func (*UpgradePoliciesHandler) ServeUpgradePolicyState

func (g *UpgradePoliciesHandler) ServeUpgradePolicyState(w http.ResponseWriter, r *http.Request)

ServeUpgradePolicyState reads and writes raw HTTP requests and proxies them to the 'get' and 'update' endpoints for upgrade policy states.

type WebhookRHOBSReceiverHandler

type WebhookRHOBSReceiverHandler struct {
	// contains filtered or unexported fields
}

func NewWebhookRHOBSReceiverHandler

func NewWebhookRHOBSReceiverHandler(c client.Client, o ocm.OCMClient) *WebhookRHOBSReceiverHandler

func (*WebhookRHOBSReceiverHandler) ServeHTTP

type WebhookReceiverHandler

type WebhookReceiverHandler struct {
	// contains filtered or unexported fields
}

func NewWebhookReceiverHandler

func NewWebhookReceiverHandler(c client.Client, o ocm.OCMClient) *WebhookReceiverHandler

func (*WebhookReceiverHandler) ServeHTTP

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL