Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Integration ¶
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) 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.