@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 37 lines 1.33 KB
Raw
1 import type * as medialive from "@distilled.cloud/aws/medialive";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Channel } from "./Channel.ts";
5
6 /**
7 * Runtime binding for `medialive:DescribeChannel`.
8 *
9 * Reads the bound {@link Channel}'s live state — lifecycle state
10 * (`IDLE`/`RUNNING`), pipeline details, egress endpoints, and attached
11 * inputs — e.g. for an operations dashboard or a scheduler that only
12 * starts a channel that is not already running. The channel id is
13 * injected from the binding. Provide the implementation with
14 * `Effect.provide(AWS.MediaLive.DescribeChannelHttp)`.
15 * ### Observing Channels
16 * **Example:** Read the Channel's Current State
17 * ```typescript
18 * // init — bind the operation to the channel
19 * const describeChannel = yield* AWS.MediaLive.DescribeChannel(channel);
20 *
21 * // runtime
22 * const { State } = yield* describeChannel();
23 * const running = State === "RUNNING";
24 * ```
25 *
26 * @binding
27 */
28 export interface DescribeChannel extends Binding.Service<
29 DescribeChannel,
30 "AWS.MediaLive.DescribeChannel",
31 (
32 channel: Channel,
33 ) => Effect.Effect<
34 () => Effect.Effect<medialive.DescribeChannelResponse, medialive.DescribeChannelError>
35 >
36 > {}
37 export const DescribeChannel = Binding.Service<DescribeChannel>("AWS.MediaLive.DescribeChannel");