heartbeat

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package heartbeat provides functionality for managing heartbeats in Opsgenie.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeartbeatRepository

type HeartbeatRepository interface {
	// CreateOrUpdate creates or updates the heartbeat for the management cluster.
	CreateOrUpdate(ctx context.Context) error

	// Delete deletes the heartbeat for the management cluster.
	Delete(ctx context.Context) error
}

HeartbeatRepository is the interface for the heartbeat repository. It provides methods to create or update and delete a heartbeat. The heartbeat is used by the monitoring system to detect if the management cluster is alive. The current implementation relies on OpsGenie but other implementations can be added in the future.

func NewOpsgenieHeartbeatRepository

func NewOpsgenieHeartbeatRepository(apiKey string, mc common.ManagementCluster) (HeartbeatRepository, error)

NewOpsgenieHeartbeatRepository creates a new OpsgenieHeartbeatRepository.

type OpsgenieHeartbeatRepository

type OpsgenieHeartbeatRepository struct {
	*heartbeat.Client
	common.ManagementCluster
}

OpsgenieHeartbeatRepository is a repository for managing heartbeats in Opsgenie.

func (*OpsgenieHeartbeatRepository) CreateOrUpdate

func (r *OpsgenieHeartbeatRepository) CreateOrUpdate(ctx context.Context) error

func (*OpsgenieHeartbeatRepository) Delete

Jump to

Keyboard shortcuts

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