shipper

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heartbeat

type Heartbeat struct {
	AgentID   string    `json:"agent_id"`
	Timestamp time.Time `json:"timestamp"`
	Version   string    `json:"version"`
	OSVersion string    `json:"os_version"`
	Uptime    float64   `json:"uptime_seconds,omitempty"`
}

Heartbeat represents an agent heartbeat message

type PermanentError

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

PermanentError represents a non-retryable error

type Shipper

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

Shipper sends signals to the backend

func NewShipper

func NewShipper(cfg *config.ShipperConfig, db *state.DB, agentID, version string) *Shipper

NewShipper creates a new signal shipper

func (*Shipper) EnqueueSignal

func (s *Shipper) EnqueueSignal(sig *state.Signal) error

EnqueueSignal adds a signal to the shipping queue

func (*Shipper) GetMetrics

func (s *Shipper) GetMetrics() (sent, failed, requeued int64)

GetMetrics returns current metrics (for testing/monitoring)

func (*Shipper) Start

func (s *Shipper) Start(ctx context.Context) error

Start begins the shipping loop

func (*Shipper) StartHeartbeat

func (s *Shipper) StartHeartbeat(ctx context.Context) error

StartHeartbeat begins sending periodic heartbeat pings to the backend

Jump to

Keyboard shortcuts

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