EdgeAIG/opencode / .opencode /node_modules /effect /dist /unstable /cluster /ShardingRegistrationEvent.d.ts
| /** | |
| * The `ShardingRegistrationEvent` module models the live notifications emitted | |
| * by `Sharding` when the local runner registers an entity handler or singleton. | |
| * Consumers can use these events to wait for registrations during startup, | |
| * inspect which capabilities a runner made available, or assert registration | |
| * behavior in tests. | |
| * | |
| * @since 4.0.0 | |
| */ | |
| import * as Data from "../../Data.ts"; | |
| import type { Entity } from "./Entity.ts"; | |
| import type { SingletonAddress } from "./SingletonAddress.ts"; | |
| /** | |
| * Represents events that can occur when a runner registers entities or singletons. | |
| * | |
| * @category models | |
| * @since 4.0.0 | |
| */ | |
| export type ShardingRegistrationEvent = EntityRegistered | SingletonRegistered; | |
| /** | |
| * Represents an event that occurs when a new entity is registered with a runner. | |
| * | |
| * @category models | |
| * @since 4.0.0 | |
| */ | |
| export interface EntityRegistered { | |
| readonly _tag: "EntityRegistered"; | |
| readonly entity: Entity<any, any>; | |
| } | |
| /** | |
| * Represents an event that occurs when a new singleton is registered with a | |
| * runner. | |
| * | |
| * @category models | |
| * @since 4.0.0 | |
| */ | |
| export interface SingletonRegistered { | |
| readonly _tag: "SingletonRegistered"; | |
| readonly address: SingletonAddress; | |
| } | |
| /** | |
| * Constructors and matchers for sharding registration events. | |
| * | |
| * @category pattern matching | |
| * @since 4.0.0 | |
| */ | |
| export declare const match: { | |
| <Cases extends { | |
| readonly EntityRegistered: (args: EntityRegistered) => any; | |
| readonly SingletonRegistered: (args: SingletonRegistered) => any; | |
| }>(cases: Cases): (value: ShardingRegistrationEvent) => import("../../Unify.ts").Unify<ReturnType<Cases["EntityRegistered" | "SingletonRegistered"]>>; | |
| <Cases extends { | |
| readonly EntityRegistered: (args: EntityRegistered) => any; | |
| readonly SingletonRegistered: (args: SingletonRegistered) => any; | |
| }>(value: ShardingRegistrationEvent, cases: Cases): import("../../Unify.ts").Unify<ReturnType<Cases["EntityRegistered" | "SingletonRegistered"]>>; | |
| }, | |
| /** | |
| * Creates an event for an entity registered by the local runner. | |
| * | |
| * @category constructors | |
| * @since 4.0.0 | |
| */ | |
| EntityRegistered: Data.TaggedEnum.ConstructorFrom<EntityRegistered, "_tag">, | |
| /** | |
| * Creates an event for a singleton registered by the local runner. | |
| * | |
| * @category constructors | |
| * @since 4.0.0 | |
| */ | |
| SingletonRegistered: Data.TaggedEnum.ConstructorFrom<SingletonRegistered, "_tag">; | |
| //# sourceMappingURL=ShardingRegistrationEvent.d.ts.map |
Xet Storage Details
- Size:
- 2.47 kB
- Xet hash:
- 690630e54952fd55b82f41ae8d8d1bcc6af7e0da501df09b04d5c23f2d5552cb
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.