mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Add skeleton logic for handling supevisor control messages
This commit is contained in:
parent
e46cf88435
commit
7c08488dfc
5 changed files with 170 additions and 34 deletions
|
@ -4,18 +4,19 @@
|
|||
module Supervisor;
|
||||
|
||||
export {
|
||||
type Status: record {
|
||||
# TODO: add proper status fields
|
||||
n: count;
|
||||
};
|
||||
|
||||
type NodeConfig: record {
|
||||
# TODO: add proper config field
|
||||
type Node: record {
|
||||
# TODO: add proper config fields
|
||||
name: string;
|
||||
};
|
||||
|
||||
type Status: record {
|
||||
# TODO: add proper status fields
|
||||
n: count;
|
||||
nodes: table[string] of Node;
|
||||
};
|
||||
|
||||
global status: function(nodes: string &default="all"): Status;
|
||||
global create: function(config: NodeConfig): string;
|
||||
global create: function(node: Node): string;
|
||||
global destroy: function(nodes: string): bool;
|
||||
global restart: function(nodes: string &default="all"): bool;
|
||||
|
||||
|
@ -24,7 +25,7 @@ export {
|
|||
global Supervisor::status_request: event(id: count, nodes: string);
|
||||
global Supervisor::status_response: event(id: count, result: Status);
|
||||
|
||||
global Supervisor::create_request: event(id: count, config: NodeConfig);
|
||||
global Supervisor::create_request: event(id: count, node: Node);
|
||||
global Supervisor::create_response: event(id: count, result: string);
|
||||
|
||||
global Supervisor::destroy_request: event(id: count, nodes: string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue