Skip to content

Repository files navigation

This library serves as an internal library as a client for the StackState platform receiver.

Part of the receiver API is compatible with DataDog, those parts are extracted here, another part is new and comes from stackstate-openapi.

OpenAPI connection options

NewOpenAPIClientWithOptions constructs an authenticated client with its own HTTP transport and a required request timeout. Supply the final Receiver URL: redirects are rejected, including same-host HTTP-to-HTTPS and trailing-slash redirects. Set ConnectionOptions.ProxyURL explicitly when a proxy is required; the transport does not read proxy environment variables. TLS uses the system trust store.

Provide exactly one authentication source: APIKey or ServiceAccountToken. The token callback is read on every request, including after rotation; empty credentials and header delimiters are rejected. The existing NewOpenAPIClient signature, Connect() method and legacy authentication behavior remain available unchanged.

Capability queries

Feature queries bound attempts, elapsed time and response bodies (1 MiB). Set QueryOptions.BooleanCapabilities to the keys the consumer requires as booleans, such as otel-logs or k8s-rbac. Missing keys are valid, unrelated values are preserved, and an empty list checks only the response object. A 404 means the endpoint was not found; it cannot distinguish an older Receiver from an incorrect base path. Query results expose status and outcome without raw URLs, errors or bodies.

Proxy authentication rejection (407), including HTTPS CONNECT, is a configuration failure. CONNECT 5xx responses remain transient; other permanent CONNECT rejections do not imply an unsupported Receiver.

Client.StartPolling replaces StartFeaturesPoller. Callers must migrate to the cancellable poller and handle classified results.

Bumping the openapi version

  • Change the version/branch/commit sha in the stackstate_openapi/openapi_version file
  • Run nix develop -c ./scripts/generate_receiver_api.sh
  • Commit the generated code

About

Go client library for the SUSE Observability Receiver (transactional delivery + OpenAPI client). Migrated from GitLab, STAC-25142.

Resources

Security policy

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages