heartbeat

package
v1.0.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstanceReportSecretName = "replicated-instance-report"
	InstanceReportSecretKey  = "report"
	InstanceReportEventLimit = 4000
)

Variables

This section is empty.

Functions

func CreateInstanceReportEvent

func CreateInstanceReportEvent(clientset kubernetes.Interface, namespace string, event heartbeattypes.InstanceReportEvent) error

func DecodeInstanceReport

func DecodeInstanceReport(encodedData []byte) (*heartbeattypes.InstanceReport, error)

func EncodeInstanceReport

func EncodeInstanceReport(r *heartbeattypes.InstanceReport) ([]byte, error)

func GetDistribution

func GetDistribution(clientset kubernetes.Interface) types.Distribution

func GetHeartbeatInfo

func GetHeartbeatInfo(sdkStore store.Store) *types.HeartbeatInfo

func GetHeartbeatInfoHeaders

func GetHeartbeatInfoHeaders(heartbeatInfo *types.HeartbeatInfo) map[string]string

func GetHeartbeatInfoPayload

func GetHeartbeatInfoPayload(heartbeatInfo *types.HeartbeatInfo) (map[string]interface{}, error)

func InjectHeartbeatInfoHeaders

func InjectHeartbeatInfoHeaders(req *http.Request, heartbeatInfo *types.HeartbeatInfo)

func InjectHeartbeatInfoPayload

func InjectHeartbeatInfoPayload(reqPayload map[string]interface{}, heartbeatInfo *types.HeartbeatInfo) error

func SendAirgapHeartbeat

func SendAirgapHeartbeat(clientset kubernetes.Interface, namespace string, licenseID string, heartbeatInfo *types.HeartbeatInfo) error

func SendAppHeartbeat

func SendAppHeartbeat(clientset kubernetes.Interface, sdkStore store.Store) error

func SendOnlineHeartbeat

func SendOnlineHeartbeat(license *v1beta1.License, heartbeatInfo *types.HeartbeatInfo) error

func Start

func Start() error

Start will configure and start a heartbeat cron job for the app to send checkins to the server: if enabled, and cron job was NOT found: add a new cron job to send heartbeats if enabled, and a cron job was found, update the existing cron job with the latest cron spec if disabled: stop the current running cron job (if exists)

func Stop

func Stop()

Stop will stop a running cron job (if exists) for the app

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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