Skip to content

fix: improve SDK client examples#272

Merged
retr0h merged 6 commits intomainfrom
fix/sdk-client-examples
Mar 16, 2026
Merged

fix: improve SDK client examples#272
retr0h merged 6 commits intomainfrom
fix/sdk-client-examples

Conversation

@retr0h
Copy link
Collaborator

@retr0h retr0h commented Mar 16, 2026

Summary

  • health.go: Show all status fields — components, registry, NATS,
    agents, jobs, consumers, streams, KV buckets, object stores
  • job.go: Rewrite to use actual SDK methods; trigger via domain op
    instead of non-existent Job.Create
  • audit.go: Add Export demonstration
  • network.go: Require OSAPI_INTERFACE env var instead of broken
    eth0 default
  • all: Fix client := client.New shadowing → c := client.New
  • metrics.go: Remove (SDK MetricsService was already deleted)

All examples verified against a live osapi instance.

🤖 Generated with Claude Code

- health.go: show all status fields (components, registry,
  NATS, agents, jobs, consumers, streams, KV buckets, stores)
- job.go: rewrite to use actual SDK methods (Job.Get, Job.List)
  instead of non-existent Job.Create; trigger job via domain op
- audit.go: add Export demonstration
- network.go: require OSAPI_INTERFACE instead of defaulting to
  eth0 which doesn't exist on macOS
- all: fix variable shadowing (client := client.New → c :=)
- metrics.go: remove, SDK MetricsService was already deleted

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

Thank you for contributing to this project! 😊🕹️

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #272   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files         227      227           
  Lines        9925     9925           
=======================================
  Hits         9910     9910           
  Misses         11       11           
  Partials        4        4           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5c0fc4...aabfaf2. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

retr0h and others added 2 commits March 15, 2026 17:16
- Add missing docker-image-remove.go operation example
- Fix hardcoded eth0 in network-dns-get.go and
  network-dns-update.go — require OSAPI_INTERFACE env var

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
retr0h and others added 2 commits March 15, 2026 17:26
GoReleaser builds binaries into dist/ which the Dockerfile
needs to COPY into the image.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@retr0h retr0h merged commit ea5d6ef into main Mar 16, 2026
11 checks passed
@retr0h retr0h deleted the fix/sdk-client-examples branch March 16, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant