heartbeat

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package heartbeat defines the heartbeat system that starts up along side the stream replicator. If configured it will send a heartbeat messages to the configured subjects on a configurable interval.

Index

Constants

View Source
const (
	DefaultUpdateInterval = "10s"
	OriginatorHeader      = "Choria-SR-Originator"
	SubjectHeader         = "Choria-SR-Subject"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HeartBeat

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

func New

func New(hbcfg *config.HeartBeat, replicatorName string, log *logrus.Entry) (*HeartBeat, error)

New creates a new instance of the Heartbeat struct

func (*HeartBeat) Run

func (hb *HeartBeat) Run(ctx context.Context, wg *sync.WaitGroup) error

Run initializes a the jetstream connection and spawns a go routine for every configured subject that will publish a heartbeat message on the defined interval

type Subject

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

Jump to

Keyboard shortcuts

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