mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Notify master about instance status update
Send updates to the master server when the running status of instances change and add onInstanceStatusChanged hook to master plugins.
This commit is contained in:
1 parent
a8e29fdc56
commit
3211fbe985
5 files changed
+111
-16
No files matched your search
+15
-3
@@ -535,17 +535,28 @@ messages.debugWsMessage = new Event({
|
||||
|
||||
messages.instanceInitialized = new Event({
|
||||
type: "instance_initialized",
|
||||
links: ["instance-slave"],
|
||||
links: ["instance-slave", "slave-master"],
|
||||
eventProperties: {
|
||||
"instance_id": { type: "integer" },
|
||||
"plugins": {
|
||||
type: "object",
|
||||
additionalProperties: { type: "string" },
|
||||
}
|
||||
},
|
||||
});
|
||||
messages.instanceStarted = new Event({
|
||||
type: "instance_started",
|
||||
links: ["instance-slave", "slave-master"],
|
||||
eventProperties: {
|
||||
"instance_id": { type: "integer" },
|
||||
},
|
||||
});
|
||||
messages.instanceStopped = new Event({
|
||||
type: 'instance_stopped',
|
||||
links: ['instance-slave'],
|
||||
links: ["instance-slave", "slave-master"],
|
||||
eventProperties: {
|
||||
"instance_id": { type: "integer" },
|
||||
},
|
||||
});
|
||||
|
||||
messages.updateInstances = new Event({
|
||||
@@ -557,9 +568,10 @@ messages.updateInstances = new Event({
|
||||
items: {
|
||||
type: "object",
|
||||
additionalProperties: false,
|
||||
required: ["serialized_config"],
|
||||
required: ["serialized_config", "status"],
|
||||
properties: {
|
||||
"serialized_config": { type: "object" },
|
||||
"status": { enum: ["stopped", "initialized", "running"] },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user