Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
itayd committed Jul 30, 2024
1 parent 7935957 commit 0b86bfc
Show file tree
Hide file tree
Showing 13 changed files with 959 additions and 0 deletions.
Empty file added deploysentry/README.md
Empty file.
25 changes: 25 additions & 0 deletions deploysentry/autokitteh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: v1

project:
name: deploysentry
vars:
- name: DEPLOYSENTRY_ADDR
value: "localhost:8080"
- name: INITIAL_RATIO
value: "10"
- name: RATIO_INCREMENT
value: "10"
- name: STEP_DURATION
value: "2s"
connections:
- name: grpc
integration: "grpc"
- name: slack
integration: "slack"
- name: "http"
integration: "http"
triggers:
- name: slack_app_mention
connection: slack
event_type: app_mention
entrypoint: main.star:on_slack_app_mention
8 changes: 8 additions & 0 deletions deploysentry/go/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.PHONY: srv
srv: gen
go build .

.PHONY: gen
gen:
rm -fR gen
buf generate
33 changes: 33 additions & 0 deletions deploysentry/go/api.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
syntax = "proto3";

package autokitteh.deploysentry.api.v1;

message DeployRequest {
string svc = 1;
string version = 2;
}

message DeployResponse {}

message SetRatioRequest {
string svc = 1;
string version = 2;
int32 ratio = 3; // 0..100
}

message SetRatioResponse {}

message GetRequest {
string svc = 1;
}

message GetResponse {
string version = 1;
int32 ratio = 2;
}

service DeploySentryService {
rpc Deploy(DeployRequest) returns (DeployResponse);
rpc SetRatio(SetRatioRequest) returns (SetRatioResponse);
rpc Get(GetRequest) returns (GetResponse);
}
12 changes: 12 additions & 0 deletions deploysentry/go/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v1
managed:
enabled: true
go_package_prefix:
default: github.com/autokitteh/kittehub/deploysentry/go/gen
plugins:
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: gen
opt: paths=source_relative
- plugin: buf.build/connectrpc/go:v1.11.0
out: gen
opt: paths=source_relative
7 changes: 7 additions & 0 deletions deploysentry/go/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
Loading

0 comments on commit 0b86bfc

Please sign in to comment.