mirror of
https://github.com/RGJorge/ContainerFlow.git
synced 2026-08-03 07:21:42 +02:00
v0.0.1
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
export interface Service {
|
||||
id: string;
|
||||
uid: string;
|
||||
name: string;
|
||||
image: string;
|
||||
state: "running" | "exited" | "paused" | "restarting" | "dead";
|
||||
status: string;
|
||||
ports: { host: number; container: number }[];
|
||||
networks: string[];
|
||||
project: string;
|
||||
compose_file: string;
|
||||
}
|
||||
|
||||
export interface Connection {
|
||||
from: string;
|
||||
to: string;
|
||||
network: string;
|
||||
type?: string;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export interface Stats {
|
||||
service: string;
|
||||
cpu: number;
|
||||
mem_mb: number;
|
||||
mem_percent: number;
|
||||
}
|
||||
|
||||
export interface DockerEvent {
|
||||
type: "docker";
|
||||
action: string;
|
||||
service: string;
|
||||
time: number;
|
||||
}
|
||||
|
||||
export interface LogLine {
|
||||
container: string;
|
||||
line: string;
|
||||
timestamp: string;
|
||||
stream: "stdout" | "stderr";
|
||||
}
|
||||
|
||||
export type WSMessage =
|
||||
| { type: "services"; data: Service[] }
|
||||
| { type: "connections"; data: Connection[] }
|
||||
| { type: "stats"; data: Stats[] }
|
||||
| { type: "docker_event"; data: DockerEvent }
|
||||
| { type: "subscribe_logs"; container: string }
|
||||
| { type: "unsubscribe_logs" }
|
||||
| { type: "log_line"; data: LogLine };
|
||||
Reference in New Issue
Block a user