the-moby-effect
Version:
Moby/Docker API client built using effect-ts
115 lines • 4.75 kB
TypeScript
import type * as HttpBody from "@effect/platform/HttpBody";
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 { SwarmService, SwarmServiceCreateResponse, SwarmServiceSpec, SwarmServiceUpdateResponse } from "../generated/index.js";
/**
* @since 1.0.0
* @category Errors
*/
export declare const ServicesErrorTypeId: unique symbol;
/**
* @since 1.0.0
* @category Errors
*/
export type ServicesErrorTypeId = typeof ServicesErrorTypeId;
/**
* @since 1.0.0
* @category Errors
*/
export declare const isServicesError: (u: unknown) => u is ServicesError;
declare const ServicesError_base: new <A extends Record<string, any>>(args: import("effect/Types").Simplify<A>) => import("effect/Cause").YieldableError & Record<typeof ServicesErrorTypeId, typeof ServicesErrorTypeId> & {
readonly _tag: "ServicesError";
} & Readonly<A>;
/**
* @since 1.0.0
* @category Errors
*/
export declare class ServicesError extends ServicesError_base<{
method: string;
cause: ParseResult.ParseError | HttpClientError.HttpClientError | HttpBody.HttpBodyError | unknown;
}> {
get message(): string;
}
declare const Services_base: Effect.Service.Class<Services, "@the-moby-effect/endpoints/Services", {
readonly accessors: false;
readonly dependencies: readonly [];
readonly effect: Effect.Effect<{
list: (options?: {
readonly filters?: string;
readonly status?: boolean;
} | undefined) => Effect.Effect<Readonly<Array<SwarmService>>, ServicesError, never>;
create: (options: {
readonly body: typeof SwarmServiceSpec.Encoded;
readonly "X-Registry-Auth"?: string;
}) => Effect.Effect<Readonly<SwarmServiceCreateResponse>, ServicesError, never>;
delete: (id: string) => Effect.Effect<void, ServicesError, never>;
inspect: (id: string, options?: {
readonly insertDefaults?: boolean;
} | undefined) => Effect.Effect<Readonly<SwarmService>, ServicesError, never>;
update: (id: string, options: {
readonly body: SwarmServiceSpec;
/**
* The version number of the service object being updated. This
* is required to avoid conflicting writes. This version number
* should be the value as currently set on the service _before_
* the update. You can find the current version by calling `GET
* /services/{id}`
*/
readonly version: number;
/**
* If the `X-Registry-Auth` header is not specified, this
* parameter indicates where to find registry authorization
* credentials.
*/
readonly registryAuthFrom?: string;
/**
* Set to this parameter to `previous` to cause a server-side
* rollback to the previous service spec. The supplied spec will
* be ignored in this case.
*/
readonly rollback?: string;
/**
* A base64url-encoded auth configuration for pulling from
* private registries.
*
* Refer to the [authentication
* section](#section/Authentication) for details.
*/
readonly "X-Registry-Auth"?: string;
}) => Effect.Effect<Readonly<SwarmServiceUpdateResponse>, ServicesError, 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, ServicesError, never>;
}, never, HttpClient.HttpClient>;
}>;
/**
* Services are the definitions of tasks to run on a 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/Service
*/
export declare class Services extends Services_base {
}
/**
* Services are the definitions of tasks to run on a 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/Service
*/
export declare const ServicesLayer: Layer.Layer<Services, never, HttpClient.HttpClient>;
export {};
//# sourceMappingURL=services.d.ts.map