the-moby-effect
Version:
Moby/Docker API client built using effect-ts
82 lines • 3.07 kB
TypeScript
import type * as HttpClientError from "@effect/platform/HttpClientError";
import type * as Layer from "effect/Layer";
import type * as ParseResult from "effect/ParseResult";
import * as HttpClient from "@effect/platform/HttpClient";
import * as Effect from "effect/Effect";
import * as Stream from "effect/Stream";
import { SwarmTask } from "../generated/index.js";
/**
* @since 1.0.0
* @category Errors
*/
export declare const TasksErrorTypeId: unique symbol;
/**
* @since 1.0.0
* @category Errors
*/
export type TasksErrorTypeId = typeof TasksErrorTypeId;
/**
* @since 1.0.0
* @category Errors
*/
export declare const isTasksError: (u: unknown) => u is TasksError;
declare const TasksError_base: new <A extends Record<string, any>>(args: import("effect/Types").Simplify<A>) => import("effect/Cause").YieldableError & Record<typeof TasksErrorTypeId, typeof TasksErrorTypeId> & {
readonly _tag: "TasksError";
} & Readonly<A>;
/**
* @since 1.0.0
* @category Errors
*/
export declare class TasksError extends TasksError_base<{
method: string;
cause: ParseResult.ParseError | HttpClientError.HttpClientError | unknown;
}> {
get message(): string;
}
declare const Tasks_base: Effect.Service.Class<Tasks, "@the-moby-effect/endpoints/Tasks", {
readonly accessors: false;
readonly dependencies: readonly [];
readonly effect: Effect.Effect<{
list: (options?: {
readonly filters?: {
"desired-state"?: ["running" | "shutdown" | "accepted"] | undefined;
id?: [string] | undefined;
name?: [string] | undefined;
node?: [string] | undefined;
service?: [string] | undefined;
label?: Array<string> | undefined;
};
} | undefined) => Effect.Effect<Readonly<Array<SwarmTask>>, TasksError, never>;
inspect: (id: string) => Effect.Effect<Readonly<SwarmTask>, TasksError, never>;
logs: (id: string, options?: {
readonly details?: boolean;
readonly follow?: boolean;
readonly stdout?: boolean;
readonly stderr?: boolean;
readonly since?: number;
readonly timestamps?: boolean;
readonly tail?: string;
} | undefined) => Stream.Stream<string, TasksError, never>;
}, never, HttpClient.HttpClient>;
}>;
/**
* A task is a container running on a swarm. It is the atomic scheduling unit of
* swarm. Swarm mode must be enabled for these endpoints to work.
*
* @since 1.0.0
* @category Tags
* @see https://docs.docker.com/reference/api/engine/latest/#tag/Task
*/
export declare class Tasks extends Tasks_base {
}
/**
* A task is a container running on a swarm. It is the atomic scheduling unit of
* swarm. Swarm mode must be enabled for these endpoints to work.
*
* @since 1.0.0
* @category Layers
* @see https://docs.docker.com/reference/api/engine/latest/#tag/Task
*/
export declare const TasksLayer: Layer.Layer<Tasks, never, HttpClient.HttpClient>;
export {};
//# sourceMappingURL=tasks.d.ts.map