EdgeAIG's picture
download
raw
1.37 kB
/**
* Branded integer identifiers for cluster runners. A `MachineId` marks the
* machine component used by cluster services, especially snowflake id
* generation, while keeping the value distinct from an ordinary `number` in
* TypeScript APIs.
*
* @since 4.0.0
*/
import * as Schema from "../../Schema.ts";
/**
* Schema for branded integer machine identifiers used by the cluster.
*
* @category constructors
* @since 4.0.0
*/
export declare const MachineId: Schema.brand<Schema.Int, "~effect/cluster/MachineId">;
/**
* Branded integer type representing a cluster machine ID.
*
* @category models
* @since 4.0.0
*/
export type MachineId = typeof MachineId.Type;
/**
* Brands a number as a `MachineId`.
*
* **When to use**
*
* Use to turn a trusted numeric machine id into the branded type when
* implementing runner storage adapters or configuring snowflake generation.
*
* **Details**
*
* The branded value is the original number at runtime.
*
* **Gotchas**
*
* `make` does not validate integer input or enforce the snowflake machine-id
* range. Snowflake ids encode the machine component modulo 1024.
*
* @see {@link MachineId} for the schema that validates branded integer machine identifiers
*
* @category constructors
* @since 4.0.0
*/
export declare const make: (id: number) => MachineId;
//# sourceMappingURL=MachineId.d.ts.map

Xet Storage Details

Size:
1.37 kB
·
Xet hash:
200ac63f743bda6a61d0eabe21ff357a1757e1d8fd411a62f58bb29d0d53bd83

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.