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:
fys
2025-06-04 11:12:55 +08:00
committed by GitHub
parent ecaefd1da7
commit 454c52634c
10 changed files with 9048 additions and 297 deletions
+31
View File
@@ -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;
}