heartbeat

package
v0.0.0-...-b350035 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HEARTBEAT_PID = "heartbeat"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Heartbeat

type Heartbeat interface {
	Start(context.Context) error
	Stop(context.Context) error
}

func NewSqsHeartbeat

func NewSqsHeartbeat(
	client service.Sqs,
	queueUrl string,
	heartbeatInterval time.Duration,
	visibilityTimeout int,
	bufferSize int,
	handler ctypes.HandleMessage[types.Message],
) (ctypes.HandleMessage[types.Message], Heartbeat)

type HeartbeatFunc

type HeartbeatFunc func(ctx context.Context, message any)

type SqsHeartbeat

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

func (*SqsHeartbeat) ProcessHeartbeats

func (h *SqsHeartbeat) ProcessHeartbeats(ctx context.Context)

func (*SqsHeartbeat) SendHeatbeat

func (h *SqsHeartbeat) SendHeatbeat(receiptHandle string)

func (*SqsHeartbeat) Start

func (h *SqsHeartbeat) Start(ctx context.Context) error

func (*SqsHeartbeat) Stop

func (h *SqsHeartbeat) Stop(_ context.Context) error

Jump to

Keyboard shortcuts

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