pulse

package
v0.0.0-...-082087d Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Integration

type Integration struct {
	Client *sdk.Client
	// contains filtered or unexported fields
}

Integration wraps the Pulse SDK client.

func New

func New(cfg config.PulseConfig, serverHost string, serverPort int, serviceAPIKey string, logger *slog.Logger) (*Integration, error)

New creates and registers with Pulse using retry/backoff. Returns nil (not an error) if Pulse is not configured (empty URL). Returns nil + error if Pulse is configured but unreachable after retries — the caller should continue in standalone mode.

serviceAPIKey is this Haul instance's own API key. It's sent during registration so Pilot/Prism can discover and authenticate with Haul via Pulse's service registry.

func (*Integration) Close

func (i *Integration) Close()

Close stops heartbeats.

func (*Integration) DiscoverWithKeys

func (i *Integration) DiscoverWithKeys(ctx context.Context) ([]PeerService, error)

DiscoverWithKeys returns siblings registered with Pulse, including their API keys. Used by Haul's research-proxy endpoint to authenticate server-to-server calls into Pilot/Prism without requiring the user to wire per-service credentials.

type PeerService

type PeerService struct {
	Name   string `json:"name"`
	Type   string `json:"type"`
	APIURL string `json:"api_url"`
	APIKey string `json:"api_key"`
}

PeerService is a sibling Beacon service registered with Pulse, including its API key. Only available via DiscoverWithKeys, not the SDK's DiscoverAll, since the SDK's Service struct on the pinned version doesn't include the key.

Jump to

Keyboard shortcuts

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