feat: add proto definition about trigger create (#241)
* feat: add trigger create * chore: unified naming style * chore: rename some fields * chore: make all
This commit is contained in:
@@ -286,3 +286,34 @@ message SetDatabaseOptions {
|
||||
message UnsetDatabaseOptions {
|
||||
repeated string keys = 1;
|
||||
}
|
||||
|
||||
// The create trigger expression.
|
||||
message CreateTriggerExpr {
|
||||
string catalog_name = 1;
|
||||
string trigger_name = 2;
|
||||
bool create_if_not_exists = 3;
|
||||
// The SQL statement to be executed periodically.
|
||||
string sql = 4;
|
||||
// The channels for sending notifications.
|
||||
repeated NotifyChannel channels = 5;
|
||||
// The user-defined labels.
|
||||
map<string, string> labels = 6;
|
||||
// The user-defined annotations.
|
||||
map<string, string> annotations = 7;
|
||||
// The execution interval for sql query in seconds.
|
||||
uint64 interval = 8;
|
||||
}
|
||||
|
||||
// The notification channel for trigger.
|
||||
message NotifyChannel {
|
||||
string name = 1;
|
||||
oneof channel_type {
|
||||
WebhookOptions webhook = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// The options for webhook.
|
||||
message WebhookOptions {
|
||||
string url = 1;
|
||||
map<string, string> opts = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user