@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
41 lines (40 loc) • 2.5 kB
TypeScript
import { type Pod } from '../../../resources/pod/pod.js';
import { PodReference } from '../../../resources/pod/pod-reference.js';
import { type KubeConfig, type CoreV1Api, V1Pod } from '@kubernetes/client-node';
import { type Pods } from '../../../resources/pod/pods.js';
import { ContainerName } from '../../../resources/container/container-name.js';
import { type PodCondition } from '../../../resources/pod/pod-condition.js';
export declare class K8ClientPod implements Pod {
readonly podReference: PodReference | null;
private readonly pods;
private readonly kubeClient;
private readonly kubeConfig;
private readonly kubectlInstallationDirectory;
readonly labels?: Record<string, string>;
readonly startupProbeCommand?: string[];
readonly containerName?: ContainerName;
readonly containerImage?: string;
readonly containerCommand?: string[];
readonly conditions?: PodCondition[];
readonly podIp?: string;
readonly creationTimestamp?: Date;
readonly deletionTimestamp?: Date;
private readonly logger;
constructor(podReference: PodReference | null, pods: Pods, kubeClient: CoreV1Api, kubeConfig: KubeConfig, kubectlInstallationDirectory: string, labels?: Record<string, string>, startupProbeCommand?: string[], containerName?: ContainerName, containerImage?: string, containerCommand?: string[], conditions?: PodCondition[], podIp?: string, creationTimestamp?: Date, deletionTimestamp?: Date);
killPod(): Promise<void>;
/**
* Forward a local port to a port on the pod
* @param localPort The local port to forward from
* @param podPort The pod port to forward to
* @param reuse - if true, reuse the port number from previous port forward operation
* @param persist - if true, errors in port-forwarding will restart the port-forwarding, even after ts process has ended
* @param isRetry
* @returns Promise resolving to the port forwarder server when not detached,
* or the port number (which may differ from localPort if it was in use) when detached
*/
portForward(localPort: number, podPort: number, reuse?: boolean, persist?: boolean, externalAddress?: string, isRetry?: boolean): Promise<number>;
private searchProcessListCommandByStrings;
stopPortForward(port: number): Promise<void>;
static toV1Pod(pod: Pod): V1Pod;
static fromV1Pod(v1Pod: V1Pod, pods: Pods, coreV1Api: CoreV1Api, kubeConfig: KubeConfig, kubectlInstallationDirectory: string): Pod;
}