Private
Public Access
feat: initial Go/JS/Rust Origin check-in client SDKs
CI / rust (push) Successful in 3m6s
CI / go (push) Successful in 33s
CI / js (push) Successful in 34s
CI / rust (push) Successful in 3m6s
CI / go (push) Successful in 33s
CI / js (push) Successful in 34s
Standalone clients that resolve a machine unique ID (OS machine ID first, falling back to a generated UUID persisted to disk), detect hostname/IP/ container/orchestrator, and register+re-ping origin.warky.dev's public service-checkin endpoint on a daily interval. Ported from icy2's internal origincheckin package but extended to the full check-in contract and made dependency-light for external reuse. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,44 @@
|
||||
# origin_client
|
||||
|
||||
origin client
|
||||
Client SDKs that register a running service with
|
||||
[Origin](https://origin.warky.dev)'s public check-in endpoint and re-ping it
|
||||
on an interval. One package per language, same wire contract, same behavior.
|
||||
|
||||
## Packages
|
||||
|
||||
| Language | Path | Module/package |
|
||||
|---|---|---|
|
||||
| Go | [`go/`](go/) | `git.warky.dev/wdevs/origin_client/go` |
|
||||
| JavaScript/TypeScript | [`js/`](js/) | `@warkanum/origin-client` |
|
||||
| Rust | [`rust/`](rust/) | `origin-client` |
|
||||
|
||||
## What it does
|
||||
|
||||
- Resolves a machine unique ID: real OS ID first (`/etc/machine-id` on
|
||||
Linux, `IOPlatformUUID` on macOS, `MachineGuid` on Windows), falling back
|
||||
to a generated UUID persisted to disk.
|
||||
- Detects hostname, outbound IP, container ID (Docker/cgroup), and
|
||||
orchestrator (Kubernetes/Docker) best-effort.
|
||||
- POSTs a check-in payload to Origin immediately, then again every
|
||||
`interval_hours` (default 24), until stopped. Network/server failures are
|
||||
logged and swallowed — check-in never crashes or blocks the host app.
|
||||
|
||||
## Wire contract
|
||||
|
||||
`POST {base_url}` (default `https://origin.warky.dev/api/public/service-checkin`)
|
||||
with header `X-Origin-Service-Key: <your key>`.
|
||||
|
||||
Required: `type`, `version`, `name`, `unique_install_id`.
|
||||
Optional: `site`, `environment`, `database_type`, `database_name`,
|
||||
`app_type`, `hostname`, `port`, `base_url`, `internal_url`, `container_id`,
|
||||
`orchestrator`, `description`.
|
||||
|
||||
Response: `success`, `service_instance_id`, `unique_install_id`, `status`,
|
||||
`pinged_at`.
|
||||
|
||||
Full contract: see `origin/doc/service-checkin.md` in the Origin repo.
|
||||
|
||||
## Status
|
||||
|
||||
Structured for independent versioning/publishing per package. Not yet
|
||||
published to any registry.
|
||||
|
||||
Reference in New Issue
Block a user