NorskManager class
The entrypoint for all Norsk Manager applications
Signature:
export declare class NorskManager
Properties
| Property | Type | Description |
|---|---|---|
The daemon’s hello: its wire-protocol version, build label and the protocol skew against this SDK. Set alongside |
||
Norsk Runtime version information |
Methods
| Method | Modifiers | Description |
|---|---|---|
abortMigration(jobId, sourceRole, targetRole, reason, migrationId) |
Abort an in-flight migration. Manager dispatches |
|
Append a caller-supplied event to the durable audit log — for norsk-mgr-origin actions that don’t pass through another RPC. The daemon assigns the seq and chains it. |
||
Close down the Norsk connection |
||
Worker-facing call: the worker presents its registration token and tells Manager where to dial back. On success Manager raises Online on its provider bus and dials the worker; on Unauthenticated the token is unknown (or has been deregistered). Most consumers won’t call this directly — |
||
Stops a running job |
||
|
Connect to the Norsk Manager |
|
Spawn a new EC2 instance running the worker image, and make it available for picking up jobs |
||
Create a bundle (AutoManager v1). The bundle is passed in raw PB form — auto-manager (or any other consumer) is expected to convert its own typed Bundle to PB before calling. Returns the assigned bundleId so the caller can correlate later events. |
||
Create a new job |
||
Spawn a new OCI instance running the worker image, and make it available for picking up jobs |
||
Delete a bundle (AutoManager v1). |
||
Deletes a job |
||
Remove a cluster slot. If a worker is currently connected on this slot, its gRPC stream is closed and any running jobs are stopped. The token is invalidated. |
||
Cloud facts for a machine-type form prefill: vCPU / memory / architectures for an EC2 instance type, from the Manager’s instance-type cache. Authoritative for capacity ≡ vCPUs. Returns undefined when the instance type is unknown to the cloud. |
||
Provides a stream of the activity that is happening on the server-side. Reacting to these events is essential for the creation of client-side management logic. |
||
The most recent audit-log entries (newest first), plus whether the daemon’s hash chain verified on its last boot. |
||
What idle expiry applies to a node: |
||
Search for jobs by id |
||
Search for jobs by tag/date/etc. See JobSearchSettings |
||
List all registered cluster slots (active + inactive). Includes the tokens — visible to operators so they can re-copy on demand. |
||
Return a list a all the nodes the manager knows about. |
||
Security groups dev-ops marked selectable for workers (tagged |
||
Record a durable terminal-failed verdict on a job (AutoManager writeback when it gives up: restart ceiling exceeded / bronze drop). The job is marked terminally failed and persisted so it is not re-placed after a restart. |
||
notifyMigrationCutoverApply(targetJobKey, migrationId, payload) |
Tell the target worker "the source stopped output at |
|
notifyMigrationCutoverReady(sourceJobKey, migrationId, payload) |
Tell the source worker "the target is ready at |
|
The propose step (Phase F): ask the SOURCE what state it would hand over, before any target has been placed. The source’s answer — a payload, or a refusal — comes back asynchronously on the event stream as |
||
Pre-warm a node (Phase G, warm nodes): tell its worker to pull these image refs now, so a later job start there finds them local. Returns as soon as the worker has been told — the per-ref outcome arrives asynchronously on the event stream as A failure on one ref never fails the others; each ref’s result says for itself. |
||
Operator-initiated retention prune of the audit log. Clears entries strictly older than |
||
Pre-register a cluster slot. Returns a |
||
Reassign a cluster slot to a different pool. Empty string = unassign. If the slot is currently active, Manager cycles Stopping/Terminated/ Online so the updated |
||
Give ONE node its own grace period before the empty-node reaper terminates it, overriding the daemon-wide value. Pass 0 to clear the override and go back to the daemon-wide value. The setting is daemon-owned and persisted: it survives a Manager restart, which is exactly when a node deliberately kept warm would otherwise be reaped. |
||
Merge tags onto a node: a key given here replaces its value, keys not given are untouched. The daemon persists the edit and re-applies it when it rediscovers the node after a restart, pushes it to the provider, and announces the node’s new metadata as a |
||
Activate a dormant (start_mode = "manual") bundle job. Manager removes the dormant tag and re-emits jobUpdated; placement picks the job up via the normal flow. See §10.2 of the AutoManager design. |
||
Start a job on a node |
||
Start an instance that was provisioned with |
||
Deactivate a bundle job by re-stamping the dormant tag. v1 caveat: this is the tag-flip half only. Runtime termination of any currently-running workload and empty-node release with linger are tracked as Phase E.5 (pre-go-live). See §10.2.1. |
||
Stop a job running on a node |
||
Forcibly stop a node |
||
Update a bundle (AutoManager v1). Same convention as createBundle — caller passes raw PB. |
||
Update a job |