mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Add Supervisor BIF/event API skeleton
This commit is contained in:
parent
52f7647f25
commit
e46cf88435
16 changed files with 232 additions and 12 deletions
35
scripts/base/frameworks/supervisor/api.zeek
Normal file
35
scripts/base/frameworks/supervisor/api.zeek
Normal file
|
@ -0,0 +1,35 @@
|
|||
##! The Zeek process supervision API.
|
||||
# TODO: add proper docs
|
||||
|
||||
module Supervisor;
|
||||
|
||||
export {
|
||||
type Status: record {
|
||||
# TODO: add proper status fields
|
||||
n: count;
|
||||
};
|
||||
|
||||
type NodeConfig: record {
|
||||
# TODO: add proper config field
|
||||
name: string;
|
||||
};
|
||||
|
||||
global status: function(nodes: string &default="all"): Status;
|
||||
global create: function(config: NodeConfig): string;
|
||||
global destroy: function(nodes: string): bool;
|
||||
global restart: function(nodes: string &default="all"): bool;
|
||||
|
||||
global Supervisor::stop_request: event();
|
||||
|
||||
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_response: event(id: count, result: string);
|
||||
|
||||
global Supervisor::destroy_request: event(id: count, nodes: string);
|
||||
global Supervisor::destroy_response: event(id: count, result: bool);
|
||||
|
||||
global Supervisor::restart_request: event(id: count, nodes: string);
|
||||
global Supervisor::restart_response: event(id: count, result: bool);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue