Skip to content

Commit

Permalink
feat: add siren provider plugin proto
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdh committed Sep 10, 2023
1 parent 8300157 commit e28ae26
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
52 changes: 52 additions & 0 deletions gotocompany/siren/provider/v1/provider.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
syntax = "proto3";

package gotocompany.siren.provider.v1;

import "gotocompany/siren/v1beta1/siren.proto";
import "google/protobuf/struct.proto";

option go_package = "github.com/goto/siren/proto/gotocompany/siren/provider/v1;sirenproviderv1beta1";
option java_multiple_files = true;
option java_outer_classname = "ServiceManager";
option java_package = "com.gotocompany.proton.siren.provider";

message SyncRuntimeConfigRequest {
string namespaceID = 1;
string namespaceURN = 2;
gotocompany.siren.v1beta1.Provider provider = 3;
}

message SyncRuntimeConfigResponse {}

message UpsertRuleRequest {
string namespaceURN = 1;
gotocompany.siren.v1beta1.Provider provider = 3;
gotocompany.siren.v1beta1.Rule rule = 4;
gotocompany.siren.v1beta1.Template template = 5;
}

message UpsertRuleResponse {}

message SetConfigRequest {
string config_raw = 1;
}

message SetConfigResponse {}

message TransformToAlertsRequest {
string providerID = 1;
string namespaceID = 2;
google.protobuf.Struct body = 3;
}

message TransformToAlertsResponse {
repeated gotocompany.siren.v1beta1.Alert alerts = 1;
uint64 firing_num = 2;
}

service ProviderService {
rpc SyncRuntimeConfig(SyncRuntimeConfigRequest) returns (SyncRuntimeConfigResponse);
rpc UpsertRule(UpsertRuleRequest) returns (UpsertRuleResponse);
rpc SetConfig(SetConfigRequest) returns (SetConfigResponse);
rpc TransformToAlerts(TransformToAlertsRequest) returns (TransformToAlertsResponse);
}
11 changes: 10 additions & 1 deletion gotocompany/siren/v1beta1/siren.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "validate/validate.proto";

option go_package = "github.com/goto/proton/siren/v1beta1;sirenv1beta1";
option go_package = "github.com/goto/siren/proto/gotocompany/siren/v1beta1;sirenv1beta1";
option java_multiple_files = true;
option java_outer_classname = "ServiceManager";
option java_package = "com.gotocompany.proton.siren";
Expand Down Expand Up @@ -700,6 +700,15 @@ message Alert {
google.protobuf.Timestamp triggered_at = 8;
uint64 namespace_id = 9;
string silence_status = 10;
google.protobuf.Timestamp created_at = 11;
google.protobuf.Timestamp updated_at = 12;

string group_key = 13;
string status = 14;
map<string,string> annotations = 15;
map<string,string> labels = 16;
string generator_url = 17;
string fingerprint = 18;
}

message ListAlertsRequest {
Expand Down

0 comments on commit e28ae26

Please sign in to comment.