fix(core): update
This commit is contained in:
parent
27fc65ca56
commit
dac9cc8c82
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/interfaces',
|
name: '@serve.zone/interfaces',
|
||||||
version: '1.0.9',
|
version: '1.0.10',
|
||||||
description: 'interfaces for working with containers'
|
description: 'interfaces for working with containers'
|
||||||
}
|
}
|
||||||
|
13
ts/data/server.ts
Normal file
13
ts/data/server.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export interface IServerMetrics {
|
||||||
|
serverId: string;
|
||||||
|
cpuUsageInPercent: number;
|
||||||
|
memoryUsageinMB: number;
|
||||||
|
memoryAvailableInMB: number;
|
||||||
|
containerCount: number;
|
||||||
|
containerMetrics: Array<{
|
||||||
|
containerId: string;
|
||||||
|
containerName: string;
|
||||||
|
cpuUsageInPercent: number;
|
||||||
|
memoryUsageInMB: number;
|
||||||
|
}>;
|
||||||
|
}
|
@ -1,14 +1,42 @@
|
|||||||
// link external types for reference
|
import type { IServerMetrics } from '../data/server.js';
|
||||||
import { type IRequest_Any_Cloudly_GetServerConfig } from './config.js'
|
|
||||||
|
|
||||||
import * as plugins from '../plugins.js';
|
import * as plugins from '../plugins.js';
|
||||||
|
|
||||||
export interface IRequest_Cloudly_ServerConfig_TriggerAction
|
/**
|
||||||
|
* This request can be used between any two players
|
||||||
|
* Examples:
|
||||||
|
* WebApp -> Cloudly (get metrics)
|
||||||
|
* Cloudly -> Webapp (send metrics)
|
||||||
|
* Cloudly -> Coreflow (get metrics)
|
||||||
|
* Coreflow -> Cloudly (send metrics)
|
||||||
|
*/
|
||||||
|
export interface IRequest_Any_Cloudly_ServerStatus
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_Any_Cloudly_ServerStatus
|
||||||
|
> {
|
||||||
|
method: 'getOrSendServerMetrics',
|
||||||
|
request: {
|
||||||
|
getOrSend: 'get' | 'send';
|
||||||
|
serverMetrics?: IServerMetrics;
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
serverMetrics?: IServerMetrics;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this request can be used between any two players
|
||||||
|
* Examples:
|
||||||
|
* WebApp -> Cloudly
|
||||||
|
* Cloudly -> Coreflow
|
||||||
|
* Cloudly -> HostingProvider
|
||||||
|
*/
|
||||||
|
export interface IRequest_TriggerServerAction
|
||||||
extends plugins.typedrequestInterfaces.implementsTR<
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
plugins.typedrequestInterfaces.ITypedRequest,
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
IRequest_Cloudly_ServerConfig_TriggerAction
|
IRequest_TriggerServerAction
|
||||||
> {
|
> {
|
||||||
method: 'serverConfigTriggerAction';
|
method: 'triggerServerAction';
|
||||||
request: {
|
request: {
|
||||||
actionName: 'reboot' | 'rebuild';
|
actionName: 'reboot' | 'rebuild';
|
||||||
payload: any;
|
payload: any;
|
||||||
|
Loading…
Reference in New Issue
Block a user