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
| 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:StopChannel`. |
| 8 | * |
| 9 | * Stops the bound {@link Channel}, transitioning it from `RUNNING` |
| 10 | * through `STOPPING` back to `IDLE` — the other half of a broadcast-window |
| 11 | * scheduler built on {@link StartChannel}. Stopping a channel that is not |
| 12 | * running fails with the typed `ConflictException` tag. The channel id is |
| 13 | * injected from the binding. Provide the implementation with |
| 14 | * `Effect.provide(AWS.MediaLive.StopChannelHttp)`. |
| 15 | * ### Controlling Channels |
| 16 | * **Example:** Stop the Channel After the Broadcast |
| 17 | * ```typescript |
| 18 | * // init — bind the operation to the channel |
| 19 | * const stopChannel = yield* AWS.MediaLive.StopChannel(channel); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { State } = yield* stopChannel(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface StopChannel extends Binding.Service< |
| 28 | StopChannel, |
| 29 | "AWS.MediaLive.StopChannel", |
| 30 | ( |
| 31 | channel: Channel, |
| 32 | ) => Effect.Effect<() => Effect.Effect<medialive.StopChannelResponse, medialive.StopChannelError>> |
| 33 | > {} |
| 34 | export const StopChannel = Binding.Service<StopChannel>("AWS.MediaLive.StopChannel"); |