@lakutata/containerd 0.0.0-stage → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +409 -2
- package/THIRD_PARTY_NOTICES.md +310 -0
- package/dist/cjs/client/BuildKit.d.ts +176 -0
- package/dist/cjs/client/BuildKit.js +536 -0
- package/dist/cjs/client/BuildKitMessages.d.ts +35 -0
- package/dist/cjs/client/BuildKitMessages.js +123 -0
- package/dist/cjs/client/ContainerStore.d.ts +558 -0
- package/dist/cjs/client/ContainerStore.js +1384 -0
- package/dist/cjs/client/ContainerdClient.d.ts +244 -0
- package/dist/cjs/client/ContainerdClient.js +455 -0
- package/dist/cjs/client/DockerIgnore.d.ts +44 -0
- package/dist/cjs/client/DockerIgnore.js +186 -0
- package/dist/cjs/client/Fifo.d.ts +31 -0
- package/dist/cjs/client/Fifo.js +66 -0
- package/dist/cjs/client/ImageStore.d.ts +258 -0
- package/dist/cjs/client/ImageStore.js +636 -0
- package/dist/cjs/client/Messages.d.ts +103 -0
- package/dist/cjs/client/Messages.js +397 -0
- package/dist/cjs/client/Networks.d.ts +221 -0
- package/dist/cjs/client/Networks.js +630 -0
- package/dist/cjs/client/Platforms.d.ts +53 -0
- package/dist/cjs/client/Platforms.js +169 -0
- package/dist/cjs/client/Reference.d.ts +33 -0
- package/dist/cjs/client/Reference.js +70 -0
- package/dist/cjs/client/Registry.d.ts +145 -0
- package/dist/cjs/client/Registry.js +272 -0
- package/dist/cjs/client/Rootfs.d.ts +83 -0
- package/dist/cjs/client/Rootfs.js +245 -0
- package/dist/cjs/client/Seccomp.d.ts +36 -0
- package/dist/cjs/client/Seccomp.js +156 -0
- package/dist/cjs/client/Spec.d.ts +151 -0
- package/dist/cjs/client/Spec.js +227 -0
- package/dist/cjs/client/Volumes.d.ts +42 -0
- package/dist/cjs/client/Volumes.js +80 -0
- package/dist/cjs/containerd/Containerd.d.ts +442 -0
- package/dist/cjs/containerd/Containerd.js +929 -0
- package/dist/cjs/containerd/exceptions/ContainerdConnectionException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdConnectionException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNameConflictException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNameConflictException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerStateException.d.ts +10 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerStateException.js +17 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageBuildException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageBuildException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageExportException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageExportException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageImportException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageImportException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePullException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePullException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePushException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePushException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkConflictException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkConflictException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdPathNotFoundException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdPathNotFoundException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdPlatformException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdPlatformException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeInUseException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeInUseException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeNotFoundException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeNotFoundException.js +15 -0
- package/dist/cjs/containerd/lib/ContainerdContainer.d.ts +292 -0
- package/dist/cjs/containerd/lib/ContainerdContainer.js +536 -0
- package/dist/cjs/containerd/lib/ContainerdContainerTTY.d.ts +116 -0
- package/dist/cjs/containerd/lib/ContainerdContainerTTY.js +178 -0
- package/dist/cjs/containerd/lib/ContainerdErrors.d.ts +6 -0
- package/dist/cjs/containerd/lib/ContainerdErrors.js +37 -0
- package/dist/cjs/containerd/lib/ContainerdImage.d.ts +149 -0
- package/dist/cjs/containerd/lib/ContainerdImage.js +222 -0
- package/dist/cjs/containerd/options/ContainerdPruneOptions.d.ts +44 -0
- package/dist/cjs/containerd/options/ContainerdPruneOptions.js +51 -0
- package/dist/cjs/containerd/options/ContainerdRegistryAuthOptions.d.ts +32 -0
- package/dist/cjs/containerd/options/ContainerdRegistryAuthOptions.js +45 -0
- package/dist/cjs/containerd/options/container/ContainerCommitOptions.d.ts +57 -0
- package/dist/cjs/containerd/options/container/ContainerCommitOptions.js +66 -0
- package/dist/cjs/containerd/options/container/ContainerCreateOptions.d.ts +273 -0
- package/dist/cjs/containerd/options/container/ContainerCreateOptions.js +239 -0
- package/dist/cjs/containerd/options/container/ContainerExecOptions.d.ts +53 -0
- package/dist/cjs/containerd/options/container/ContainerExecOptions.js +63 -0
- package/dist/cjs/containerd/options/container/ContainerExportDirectoryOptions.d.ts +32 -0
- package/dist/cjs/containerd/options/container/ContainerExportDirectoryOptions.js +45 -0
- package/dist/cjs/containerd/options/container/ContainerKillOptions.d.ts +30 -0
- package/dist/cjs/containerd/options/container/ContainerKillOptions.js +41 -0
- package/dist/cjs/containerd/options/container/ContainerLogsOptions.d.ts +34 -0
- package/dist/cjs/containerd/options/container/ContainerLogsOptions.js +44 -0
- package/dist/cjs/containerd/options/container/ContainerRemoveOptions.d.ts +22 -0
- package/dist/cjs/containerd/options/container/ContainerRemoveOptions.js +34 -0
- package/dist/cjs/containerd/options/container/ContainerResourceOptions.d.ts +63 -0
- package/dist/cjs/containerd/options/container/ContainerResourceOptions.js +67 -0
- package/dist/cjs/containerd/options/container/ContainerStopOptions.d.ts +30 -0
- package/dist/cjs/containerd/options/container/ContainerStopOptions.js +41 -0
- package/dist/cjs/containerd/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
- package/dist/cjs/containerd/options/container/ContainerTTYConsoleSizeOptions.js +40 -0
- package/dist/cjs/containerd/options/container/ContainerTTYOptions.d.ts +50 -0
- package/dist/cjs/containerd/options/container/ContainerTTYOptions.js +63 -0
- package/dist/cjs/containerd/options/image/ImageBuildOptions.d.ts +88 -0
- package/dist/cjs/containerd/options/image/ImageBuildOptions.js +95 -0
- package/dist/cjs/containerd/options/image/ImageExportOptions.d.ts +25 -0
- package/dist/cjs/containerd/options/image/ImageExportOptions.js +39 -0
- package/dist/cjs/containerd/options/image/ImageImportOptions.d.ts +38 -0
- package/dist/cjs/containerd/options/image/ImageImportOptions.js +47 -0
- package/dist/cjs/containerd/options/image/ImagePullOptions.d.ts +53 -0
- package/dist/cjs/containerd/options/image/ImagePullOptions.js +66 -0
- package/dist/cjs/containerd/options/image/ImagePushOptions.d.ts +44 -0
- package/dist/cjs/containerd/options/image/ImagePushOptions.js +58 -0
- package/dist/cjs/containerd/options/network/NetworkCreateOptions.d.ts +82 -0
- package/dist/cjs/containerd/options/network/NetworkCreateOptions.js +83 -0
- package/dist/cjs/containerd/options/volume/VolumeCreateOptions.d.ts +26 -0
- package/dist/cjs/containerd/options/volume/VolumeCreateOptions.js +40 -0
- package/dist/cjs/containerd/types/ContainerdBind.d.ts +28 -0
- package/dist/cjs/containerd/types/ContainerdBind.js +2 -0
- package/dist/cjs/containerd/types/ContainerdBuildOutputCallback.d.ts +6 -0
- package/dist/cjs/containerd/types/ContainerdBuildOutputCallback.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerNetwork.d.ts +40 -0
- package/dist/cjs/containerd/types/ContainerdContainerNetwork.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerPort.d.ts +22 -0
- package/dist/cjs/containerd/types/ContainerdContainerPort.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerState.d.ts +42 -0
- package/dist/cjs/containerd/types/ContainerdContainerState.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerStats.d.ts +107 -0
- package/dist/cjs/containerd/types/ContainerdContainerStats.js +2 -0
- package/dist/cjs/containerd/types/ContainerdDevice.d.ts +25 -0
- package/dist/cjs/containerd/types/ContainerdDevice.js +2 -0
- package/dist/cjs/containerd/types/ContainerdExecResult.d.ts +18 -0
- package/dist/cjs/containerd/types/ContainerdExecResult.js +2 -0
- package/dist/cjs/containerd/types/ContainerdImageConfig.d.ts +46 -0
- package/dist/cjs/containerd/types/ContainerdImageConfig.js +2 -0
- package/dist/cjs/containerd/types/ContainerdNetworkInfo.d.ts +49 -0
- package/dist/cjs/containerd/types/ContainerdNetworkInfo.js +2 -0
- package/dist/cjs/containerd/types/ContainerdProgressCallback.d.ts +29 -0
- package/dist/cjs/containerd/types/ContainerdProgressCallback.js +2 -0
- package/dist/cjs/containerd/types/ContainerdPruneResult.d.ts +21 -0
- package/dist/cjs/containerd/types/ContainerdPruneResult.js +2 -0
- package/dist/cjs/containerd/types/ContainerdRestartPolicy.d.ts +13 -0
- package/dist/cjs/containerd/types/ContainerdRestartPolicy.js +2 -0
- package/dist/cjs/containerd/types/ContainerdTmpfs.d.ts +20 -0
- package/dist/cjs/containerd/types/ContainerdTmpfs.js +2 -0
- package/dist/cjs/containerd/types/ContainerdVolume.d.ts +19 -0
- package/dist/cjs/containerd/types/ContainerdVolume.js +2 -0
- package/dist/cjs/containerd/types/ContainerdVolumeInfo.d.ts +26 -0
- package/dist/cjs/containerd/types/ContainerdVolumeInfo.js +2 -0
- package/dist/cjs/exports/Containerd.d.ts +69 -0
- package/dist/cjs/exports/Containerd.js +87 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/client/BuildKit.js +488 -0
- package/dist/esm/client/BuildKitMessages.js +120 -0
- package/dist/esm/client/ContainerStore.js +1339 -0
- package/dist/esm/client/ContainerdClient.js +416 -0
- package/dist/esm/client/DockerIgnore.js +179 -0
- package/dist/esm/client/Fifo.js +59 -0
- package/dist/esm/client/ImageStore.js +628 -0
- package/dist/esm/client/Messages.js +393 -0
- package/dist/esm/client/Networks.js +621 -0
- package/dist/esm/client/Platforms.js +156 -0
- package/dist/esm/client/Reference.js +66 -0
- package/dist/esm/client/Registry.js +263 -0
- package/dist/esm/client/Rootfs.js +234 -0
- package/dist/esm/client/Seccomp.js +152 -0
- package/dist/esm/client/Spec.js +220 -0
- package/dist/esm/client/Volumes.js +73 -0
- package/dist/esm/containerd/Containerd.js +923 -0
- package/dist/esm/containerd/exceptions/ContainerdConnectionException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerNameConflictException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerStateException.js +13 -0
- package/dist/esm/containerd/exceptions/ContainerdImageBuildException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageExportException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageImportException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImagePullException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImagePushException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdNetworkConflictException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdNetworkNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdPathNotFoundException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdPlatformException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdVolumeInUseException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdVolumeNotFoundException.js +11 -0
- package/dist/esm/containerd/lib/ContainerdContainer.js +533 -0
- package/dist/esm/containerd/lib/ContainerdContainerTTY.js +175 -0
- package/dist/esm/containerd/lib/ContainerdErrors.js +34 -0
- package/dist/esm/containerd/lib/ContainerdImage.js +219 -0
- package/dist/esm/containerd/options/ContainerdPruneOptions.js +47 -0
- package/dist/esm/containerd/options/ContainerdRegistryAuthOptions.js +41 -0
- package/dist/esm/containerd/options/container/ContainerCommitOptions.js +62 -0
- package/dist/esm/containerd/options/container/ContainerCreateOptions.js +235 -0
- package/dist/esm/containerd/options/container/ContainerExecOptions.js +59 -0
- package/dist/esm/containerd/options/container/ContainerExportDirectoryOptions.js +41 -0
- package/dist/esm/containerd/options/container/ContainerKillOptions.js +37 -0
- package/dist/esm/containerd/options/container/ContainerLogsOptions.js +40 -0
- package/dist/esm/containerd/options/container/ContainerRemoveOptions.js +30 -0
- package/dist/esm/containerd/options/container/ContainerResourceOptions.js +63 -0
- package/dist/esm/containerd/options/container/ContainerStopOptions.js +37 -0
- package/dist/esm/containerd/options/container/ContainerTTYConsoleSizeOptions.js +36 -0
- package/dist/esm/containerd/options/container/ContainerTTYOptions.js +59 -0
- package/dist/esm/containerd/options/image/ImageBuildOptions.js +91 -0
- package/dist/esm/containerd/options/image/ImageExportOptions.js +35 -0
- package/dist/esm/containerd/options/image/ImageImportOptions.js +43 -0
- package/dist/esm/containerd/options/image/ImagePullOptions.js +62 -0
- package/dist/esm/containerd/options/image/ImagePushOptions.js +54 -0
- package/dist/esm/containerd/options/network/NetworkCreateOptions.js +79 -0
- package/dist/esm/containerd/options/volume/VolumeCreateOptions.js +36 -0
- package/dist/esm/containerd/types/ContainerdBind.js +1 -0
- package/dist/esm/containerd/types/ContainerdBuildOutputCallback.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerNetwork.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerPort.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerState.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerStats.js +1 -0
- package/dist/esm/containerd/types/ContainerdDevice.js +1 -0
- package/dist/esm/containerd/types/ContainerdExecResult.js +1 -0
- package/dist/esm/containerd/types/ContainerdImageConfig.js +1 -0
- package/dist/esm/containerd/types/ContainerdNetworkInfo.js +1 -0
- package/dist/esm/containerd/types/ContainerdProgressCallback.js +1 -0
- package/dist/esm/containerd/types/ContainerdPruneResult.js +1 -0
- package/dist/esm/containerd/types/ContainerdRestartPolicy.js +1 -0
- package/dist/esm/containerd/types/ContainerdTmpfs.js +1 -0
- package/dist/esm/containerd/types/ContainerdVolume.js +1 -0
- package/dist/esm/containerd/types/ContainerdVolumeInfo.js +1 -0
- package/dist/esm/exports/Containerd.js +68 -0
- package/dist/types/client/BuildKit.d.ts +176 -0
- package/dist/types/client/BuildKitMessages.d.ts +35 -0
- package/dist/types/client/ContainerStore.d.ts +558 -0
- package/dist/types/client/ContainerdClient.d.ts +244 -0
- package/dist/types/client/DockerIgnore.d.ts +44 -0
- package/dist/types/client/Fifo.d.ts +31 -0
- package/dist/types/client/ImageStore.d.ts +258 -0
- package/dist/types/client/Messages.d.ts +103 -0
- package/dist/types/client/Networks.d.ts +221 -0
- package/dist/types/client/Platforms.d.ts +53 -0
- package/dist/types/client/Reference.d.ts +33 -0
- package/dist/types/client/Registry.d.ts +145 -0
- package/dist/types/client/Rootfs.d.ts +83 -0
- package/dist/types/client/Seccomp.d.ts +36 -0
- package/dist/types/client/Spec.d.ts +151 -0
- package/dist/types/client/Volumes.d.ts +42 -0
- package/dist/types/containerd/Containerd.d.ts +442 -0
- package/dist/types/containerd/exceptions/ContainerdConnectionException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdContainerNameConflictException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdContainerNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdContainerStateException.d.ts +10 -0
- package/dist/types/containerd/exceptions/ContainerdImageBuildException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageExportException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageImportException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImagePullException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImagePushException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdNetworkConflictException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdNetworkNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdPathNotFoundException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdPlatformException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdVolumeInUseException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdVolumeNotFoundException.d.ts +8 -0
- package/dist/types/containerd/lib/ContainerdContainer.d.ts +292 -0
- package/dist/types/containerd/lib/ContainerdContainerTTY.d.ts +116 -0
- package/dist/types/containerd/lib/ContainerdErrors.d.ts +6 -0
- package/dist/types/containerd/lib/ContainerdImage.d.ts +149 -0
- package/dist/types/containerd/options/ContainerdPruneOptions.d.ts +44 -0
- package/dist/types/containerd/options/ContainerdRegistryAuthOptions.d.ts +32 -0
- package/dist/types/containerd/options/container/ContainerCommitOptions.d.ts +57 -0
- package/dist/types/containerd/options/container/ContainerCreateOptions.d.ts +273 -0
- package/dist/types/containerd/options/container/ContainerExecOptions.d.ts +53 -0
- package/dist/types/containerd/options/container/ContainerExportDirectoryOptions.d.ts +32 -0
- package/dist/types/containerd/options/container/ContainerKillOptions.d.ts +30 -0
- package/dist/types/containerd/options/container/ContainerLogsOptions.d.ts +34 -0
- package/dist/types/containerd/options/container/ContainerRemoveOptions.d.ts +22 -0
- package/dist/types/containerd/options/container/ContainerResourceOptions.d.ts +63 -0
- package/dist/types/containerd/options/container/ContainerStopOptions.d.ts +30 -0
- package/dist/types/containerd/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
- package/dist/types/containerd/options/container/ContainerTTYOptions.d.ts +50 -0
- package/dist/types/containerd/options/image/ImageBuildOptions.d.ts +88 -0
- package/dist/types/containerd/options/image/ImageExportOptions.d.ts +25 -0
- package/dist/types/containerd/options/image/ImageImportOptions.d.ts +38 -0
- package/dist/types/containerd/options/image/ImagePullOptions.d.ts +53 -0
- package/dist/types/containerd/options/image/ImagePushOptions.d.ts +44 -0
- package/dist/types/containerd/options/network/NetworkCreateOptions.d.ts +82 -0
- package/dist/types/containerd/options/volume/VolumeCreateOptions.d.ts +26 -0
- package/dist/types/containerd/types/ContainerdBind.d.ts +28 -0
- package/dist/types/containerd/types/ContainerdBuildOutputCallback.d.ts +6 -0
- package/dist/types/containerd/types/ContainerdContainerNetwork.d.ts +40 -0
- package/dist/types/containerd/types/ContainerdContainerPort.d.ts +22 -0
- package/dist/types/containerd/types/ContainerdContainerState.d.ts +42 -0
- package/dist/types/containerd/types/ContainerdContainerStats.d.ts +107 -0
- package/dist/types/containerd/types/ContainerdDevice.d.ts +25 -0
- package/dist/types/containerd/types/ContainerdExecResult.d.ts +18 -0
- package/dist/types/containerd/types/ContainerdImageConfig.d.ts +46 -0
- package/dist/types/containerd/types/ContainerdNetworkInfo.d.ts +49 -0
- package/dist/types/containerd/types/ContainerdProgressCallback.d.ts +29 -0
- package/dist/types/containerd/types/ContainerdPruneResult.d.ts +21 -0
- package/dist/types/containerd/types/ContainerdRestartPolicy.d.ts +13 -0
- package/dist/types/containerd/types/ContainerdTmpfs.d.ts +20 -0
- package/dist/types/containerd/types/ContainerdVolume.d.ts +19 -0
- package/dist/types/containerd/types/ContainerdVolumeInfo.d.ts +26 -0
- package/dist/types/exports/Containerd.d.ts +69 -0
- package/package.json +51 -4
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { GRPCConnection, GRPCError, type CallOptions, type Message, type Schema } from '@lakutata/grpc';
|
|
2
|
+
/**
|
|
3
|
+
* A descriptor of content (OCI)
|
|
4
|
+
*/
|
|
5
|
+
export type ContentDescriptor = {
|
|
6
|
+
mediaType: string;
|
|
7
|
+
digest: string;
|
|
8
|
+
size: number;
|
|
9
|
+
annotations?: Record<string, string>;
|
|
10
|
+
platform?: {
|
|
11
|
+
os: string;
|
|
12
|
+
architecture: string;
|
|
13
|
+
variant?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A mount of a snapshot
|
|
18
|
+
*/
|
|
19
|
+
export type SnapshotMount = {
|
|
20
|
+
type: string;
|
|
21
|
+
source: string;
|
|
22
|
+
target?: string;
|
|
23
|
+
options: string[];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* An event of containerd, as {@link Containerd.events} streams it: its topic (`/tasks/exit`), its type
|
|
27
|
+
* (`containerd.events.TaskExit`) and its decoded fields.
|
|
28
|
+
*/
|
|
29
|
+
export type ContainerdEvent = {
|
|
30
|
+
/**
|
|
31
|
+
* When containerd published the event.
|
|
32
|
+
*/
|
|
33
|
+
timestamp: Date;
|
|
34
|
+
/**
|
|
35
|
+
* The namespace the event happened in (the component's).
|
|
36
|
+
*/
|
|
37
|
+
namespace: string;
|
|
38
|
+
/**
|
|
39
|
+
* The event's topic: `/tasks/create`, `/tasks/start`, `/tasks/exit`, `/tasks/delete`, `/tasks/oom`,
|
|
40
|
+
* `/tasks/paused`, `/tasks/resumed`, `/tasks/exec-added`, `/tasks/exec-started`, `/containers/create`,
|
|
41
|
+
* `/containers/update`, `/containers/delete`, `/images/create`, `/images/update`, `/images/delete`,
|
|
42
|
+
* `/snapshot/prepare`, `/snapshot/commit`, `/snapshot/remove`…
|
|
43
|
+
*/
|
|
44
|
+
topic: string;
|
|
45
|
+
/**
|
|
46
|
+
* The type of the event's payload (`containerd.events.TaskExit`).
|
|
47
|
+
*/
|
|
48
|
+
type: string;
|
|
49
|
+
/**
|
|
50
|
+
* The event's fields, decoded for the task, container, image and snapshot events (`{containerId, pid, exitStatus,
|
|
51
|
+
* exitedAt}` for `/tasks/exit`, `{name}` for `/images/delete`); an empty object for the other events.
|
|
52
|
+
*/
|
|
53
|
+
event: Message;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The type URL of the specifications of the containers and of their processes (OCI runtime spec, JSON)
|
|
57
|
+
*/
|
|
58
|
+
export declare const SPEC_TYPE_URL: string;
|
|
59
|
+
export declare const PROCESS_TYPE_URL: string;
|
|
60
|
+
export declare const RESOURCES_TYPE_URL: string;
|
|
61
|
+
/**
|
|
62
|
+
* A date of a Timestamp
|
|
63
|
+
* @param timestamp
|
|
64
|
+
*/
|
|
65
|
+
export declare function timestampDate(timestamp: Message | undefined): Date | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Whether an error is the one of a call of a code
|
|
68
|
+
* @param error
|
|
69
|
+
* @param code
|
|
70
|
+
*/
|
|
71
|
+
export declare function isGRPCError(error: unknown, code: number): error is GRPCError;
|
|
72
|
+
/**
|
|
73
|
+
* The client of the API of containerd (its services of the version 1), in a namespace: its calls are the ones of
|
|
74
|
+
* ctr and nerdctl
|
|
75
|
+
*/
|
|
76
|
+
export declare class ContainerdClient {
|
|
77
|
+
readonly namespace: string;
|
|
78
|
+
readonly grpc: GRPCConnection;
|
|
79
|
+
constructor(socketPath: string, namespace: string);
|
|
80
|
+
/**
|
|
81
|
+
* The options of a call: its namespace, its lease (the content and the snapshots it creates are kept by it until
|
|
82
|
+
* they are referenced)
|
|
83
|
+
* @param lease
|
|
84
|
+
* @param signal
|
|
85
|
+
*/
|
|
86
|
+
protected options(lease?: string, signal?: AbortSignal): CallOptions;
|
|
87
|
+
/**
|
|
88
|
+
* Call a method of a service
|
|
89
|
+
* @param service its name and its version (images.v1.Images)
|
|
90
|
+
* @param method
|
|
91
|
+
* @param requestSchema
|
|
92
|
+
* @param request
|
|
93
|
+
* @param responseSchema
|
|
94
|
+
* @param lease
|
|
95
|
+
* @param signal
|
|
96
|
+
*/
|
|
97
|
+
protected call(service: string, method: string, requestSchema: Schema, request: Message, responseSchema?: Schema, lease?: string, signal?: AbortSignal): Promise<Message>;
|
|
98
|
+
/**
|
|
99
|
+
* Call a method, undefined when what it reads does not exist
|
|
100
|
+
* @param promise
|
|
101
|
+
*/
|
|
102
|
+
protected orUndefined<T>(promise: Promise<T>): Promise<T | undefined>;
|
|
103
|
+
version(): Promise<{
|
|
104
|
+
version: string;
|
|
105
|
+
revision: string;
|
|
106
|
+
}>;
|
|
107
|
+
/**
|
|
108
|
+
* Create the namespace of the client, when it does not exist
|
|
109
|
+
*/
|
|
110
|
+
ensureNamespace(): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Create a lease, which keeps what is created under it until it is deleted (or expired)
|
|
113
|
+
* @param expireSeconds
|
|
114
|
+
*/
|
|
115
|
+
createLease(expireSeconds?: number): Promise<string>;
|
|
116
|
+
deleteLease(id: string): Promise<void>;
|
|
117
|
+
getImage(name: string): Promise<Message | undefined>;
|
|
118
|
+
listImages(filters?: string[]): Promise<Message[]>;
|
|
119
|
+
/**
|
|
120
|
+
* Create an image, or update it when it exists (its target and its labels)
|
|
121
|
+
* @param image
|
|
122
|
+
* @param lease
|
|
123
|
+
*/
|
|
124
|
+
putImage(image: Message, lease?: string): Promise<Message>;
|
|
125
|
+
deleteImage(name: string, sync?: boolean): Promise<void>;
|
|
126
|
+
contentInfo(digest: string): Promise<Message | undefined>;
|
|
127
|
+
/**
|
|
128
|
+
* Set labels of a content
|
|
129
|
+
* @param digest
|
|
130
|
+
* @param labels
|
|
131
|
+
*/
|
|
132
|
+
labelContent(digest: string, labels: Record<string, string>): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Read a content, by its chunks
|
|
135
|
+
* @param digest
|
|
136
|
+
* @param signal
|
|
137
|
+
*/
|
|
138
|
+
readContent(digest: string, signal?: AbortSignal): AsyncGenerator<Buffer>;
|
|
139
|
+
/**
|
|
140
|
+
* Read a content whole
|
|
141
|
+
* @param digest
|
|
142
|
+
*/
|
|
143
|
+
readAll(digest: string): Promise<Buffer>;
|
|
144
|
+
/**
|
|
145
|
+
* Write a content, checked by its digest (a content which exists is kept), its labels set
|
|
146
|
+
* @param descriptor its digest and its size
|
|
147
|
+
* @param data its bytes, or their chunks
|
|
148
|
+
* @param lease
|
|
149
|
+
* @param labels
|
|
150
|
+
* @param signal
|
|
151
|
+
*/
|
|
152
|
+
writeContent(descriptor: {
|
|
153
|
+
digest: string;
|
|
154
|
+
size: number;
|
|
155
|
+
}, data: Uint8Array | AsyncIterable<Uint8Array>, lease: string, labels?: Record<string, string>, signal?: AbortSignal): Promise<void>;
|
|
156
|
+
deleteContent(digest: string): Promise<void>;
|
|
157
|
+
prepareSnapshot(snapshotter: string, key: string, parent: string, labels?: Record<string, string>, lease?: string): Promise<SnapshotMount[]>;
|
|
158
|
+
snapshotMounts(snapshotter: string, key: string): Promise<SnapshotMount[]>;
|
|
159
|
+
commitSnapshot(snapshotter: string, name: string, key: string, labels?: Record<string, string>, lease?: string): Promise<void>;
|
|
160
|
+
viewSnapshot(snapshotter: string, key: string, parent: string, lease?: string): Promise<SnapshotMount[]>;
|
|
161
|
+
/**
|
|
162
|
+
* The layer of the changes of a snapshot from another one (tar+gzip), written into the content store
|
|
163
|
+
* @param left the older one
|
|
164
|
+
* @param right the newer one
|
|
165
|
+
* @param lease
|
|
166
|
+
*/
|
|
167
|
+
diff(left: SnapshotMount[], right: SnapshotMount[], lease?: string): Promise<ContentDescriptor>;
|
|
168
|
+
/**
|
|
169
|
+
* The metrics of the cgroup of a task: their type (io.containerd.cgroups.v1.Metrics, …v2.Metrics) and their bytes
|
|
170
|
+
* @param containerId
|
|
171
|
+
*/
|
|
172
|
+
metrics(containerId: string): Promise<Message | undefined>;
|
|
173
|
+
removeSnapshot(snapshotter: string, key: string): Promise<void>;
|
|
174
|
+
statSnapshot(snapshotter: string, key: string): Promise<Message | undefined>;
|
|
175
|
+
snapshotUsage(snapshotter: string, key: string): Promise<{
|
|
176
|
+
size: number;
|
|
177
|
+
inodes: number;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* Apply a layer (its content) to the mounts of a snapshot
|
|
181
|
+
* @param layer
|
|
182
|
+
* @param mounts
|
|
183
|
+
* @param lease
|
|
184
|
+
*/
|
|
185
|
+
applyLayer(layer: ContentDescriptor, mounts: SnapshotMount[], lease?: string): Promise<ContentDescriptor>;
|
|
186
|
+
getContainer(id: string): Promise<Message | undefined>;
|
|
187
|
+
listContainers(filters?: string[]): Promise<Message[]>;
|
|
188
|
+
createContainer(container: Message, lease?: string): Promise<Message>;
|
|
189
|
+
updateContainer(container: Message, paths: string[]): Promise<Message>;
|
|
190
|
+
deleteContainer(id: string): Promise<void>;
|
|
191
|
+
createTask(request: Message): Promise<number>;
|
|
192
|
+
startTask(containerId: string, execId?: string): Promise<number>;
|
|
193
|
+
deleteTask(containerId: string): Promise<Message | undefined>;
|
|
194
|
+
deleteProcess(containerId: string, execId: string): Promise<Message | undefined>;
|
|
195
|
+
getTask(containerId: string, execId?: string): Promise<Message | undefined>;
|
|
196
|
+
listTasks(): Promise<Message[]>;
|
|
197
|
+
kill(containerId: string, signal: number, options?: {
|
|
198
|
+
execId?: string;
|
|
199
|
+
all?: boolean;
|
|
200
|
+
}): Promise<void>;
|
|
201
|
+
exec(request: Message): Promise<void>;
|
|
202
|
+
resizePty(containerId: string, execId: string, width: number, height: number): Promise<void>;
|
|
203
|
+
closeIO(containerId: string, execId: string): Promise<void>;
|
|
204
|
+
pause(containerId: string): Promise<void>;
|
|
205
|
+
resume(containerId: string): Promise<void>;
|
|
206
|
+
listPids(containerId: string): Promise<number[]>;
|
|
207
|
+
/**
|
|
208
|
+
* Wait for a process to exit (the task, an exec)
|
|
209
|
+
* @param containerId
|
|
210
|
+
* @param execId
|
|
211
|
+
* @param signal
|
|
212
|
+
*/
|
|
213
|
+
wait(containerId: string, execId?: string, signal?: AbortSignal): Promise<{
|
|
214
|
+
exitStatus: number;
|
|
215
|
+
exitedAt?: Date;
|
|
216
|
+
}>;
|
|
217
|
+
/**
|
|
218
|
+
* Update the resources of a task (OCI LinuxResources)
|
|
219
|
+
* @param containerId
|
|
220
|
+
* @param resources
|
|
221
|
+
*/
|
|
222
|
+
updateTask(containerId: string, resources: object): Promise<void>;
|
|
223
|
+
/**
|
|
224
|
+
* The events of containerd, their fields decoded (the ones of the tasks, the containers and the images)
|
|
225
|
+
* @param filters the filters of containerd (topic~="/tasks/", namespace==default)
|
|
226
|
+
* @param signal its end
|
|
227
|
+
*/
|
|
228
|
+
subscribe(filters?: string[], signal?: AbortSignal): AsyncGenerator<ContainerdEvent>;
|
|
229
|
+
/**
|
|
230
|
+
* An Any of JSON (the specifications of OCI)
|
|
231
|
+
* @param typeUrl
|
|
232
|
+
* @param value
|
|
233
|
+
*/
|
|
234
|
+
static Json(typeUrl: string, value: object): Message;
|
|
235
|
+
/**
|
|
236
|
+
* The value of an Any of JSON
|
|
237
|
+
* @param any
|
|
238
|
+
*/
|
|
239
|
+
static FromJson<T = any>(any: Message | undefined): T | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* Close the connection
|
|
242
|
+
*/
|
|
243
|
+
close(): void;
|
|
244
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
type DockerIgnoreRule = {
|
|
2
|
+
pattern: string;
|
|
3
|
+
directories: string[];
|
|
4
|
+
negative: boolean;
|
|
5
|
+
expression?: RegExp;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The rules of a .dockerignore file: the files of a build context they exclude
|
|
9
|
+
*/
|
|
10
|
+
export declare class DockerIgnore {
|
|
11
|
+
#private;
|
|
12
|
+
protected readonly ignoreCase: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @param content the content of a .dockerignore file
|
|
15
|
+
* @param ignoreCase match the case-insensitively, as Docker does not (false by default)
|
|
16
|
+
*/
|
|
17
|
+
constructor(content?: string, ignoreCase?: boolean);
|
|
18
|
+
/**
|
|
19
|
+
* Add the rules of a content
|
|
20
|
+
* @param content
|
|
21
|
+
*/
|
|
22
|
+
add(content: string): this;
|
|
23
|
+
/**
|
|
24
|
+
* A rule of a line (moby/moby builder/dockerignore/dockerignore.go and pkg/fileutils/fileutils.go)
|
|
25
|
+
* @param line
|
|
26
|
+
*/
|
|
27
|
+
protected rule(line: string): DockerIgnoreRule | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The regular expression of a rule (fileutils.go regexpMatch)
|
|
30
|
+
* @param rule
|
|
31
|
+
*/
|
|
32
|
+
protected expression(rule: DockerIgnoreRule): RegExp;
|
|
33
|
+
/**
|
|
34
|
+
* Whether a file of the context is excluded by the rules (its path relative to the context, "/" separated)
|
|
35
|
+
* @param file
|
|
36
|
+
*/
|
|
37
|
+
ignores(file: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether a file is excluded: the last rule matching it or one of its parent directories decides
|
|
40
|
+
* @param file
|
|
41
|
+
*/
|
|
42
|
+
protected test(file: string): boolean;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import net from 'node:net';
|
|
2
|
+
/**
|
|
3
|
+
* The FIFOs of the standard streams of a process of containerd (the ones of its cio): created by mkfifo, the shim
|
|
4
|
+
* writing (or reading) them, read (or written) from the event loop
|
|
5
|
+
*/
|
|
6
|
+
export declare class ProcessFifo {
|
|
7
|
+
#private;
|
|
8
|
+
readonly path: string;
|
|
9
|
+
protected readonly direction: 'read' | 'write';
|
|
10
|
+
protected constructor(path: string, direction: 'read' | 'write');
|
|
11
|
+
/**
|
|
12
|
+
* Whether the FIFOs can be created (mkfifo of the system: coreutils, busybox)
|
|
13
|
+
*/
|
|
14
|
+
static Supported(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Create a FIFO, kept open (read and write) for the shim to open its end without waiting
|
|
17
|
+
* @param path
|
|
18
|
+
* @param direction read: the shim writes it (stdout, stderr), write: the shim reads it (stdin)
|
|
19
|
+
*/
|
|
20
|
+
static Create(path: string, direction: 'read' | 'write'): ProcessFifo;
|
|
21
|
+
/**
|
|
22
|
+
* Its end opened, once the shim has opened its own one (after the creation of the process): the one kept closed,
|
|
23
|
+
* the end of the stream is the one of the shim
|
|
24
|
+
*/
|
|
25
|
+
open(): net.Socket;
|
|
26
|
+
protected releaseKeeper(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Close it
|
|
29
|
+
*/
|
|
30
|
+
close(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { ContainerdClient, type ContentDescriptor } from './ContainerdClient.js';
|
|
2
|
+
import { type Message } from '@lakutata/grpc';
|
|
3
|
+
import { type Platform } from './Platforms.js';
|
|
4
|
+
import { type RegistryOptions } from './Registry.js';
|
|
5
|
+
/**
|
|
6
|
+
* A manifest of an image (OCI, Docker)
|
|
7
|
+
*/
|
|
8
|
+
export type ImageManifest = {
|
|
9
|
+
schemaVersion: number;
|
|
10
|
+
mediaType?: string;
|
|
11
|
+
config: ContentDescriptor;
|
|
12
|
+
layers: ContentDescriptor[];
|
|
13
|
+
annotations?: Record<string, string>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* An index of the manifests of the platforms of an image
|
|
17
|
+
*/
|
|
18
|
+
export type ImageIndex = {
|
|
19
|
+
schemaVersion: number;
|
|
20
|
+
mediaType?: string;
|
|
21
|
+
manifests: ContentDescriptor[];
|
|
22
|
+
annotations?: Record<string, string>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The configuration of an image (OCI): its platform, the configuration of its containers, its layers
|
|
26
|
+
*/
|
|
27
|
+
export type ImageConfigFile = {
|
|
28
|
+
architecture: string;
|
|
29
|
+
os: string;
|
|
30
|
+
variant?: string;
|
|
31
|
+
created?: string;
|
|
32
|
+
config?: {
|
|
33
|
+
Env?: string[];
|
|
34
|
+
Cmd?: string[];
|
|
35
|
+
Entrypoint?: string[];
|
|
36
|
+
WorkingDir?: string;
|
|
37
|
+
User?: string;
|
|
38
|
+
ExposedPorts?: Record<string, object>;
|
|
39
|
+
Volumes?: Record<string, object>;
|
|
40
|
+
Labels?: Record<string, string>;
|
|
41
|
+
StopSignal?: string;
|
|
42
|
+
};
|
|
43
|
+
rootfs: {
|
|
44
|
+
type: string;
|
|
45
|
+
diff_ids: string[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The changes of the configuration of an image committed
|
|
50
|
+
*/
|
|
51
|
+
export type ImageConfigChanges = {
|
|
52
|
+
cmd?: string[];
|
|
53
|
+
entrypoint?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Its environment variables added or replaced (KEY=value)
|
|
56
|
+
*/
|
|
57
|
+
env?: string[];
|
|
58
|
+
workingDir?: string;
|
|
59
|
+
user?: string;
|
|
60
|
+
labels?: Record<string, string>;
|
|
61
|
+
/**
|
|
62
|
+
* Its ports exposed (80, 53/udp)
|
|
63
|
+
*/
|
|
64
|
+
exposedPorts?: string[];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* An image of a platform, resolved: its manifest and its configuration
|
|
68
|
+
*/
|
|
69
|
+
export type ResolvedImage = {
|
|
70
|
+
image: Message;
|
|
71
|
+
name: string;
|
|
72
|
+
target: ContentDescriptor;
|
|
73
|
+
manifestDescriptor: ContentDescriptor;
|
|
74
|
+
manifest: ImageManifest;
|
|
75
|
+
config: ImageConfigFile;
|
|
76
|
+
platform: Platform;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The progress of the transfer of a blob
|
|
80
|
+
*/
|
|
81
|
+
export type TransferProgress = {
|
|
82
|
+
digest: string;
|
|
83
|
+
mediaType: string;
|
|
84
|
+
current: number;
|
|
85
|
+
total: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* The options of a pull
|
|
89
|
+
*/
|
|
90
|
+
export type PullOptions = {
|
|
91
|
+
/**
|
|
92
|
+
* The platforms pulled: the one of the machine by default, all with "all"
|
|
93
|
+
*/
|
|
94
|
+
platforms?: Platform[] | 'all';
|
|
95
|
+
registry?: RegistryOptions;
|
|
96
|
+
/**
|
|
97
|
+
* Unpack the layers of the platforms the machine runs (the ones of the store) into its snapshots, true by default
|
|
98
|
+
*/
|
|
99
|
+
unpack?: boolean;
|
|
100
|
+
progress?: (progress: TransferProgress) => void;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* The identifiers of the chain of layers (OCI): the ones of the snapshots of their unpacking
|
|
104
|
+
* @param diffIds
|
|
105
|
+
*/
|
|
106
|
+
export declare function chainIds(diffIds: string[]): string[];
|
|
107
|
+
/**
|
|
108
|
+
* The images of containerd: pulled from the registries, unpacked into the snapshots, pushed, imported and exported
|
|
109
|
+
* (OCI image layouts, the archives of docker save), as ctr and nerdctl do: their content bound by the labels of the
|
|
110
|
+
* garbage collection of containerd, under a lease until the image references it
|
|
111
|
+
*/
|
|
112
|
+
export declare class ImageStore {
|
|
113
|
+
protected readonly client: ContainerdClient;
|
|
114
|
+
readonly snapshotter: string;
|
|
115
|
+
readonly temporary: string;
|
|
116
|
+
readonly runnablePlatforms: () => Platform[];
|
|
117
|
+
/**
|
|
118
|
+
* @param client
|
|
119
|
+
* @param snapshotter
|
|
120
|
+
* @param temporary the directory of the archives extracted (a disk of the machine, not a small tmpfs)
|
|
121
|
+
* @param runnablePlatforms the platforms the machine runs, unpacked by the pulls and the imports (the one of the
|
|
122
|
+
* machine by default)
|
|
123
|
+
*/
|
|
124
|
+
constructor(client: ContainerdClient, snapshotter: string, temporary?: string, runnablePlatforms?: () => Platform[]);
|
|
125
|
+
/**
|
|
126
|
+
* The JSON of a content
|
|
127
|
+
* @param digest
|
|
128
|
+
*/
|
|
129
|
+
protected readJson<T>(digest: string): Promise<T>;
|
|
130
|
+
/**
|
|
131
|
+
* The best manifest of an index for a platform, among the ones the content store has (or all)
|
|
132
|
+
* @param index
|
|
133
|
+
* @param platform
|
|
134
|
+
* @param local
|
|
135
|
+
*/
|
|
136
|
+
protected chooseManifest(index: ImageIndex, platform: Platform, local: boolean): Promise<ContentDescriptor | undefined>;
|
|
137
|
+
/**
|
|
138
|
+
* The image of a name (the reference given or its normalized name), undefined when it does not exist
|
|
139
|
+
* @param name
|
|
140
|
+
*/
|
|
141
|
+
get(name: string): Promise<Message | undefined>;
|
|
142
|
+
/**
|
|
143
|
+
* Resolve an image for a platform: its manifest and its configuration (the manifest of the platform of its index)
|
|
144
|
+
* @param name
|
|
145
|
+
* @param platform the one of the machine by default
|
|
146
|
+
*/
|
|
147
|
+
resolve(name: string, platform?: Platform): Promise<ResolvedImage>;
|
|
148
|
+
/**
|
|
149
|
+
* The platforms of an image the content store has (the ones pulled)
|
|
150
|
+
* @param name
|
|
151
|
+
*/
|
|
152
|
+
platforms(name: string): Promise<Platform[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Unpack the layers of an image into the snapshots of the snapshotter (named by the chain of their identifiers), the
|
|
155
|
+
* configuration bound to the last one
|
|
156
|
+
* @param manifest
|
|
157
|
+
* @param lease
|
|
158
|
+
*/
|
|
159
|
+
unpack(manifest: ImageManifest, lease: string): Promise<string>;
|
|
160
|
+
/**
|
|
161
|
+
* Write a manifest, its configuration and its layers (the blobs given by a source), bound by the labels of the
|
|
162
|
+
* garbage collection
|
|
163
|
+
* @param manifest
|
|
164
|
+
* @param blob the bytes of a blob (its stream)
|
|
165
|
+
* @param lease
|
|
166
|
+
* @param labels the labels of all the content (its source)
|
|
167
|
+
* @param progress
|
|
168
|
+
*/
|
|
169
|
+
protected writeImage(manifest: ImageManifest, blob: (descriptor: ContentDescriptor) => Promise<Uint8Array | AsyncIterable<Uint8Array>>, lease: string, labels: Record<string, string>, progress?: (progress: TransferProgress) => void): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* The labels of a manifest binding its configuration and its layers
|
|
172
|
+
* @param manifest
|
|
173
|
+
*/
|
|
174
|
+
protected manifestLabels(manifest: ImageManifest): Record<string, string>;
|
|
175
|
+
/**
|
|
176
|
+
* Pull an image from its registry: the manifests of the platforms asked (of its index), their configurations and
|
|
177
|
+
* their layers; the image named by its reference (docker.io/library/busybox:latest), unpacked for the machine
|
|
178
|
+
* @param reference
|
|
179
|
+
* @param options
|
|
180
|
+
*/
|
|
181
|
+
pull(reference: string, options?: PullOptions): Promise<string>;
|
|
182
|
+
/**
|
|
183
|
+
* Unpack an image for the platforms the machine runs, among the ones the content store has (its manifests pulled):
|
|
184
|
+
* not the other platforms, nor the attestations (unknown/unknown)
|
|
185
|
+
* @param name
|
|
186
|
+
* @param lease
|
|
187
|
+
*/
|
|
188
|
+
protected unpackFor(name: string, lease: string): Promise<void>;
|
|
189
|
+
/**
|
|
190
|
+
* Push an image to a registry (as another reference): the manifest of the platform asked; without it, the manifests
|
|
191
|
+
* of all the platforms and the index when the content store has all of them, the manifest of the machine's platform
|
|
192
|
+
* otherwise
|
|
193
|
+
* @param name
|
|
194
|
+
* @param options
|
|
195
|
+
*/
|
|
196
|
+
push(name: string, options?: {
|
|
197
|
+
reference?: string;
|
|
198
|
+
platform?: Platform;
|
|
199
|
+
registry?: RegistryOptions;
|
|
200
|
+
progress?: (progress: TransferProgress) => void;
|
|
201
|
+
}): Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* Commit the changes of a snapshot (the one of a container) on its image: a layer of their diff, the configuration
|
|
204
|
+
* of the image with its changes, a manifest of the platform, the image named (and unpacked)
|
|
205
|
+
* @param options
|
|
206
|
+
*/
|
|
207
|
+
commit(options: {
|
|
208
|
+
image: string;
|
|
209
|
+
platform: Platform;
|
|
210
|
+
snapshotKey: string;
|
|
211
|
+
name: string;
|
|
212
|
+
changes?: ImageConfigChanges;
|
|
213
|
+
comment?: string;
|
|
214
|
+
author?: string;
|
|
215
|
+
}): Promise<string>;
|
|
216
|
+
/**
|
|
217
|
+
* Name an image again (a tag), its target the same
|
|
218
|
+
* @param name
|
|
219
|
+
* @param reference
|
|
220
|
+
*/
|
|
221
|
+
tag(name: string, reference: string): Promise<string>;
|
|
222
|
+
/**
|
|
223
|
+
* Remove an image (its content and its snapshots are collected by containerd once nothing references them)
|
|
224
|
+
* @param name
|
|
225
|
+
*/
|
|
226
|
+
remove(name: string): Promise<void>;
|
|
227
|
+
/**
|
|
228
|
+
* Import an archive of images: an OCI image layout (nerdctl save, docker save of Docker 25+), or an archive of
|
|
229
|
+
* docker save; the images named by the archive (or by a name given, to an archive of one image), unpacked for the
|
|
230
|
+
* platforms the machine runs
|
|
231
|
+
* @param source a file, or its stream
|
|
232
|
+
* @param options
|
|
233
|
+
*/
|
|
234
|
+
import(source: string | NodeJS.ReadableStream, options?: {
|
|
235
|
+
name?: string;
|
|
236
|
+
unpack?: boolean;
|
|
237
|
+
}): Promise<string[]>;
|
|
238
|
+
/**
|
|
239
|
+
* Write a manifest or an index of an archive, and what it references (the manifests the archive has)
|
|
240
|
+
* @param descriptor
|
|
241
|
+
* @param blob
|
|
242
|
+
* @param lease
|
|
243
|
+
*/
|
|
244
|
+
protected writeTree(descriptor: ContentDescriptor, blob: (descriptor: ContentDescriptor) => Promise<AsyncIterable<Uint8Array>>, lease: string): Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Extract an archive into a directory
|
|
247
|
+
* @param source
|
|
248
|
+
* @param directory
|
|
249
|
+
*/
|
|
250
|
+
protected extract(source: NodeJS.ReadableStream, directory: string): Promise<void>;
|
|
251
|
+
/**
|
|
252
|
+
* Export images into an archive: an OCI image layout (named by io.containerd.image.name), with the manifest.json of
|
|
253
|
+
* docker load (the manifest of the platform of the machine, or the first one)
|
|
254
|
+
* @param names
|
|
255
|
+
* @param destination a file, or its stream
|
|
256
|
+
*/
|
|
257
|
+
export(names: string[], destination: string | NodeJS.WritableStream): Promise<void>;
|
|
258
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type Schema } from '@lakutata/grpc';
|
|
2
|
+
export declare const Empty: Schema;
|
|
3
|
+
export declare const Timestamp: Schema;
|
|
4
|
+
export declare const Any: Schema;
|
|
5
|
+
export declare const FieldMask: Schema;
|
|
6
|
+
export declare const Descriptor: Schema;
|
|
7
|
+
export declare const Mount: Schema;
|
|
8
|
+
export declare const VersionResponse: Schema;
|
|
9
|
+
export declare const Namespace: Schema;
|
|
10
|
+
export declare const CreateNamespaceRequest: Schema;
|
|
11
|
+
export declare const ListNamespacesResponse: Schema;
|
|
12
|
+
export declare const Image: Schema;
|
|
13
|
+
export declare const GetImageRequest: Schema;
|
|
14
|
+
export declare const ImageResponse: Schema;
|
|
15
|
+
export declare const CreateImageRequest: Schema;
|
|
16
|
+
export declare const UpdateImageRequest: Schema;
|
|
17
|
+
export declare const ListImagesRequest: Schema;
|
|
18
|
+
export declare const ListImagesResponse: Schema;
|
|
19
|
+
export declare const DeleteImageRequest: Schema;
|
|
20
|
+
export declare const ContentInfo: Schema;
|
|
21
|
+
export declare const InfoRequest: Schema;
|
|
22
|
+
export declare const InfoResponse: Schema;
|
|
23
|
+
export declare const UpdateContentRequest: Schema;
|
|
24
|
+
export declare const DeleteContentRequest: Schema;
|
|
25
|
+
export declare const ReadContentRequest: Schema;
|
|
26
|
+
export declare const ReadContentResponse: Schema;
|
|
27
|
+
/**
|
|
28
|
+
* The actions of the writes of content
|
|
29
|
+
*/
|
|
30
|
+
export declare enum WriteAction {
|
|
31
|
+
STAT = 0,
|
|
32
|
+
WRITE = 1,
|
|
33
|
+
COMMIT = 2
|
|
34
|
+
}
|
|
35
|
+
export declare const WriteContentRequest: Schema;
|
|
36
|
+
export declare const WriteContentResponse: Schema;
|
|
37
|
+
export declare const AbortRequest: Schema;
|
|
38
|
+
export declare const Lease: Schema;
|
|
39
|
+
export declare const CreateLeaseRequest: Schema;
|
|
40
|
+
export declare const CreateLeaseResponse: Schema;
|
|
41
|
+
export declare const DeleteLeaseRequest: Schema;
|
|
42
|
+
export declare const PrepareSnapshotRequest: Schema;
|
|
43
|
+
export declare const MountsResponse: Schema;
|
|
44
|
+
export declare const MountsRequest: Schema;
|
|
45
|
+
export declare const CommitSnapshotRequest: Schema;
|
|
46
|
+
export declare const SnapshotKeyRequest: Schema;
|
|
47
|
+
export declare const SnapshotInfo: Schema;
|
|
48
|
+
export declare const StatSnapshotResponse: Schema;
|
|
49
|
+
export declare const UsageResponse: Schema;
|
|
50
|
+
export declare const ApplyRequest: Schema;
|
|
51
|
+
export declare const ApplyResponse: Schema;
|
|
52
|
+
export declare const ContainerRuntime: Schema;
|
|
53
|
+
export declare const Container: Schema;
|
|
54
|
+
export declare const GetContainerRequest: Schema;
|
|
55
|
+
export declare const ContainerResponse: Schema;
|
|
56
|
+
export declare const CreateContainerRequest: Schema;
|
|
57
|
+
export declare const UpdateContainerRequest: Schema;
|
|
58
|
+
export declare const ListContainersRequest: Schema;
|
|
59
|
+
export declare const ListContainersResponse: Schema;
|
|
60
|
+
export declare const DeleteContainerRequest: Schema;
|
|
61
|
+
/**
|
|
62
|
+
* The states of the processes of the tasks
|
|
63
|
+
*/
|
|
64
|
+
export declare enum ProcessStatus {
|
|
65
|
+
UNKNOWN = 0,
|
|
66
|
+
CREATED = 1,
|
|
67
|
+
RUNNING = 2,
|
|
68
|
+
STOPPED = 3,
|
|
69
|
+
PAUSED = 4,
|
|
70
|
+
PAUSING = 5
|
|
71
|
+
}
|
|
72
|
+
export declare const Process: Schema;
|
|
73
|
+
export declare const CreateTaskRequest: Schema;
|
|
74
|
+
export declare const CreateTaskResponse: Schema;
|
|
75
|
+
export declare const ProcessRequest: Schema;
|
|
76
|
+
export declare const StartResponse: Schema;
|
|
77
|
+
export declare const DeleteTaskRequest: Schema;
|
|
78
|
+
export declare const DeleteTaskResponse: Schema;
|
|
79
|
+
export declare const GetTaskResponse: Schema;
|
|
80
|
+
export declare const ListTasksRequest: Schema;
|
|
81
|
+
export declare const ListTasksResponse: Schema;
|
|
82
|
+
export declare const KillRequest: Schema;
|
|
83
|
+
export declare const ExecProcessRequest: Schema;
|
|
84
|
+
export declare const ResizePtyRequest: Schema;
|
|
85
|
+
export declare const CloseIORequest: Schema;
|
|
86
|
+
export declare const ContainerIdRequest: Schema;
|
|
87
|
+
export declare const ListPidsResponse: Schema;
|
|
88
|
+
export declare const WaitResponse: Schema;
|
|
89
|
+
export declare const UpdateTaskRequest: Schema;
|
|
90
|
+
export declare const SubscribeRequest: Schema;
|
|
91
|
+
export declare const Envelope: Schema;
|
|
92
|
+
/**
|
|
93
|
+
* The events of containerd decoded, by their type (the type URL of their Any)
|
|
94
|
+
*/
|
|
95
|
+
export declare const EVENTS: Readonly<Record<string, Schema>>;
|
|
96
|
+
export declare const RuncOptions: Schema;
|
|
97
|
+
export declare const MetricsRequest: Schema;
|
|
98
|
+
export declare const Metric: Schema;
|
|
99
|
+
export declare const MetricsResponse: Schema;
|
|
100
|
+
export declare const CgroupV2Metrics: Schema;
|
|
101
|
+
export declare const CgroupV1Metrics: Schema;
|
|
102
|
+
export declare const DiffRequest: Schema;
|
|
103
|
+
export declare const DiffResponse: Schema;
|