Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add event government #60

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
event government add proto file
JasonChen86899 committed Mar 15, 2023
commit 0b68e5b98b0e2b15c525eb769d7c3b7881404386
796 changes: 793 additions & 3 deletions k8s/crd/bases/event.opensergo.io_events.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/api/v1alpha1/event/event.go
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ const (
type EventChannel struct {
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Required
ID string `json:"id"`
UniqueID string `json:"uniqueID"`

// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Required
6 changes: 3 additions & 3 deletions pkg/api/v1alpha1/event/event_types.go
Original file line number Diff line number Diff line change
@@ -29,9 +29,9 @@ type EventSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

Components EventComponents `json:"components"`
// Strategies EventStrategies `json:"strategies"`
//RouterRules EventRouterRules `json:"routerRules"`
Components EventComponents `json:"components"`
Strategies EventStrategies `json:"strategies"`
RouterRules EventRouterRules `json:"routerRules"`
}

// EventStatus defines the observed state of Event
2 changes: 2 additions & 0 deletions pkg/api/v1alpha1/event/zz_generated.deepcopy.go
1,794 changes: 1,794 additions & 0 deletions pkg/proto/event/v1/event.pb.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -11,15 +11,16 @@ import "fault_tolerance/v1/fault_tolerance.proto";

// 事件管道 对应消息队列主题
message EventChannel {
string id = 1; // 全局唯一id
string unique_id = 1; // 全局唯一id
string url = 2; // 消息队列连接地址
string mq_topic_name = 3; // channel对应的消息队列主题
}

// 处理器对象
message EventProcessorRef {
string kind = 1; // 处理器类型 比如 Service 表示服务
string name = 2; // 处理器名称 比如 events-demo 表示服务名叫的 events-demo 的服务
string unique_id = 1; // 全局唯一id
string kind = 2; // 处理器类型 比如 Service 表示服务
string name = 3; // 处理器名称 比如 events-demo 表示服务名叫的 events-demo 的服务
}

// 事件源 生产者
@@ -94,7 +95,7 @@ message EventRuntimeStrategy {
io.opensergo.proto.fault_tolerance.v1.FaultToleranceRule fault_tolerance_rule = 1;
io.opensergo.proto.fault_tolerance.v1.RateLimitStrategy rate_limit_strategy = 2;
io.opensergo.proto.fault_tolerance.v1.CircuitBreakerStrategy circuit_breaker_strategy = 3;
io.opensergo.proto.fault_tolerance.v1.ConcurrencyLimitStrateg concurrency_limit_strateg = 4;
io.opensergo.proto.fault_tolerance.v1.ConcurrencyLimitStrategy concurrency_limit_strateg = 4;
RetryRule retry_rule = 5;
}