@spheron/protocol-sdk
Version:
Spheron Protocol SDK
82 lines • 2 kB
TypeScript
import { NetworkType } from '@config/index';
import { ServiceManifest } from './manifest-utils';
import { OrderDetails } from '@modules/order/types';
declare enum Tier {
One = 0,
Two = 1,
Three = 2,
Four = 3,
Five = 4,
Six = 5,
Seven = 6
}
export declare const yamlToOrderDetails: (yamlString: string, networkType: NetworkType) => {
error: boolean;
orderDetails?: OrderDetails;
message?: string;
};
export declare const getKeysByTierValues: (tierValues: Tier[]) => string[];
export declare const getKeysForTiersString: (tiersString: string) => string[];
export declare const getManifestIcl: (yamlInput: string) => {
name: string;
services: ServiceManifest[];
}[];
export interface V2ServiceManifest {
name: string;
image: string;
command?: string[];
args?: string[];
env?: string[];
credentials?: {
host: string;
username: string;
password: string;
email?: string;
};
resources: {
i: number;
c: {
u: number;
a?: Array<{
k: string;
v: string;
}>;
};
m: {
u: number;
};
s: Array<{
n: string;
u: number;
a?: Array<{
k: string;
v: string;
}>;
m?: string;
ro?: boolean;
}>;
g: {
u: number;
a?: Array<{
k: string;
v: string;
}>;
};
};
replica: number;
ports?: Array<{
port?: number;
externalPort?: number;
global?: boolean;
exposeTo?: string;
portRange?: string;
portRangeAs?: string;
}>;
pullPolicy?: string;
}
export interface V2Manifest {
services: V2ServiceManifest[];
}
export declare const getManifestV2: (yamlInput: string) => V2Manifest;
export {};
//# sourceMappingURL=deployment.d.ts.map