@spheron/protocol-sdk
Version:
Spheron Protocol SDK
80 lines • 1.88 kB
TypeScript
export type ServiceExposeHttpOptions = {
maxBodySize: number;
readTimeout: number;
sendTimeout: number;
nextTries: number;
nextTimeout: number;
nextCases: string[];
};
export type ServiceExpose = {
port: number;
externalPort: number;
proto: string;
service: any;
global: boolean;
hosts: any;
httpOptions: ServiceExposeHttpOptions;
ip: string;
endpointSequenceNumber: number;
};
export type ExposeTo = {
service?: string;
global?: boolean;
http_options: HTTPOptions;
ip: string;
};
export type HTTPOptions = {
max_body_size: number;
read_timeout: number;
send_timeout: number;
next_tries: number;
next_timeout: number;
next_cases: string[];
};
export type Accept = {
items?: string[];
};
export type Expose = {
port: number;
as: number;
proto?: string;
to?: ExposeTo[];
accept: Accept;
http_options: HTTPOptions;
};
export type Dependency = {
service: string;
};
export type ServiceStorageParams = {
name: string;
mount: string;
readOnly: boolean;
};
export type ServiceParams = {
storage?: Record<string, ServiceStorageParams>;
};
export type ServiceImageCredentials = {
host: string;
email?: string;
username: string;
password: string;
};
export type Service = {
image: string;
command: string[] | null;
args: string[] | null;
env: string[] | null;
expose: Expose[];
dependencies?: Dependency[];
params?: ServiceParams;
credentials?: ServiceImageCredentials;
};
export declare function manifestExpose(service: Service, sdl: any): ServiceExpose[];
export declare function serviceResourceEndpoints(service: Service, sdl: any): ({
kind: number;
sequence_number: any;
} | {
sequence_number: number;
kind?: undefined;
})[];
//# sourceMappingURL=manifest-utils.d.ts.map