Documentation
¶
Index ¶
- Variables
- type AsyncApiServerRule
- func (*AsyncApiServerRule) Descriptor() ([]byte, []int)deprecated
- func (x *AsyncApiServerRule) GetProtocols() []*Protocol
- func (*AsyncApiServerRule) ProtoMessage()
- func (x *AsyncApiServerRule) ProtoReflect() protoreflect.Message
- func (x *AsyncApiServerRule) Reset()
- func (x *AsyncApiServerRule) String() string
- type CloudEvent
- func (*CloudEvent) Descriptor() ([]byte, []int)deprecated
- func (x *CloudEvent) GetData() []byte
- func (x *CloudEvent) GetDataContentType() EventDataContentType
- func (x *CloudEvent) GetDataSchema() string
- func (x *CloudEvent) GetExtensions() map[string]*CloudEvent_AttributeValue
- func (x *CloudEvent) GetId() string
- func (x *CloudEvent) GetSource() string
- func (x *CloudEvent) GetSpecVersion() string
- func (x *CloudEvent) GetSubject() string
- func (x *CloudEvent) GetTime() *timestamppb.Timestamp
- func (x *CloudEvent) GetType() string
- func (*CloudEvent) ProtoMessage()
- func (x *CloudEvent) ProtoReflect() protoreflect.Message
- func (x *CloudEvent) Reset()
- func (x *CloudEvent) String() string
- type CloudEvent_AttributeValue
- func (*CloudEvent_AttributeValue) Descriptor() ([]byte, []int)deprecated
- func (x *CloudEvent_AttributeValue) GetAttr() isCloudEvent_AttributeValue_Attr
- func (x *CloudEvent_AttributeValue) GetBoolean() bool
- func (x *CloudEvent_AttributeValue) GetBytes() []byte
- func (x *CloudEvent_AttributeValue) GetInteger() int32
- func (x *CloudEvent_AttributeValue) GetString_() string
- func (x *CloudEvent_AttributeValue) GetTimestamp() *timestamppb.Timestamp
- func (x *CloudEvent_AttributeValue) GetUri() string
- func (x *CloudEvent_AttributeValue) GetUriRef() string
- func (*CloudEvent_AttributeValue) ProtoMessage()
- func (x *CloudEvent_AttributeValue) ProtoReflect() protoreflect.Message
- func (x *CloudEvent_AttributeValue) Reset()
- func (x *CloudEvent_AttributeValue) String() string
- type CloudEvent_AttributeValue_Boolean
- type CloudEvent_AttributeValue_Bytes
- type CloudEvent_AttributeValue_Integer
- type CloudEvent_AttributeValue_String_
- type CloudEvent_AttributeValue_Timestamp
- type CloudEvent_AttributeValue_Uri
- type CloudEvent_AttributeValue_UriRef
- type ColumnType
- type EventDataContentType
- func (EventDataContentType) Descriptor() protoreflect.EnumDescriptor
- func (x EventDataContentType) Enum() *EventDataContentType
- func (EventDataContentType) EnumDescriptor() ([]byte, []int)deprecated
- func (x EventDataContentType) Number() protoreflect.EnumNumber
- func (x EventDataContentType) String() string
- func (EventDataContentType) Type() protoreflect.EnumType
- type FieldMapping
- func (*FieldMapping) Descriptor() ([]byte, []int)deprecated
- func (x *FieldMapping) GetComment() string
- func (x *FieldMapping) GetDataPath() string
- func (x *FieldMapping) GetHeaderPath() string
- func (x *FieldMapping) GetIgnore() bool
- func (x *FieldMapping) GetNotNull() bool
- func (x *FieldMapping) GetSource() isFieldMapping_Source
- func (x *FieldMapping) GetTargetColumn() string
- func (x *FieldMapping) GetType() ColumnType
- func (*FieldMapping) ProtoMessage()
- func (x *FieldMapping) ProtoReflect() protoreflect.Message
- func (x *FieldMapping) Reset()
- func (x *FieldMapping) String() string
- type FieldMapping_DataPath
- type FieldMapping_HeaderPath
- type OperationRule
- func (*OperationRule) Descriptor() ([]byte, []int)deprecated
- func (x *OperationRule) GetAction() OperationRule_ActionType
- func (x *OperationRule) GetChannel() *OperationRule_Channel
- func (*OperationRule) ProtoMessage()
- func (x *OperationRule) ProtoReflect() protoreflect.Message
- func (x *OperationRule) Reset()
- func (x *OperationRule) String() string
- type OperationRule_ActionType
- func (OperationRule_ActionType) Descriptor() protoreflect.EnumDescriptor
- func (x OperationRule_ActionType) Enum() *OperationRule_ActionType
- func (OperationRule_ActionType) EnumDescriptor() ([]byte, []int)deprecated
- func (x OperationRule_ActionType) Number() protoreflect.EnumNumber
- func (x OperationRule_ActionType) String() string
- func (OperationRule_ActionType) Type() protoreflect.EnumType
- type OperationRule_Channel
- func (*OperationRule_Channel) Descriptor() ([]byte, []int)deprecated
- func (x *OperationRule_Channel) GetAddress() string
- func (x *OperationRule_Channel) GetBinding() *OperationRule_Channel_Binding
- func (x *OperationRule_Channel) GetDescription() string
- func (*OperationRule_Channel) ProtoMessage()
- func (x *OperationRule_Channel) ProtoReflect() protoreflect.Message
- func (x *OperationRule_Channel) Reset()
- func (x *OperationRule_Channel) String() string
- type OperationRule_Channel_Binding
- func (*OperationRule_Channel_Binding) Descriptor() ([]byte, []int)deprecated
- func (x *OperationRule_Channel_Binding) GetAmqp() *OperationRule_Channel_Binding_Amqp
- func (x *OperationRule_Channel_Binding) GetKafka() *OperationRule_Channel_Binding_Kafka
- func (x *OperationRule_Channel_Binding) GetMqtt() *OperationRule_Channel_Binding_Mqtt
- func (x *OperationRule_Channel_Binding) GetNats() *OperationRule_Channel_Binding_Nats
- func (x *OperationRule_Channel_Binding) GetRocketmq() *OperationRule_Channel_Binding_Rocketmq
- func (*OperationRule_Channel_Binding) ProtoMessage()
- func (x *OperationRule_Channel_Binding) ProtoReflect() protoreflect.Message
- func (x *OperationRule_Channel_Binding) Reset()
- func (x *OperationRule_Channel_Binding) String() string
- type OperationRule_Channel_Binding_Amqp
- func (*OperationRule_Channel_Binding_Amqp) Descriptor() ([]byte, []int)deprecated
- func (x *OperationRule_Channel_Binding_Amqp) GetExchange() string
- func (x *OperationRule_Channel_Binding_Amqp) GetRoutingKey() string
- func (*OperationRule_Channel_Binding_Amqp) ProtoMessage()
- func (x *OperationRule_Channel_Binding_Amqp) ProtoReflect() protoreflect.Message
- func (x *OperationRule_Channel_Binding_Amqp) Reset()
- func (x *OperationRule_Channel_Binding_Amqp) String() string
- type OperationRule_Channel_Binding_Kafka
- func (*OperationRule_Channel_Binding_Kafka) Descriptor() ([]byte, []int)deprecated
- func (x *OperationRule_Channel_Binding_Kafka) GetKey() string
- func (x *OperationRule_Channel_Binding_Kafka) GetPartition() int32
- func (*OperationRule_Channel_Binding_Kafka) ProtoMessage()
- func (x *OperationRule_Channel_Binding_Kafka) ProtoReflect() protoreflect.Message
- func (x *OperationRule_Channel_Binding_Kafka) Reset()
- func (x *OperationRule_Channel_Binding_Kafka) String() string
- type OperationRule_Channel_Binding_Mqtt
- func (*OperationRule_Channel_Binding_Mqtt) Descriptor() ([]byte, []int)deprecated
- func (x *OperationRule_Channel_Binding_Mqtt) GetQos() int32
- func (x *OperationRule_Channel_Binding_Mqtt) GetRetain() bool
- func (*OperationRule_Channel_Binding_Mqtt) ProtoMessage()
- func (x *OperationRule_Channel_Binding_Mqtt) ProtoReflect() protoreflect.Message
- func (x *OperationRule_Channel_Binding_Mqtt) Reset()
- func (x *OperationRule_Channel_Binding_Mqtt) String() string
- type OperationRule_Channel_Binding_Nats
- func (*OperationRule_Channel_Binding_Nats) Descriptor() ([]byte, []int)deprecated
- func (*OperationRule_Channel_Binding_Nats) ProtoMessage()
- func (x *OperationRule_Channel_Binding_Nats) ProtoReflect() protoreflect.Message
- func (x *OperationRule_Channel_Binding_Nats) Reset()
- func (x *OperationRule_Channel_Binding_Nats) String() string
- type OperationRule_Channel_Binding_Rocketmq
- func (*OperationRule_Channel_Binding_Rocketmq) Descriptor() ([]byte, []int)deprecated
- func (x *OperationRule_Channel_Binding_Rocketmq) GetDelayLevel() int32
- func (x *OperationRule_Channel_Binding_Rocketmq) GetKey() string
- func (x *OperationRule_Channel_Binding_Rocketmq) GetMessageType() OperationRule_Channel_Binding_Rocketmq_MessageType
- func (x *OperationRule_Channel_Binding_Rocketmq) GetTag() string
- func (*OperationRule_Channel_Binding_Rocketmq) ProtoMessage()
- func (x *OperationRule_Channel_Binding_Rocketmq) ProtoReflect() protoreflect.Message
- func (x *OperationRule_Channel_Binding_Rocketmq) Reset()
- func (x *OperationRule_Channel_Binding_Rocketmq) String() string
- type OperationRule_Channel_Binding_Rocketmq_MessageType
- func (OperationRule_Channel_Binding_Rocketmq_MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x OperationRule_Channel_Binding_Rocketmq_MessageType) Enum() *OperationRule_Channel_Binding_Rocketmq_MessageType
- func (OperationRule_Channel_Binding_Rocketmq_MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x OperationRule_Channel_Binding_Rocketmq_MessageType) Number() protoreflect.EnumNumber
- func (x OperationRule_Channel_Binding_Rocketmq_MessageType) String() string
- func (OperationRule_Channel_Binding_Rocketmq_MessageType) Type() protoreflect.EnumType
- type Protocol
- type SinkConfig
- func (*SinkConfig) Descriptor() ([]byte, []int)deprecated
- func (x *SinkConfig) GetBatchSize() int32
- func (x *SinkConfig) GetCheckpointInterval() string
- func (x *SinkConfig) GetParallelism() int32
- func (x *SinkConfig) GetProperties() map[string]string
- func (*SinkConfig) ProtoMessage()
- func (x *SinkConfig) ProtoReflect() protoreflect.Message
- func (x *SinkConfig) Reset()
- func (x *SinkConfig) String() string
- type SinkRule
- func (*SinkRule) Descriptor() ([]byte, []int)deprecated
- func (x *SinkRule) GetAutoInferDataMapping() bool
- func (x *SinkRule) GetAutoMap() bool
- func (x *SinkRule) GetConfig() *SinkConfig
- func (x *SinkRule) GetDatabase() string
- func (x *SinkRule) GetEventDataContentType() EventDataContentType
- func (x *SinkRule) GetMapping() []*FieldMapping
- func (x *SinkRule) GetPartitionKey() []string
- func (x *SinkRule) GetPrimaryKey() []string
- func (x *SinkRule) GetSourceTopic() string
- func (x *SinkRule) GetTable() string
- func (x *SinkRule) GetTarget() SinkType
- func (*SinkRule) ProtoMessage()
- func (x *SinkRule) ProtoReflect() protoreflect.Message
- func (x *SinkRule) Reset()
- func (x *SinkRule) String() string
- type SinkType
Constants ¶
This section is empty.
Variables ¶
var ( EventDataContentType_name = map[int32]string{ 0: "CONTENT_TYPE_UNSPECIFIED", 1: "CONTENT_TYPE_JSON", 2: "CONTENT_TYPE_PROTOBUF", 3: "CONTENT_TYPE_AVRO", } EventDataContentType_value = map[string]int32{ "CONTENT_TYPE_UNSPECIFIED": 0, "CONTENT_TYPE_JSON": 1, "CONTENT_TYPE_PROTOBUF": 2, "CONTENT_TYPE_AVRO": 3, } )
Enum value maps for EventDataContentType.
var ( // event_type 选项编号: 50001 // 声明此消息对应的 CloudEvent type 属性 // 格式: {reverse-domain}.{event-name}.{version} // 例如: "acme.user.created.v1", "io.github.order.paid.v2" // // optional string event_type = 50001; E_EventType = &file_eventapi_v1_cloudevent_proto_extTypes[0] // event_data_content_type 选项编号: 50003 // 声明此消息对应的 CloudEvent data_content_type // 默认: CONTENT_TYPE_JSON // // optional eventapi.v1.EventDataContentType event_data_content_type = 50003; E_EventDataContentType = &file_eventapi_v1_cloudevent_proto_extTypes[3] )
Extension fields to descriptorpb.MessageOptions.
var ( // is_event_subject 选项编号: 50002 // 标记此字段的值将提取为 CloudEvent 的 subject 属性 // subject 用于标识事件所描述的资源 // 例如: user_id 字段标记为 subject,则 "user.123" 成为 subject // // optional bool is_event_subject = 50002; E_IsEventSubject = &file_eventapi_v1_cloudevent_proto_extTypes[1] // is_event_header 选项编号: 50004 // // optional bool is_event_header = 50004; E_IsEventHeader = &file_eventapi_v1_cloudevent_proto_extTypes[2] )
Extension fields to descriptorpb.FieldOptions.
var ( OperationRule_ActionType_name = map[int32]string{ 0: "UNSPECIFIED", 1: "SEND", 2: "RECEIVE", } OperationRule_ActionType_value = map[string]int32{ "UNSPECIFIED": 0, "SEND": 1, "RECEIVE": 2, } )
Enum value maps for OperationRule_ActionType.
var ( OperationRule_Channel_Binding_Rocketmq_MessageType_name = map[int32]string{ 0: "NORMAL", 1: "ORDER", 2: "TRANSACTION", 3: "DELAY", } OperationRule_Channel_Binding_Rocketmq_MessageType_value = map[string]int32{ "NORMAL": 0, "ORDER": 1, "TRANSACTION": 2, "DELAY": 3, } )
Enum value maps for OperationRule_Channel_Binding_Rocketmq_MessageType.
var ( SinkType_name = map[int32]string{ 0: "SINK_TYPE_UNSPECIFIED", 1: "SINK_TYPE_STARROCKS", 2: "SINK_TYPE_MYSQL", 3: "SINK_TYPE_CLICKHOUSE", 4: "SINK_TYPE_POSTGRESQL", } SinkType_value = map[string]int32{ "SINK_TYPE_UNSPECIFIED": 0, "SINK_TYPE_STARROCKS": 1, "SINK_TYPE_MYSQL": 2, "SINK_TYPE_CLICKHOUSE": 3, "SINK_TYPE_POSTGRESQL": 4, } )
Enum value maps for SinkType.
var ( ColumnType_name = map[int32]string{ 0: "COLUMN_TYPE_UNSPECIFIED", 1: "COLUMN_TYPE_VARCHAR", 2: "COLUMN_TYPE_BIGINT", 3: "COLUMN_TYPE_TIMESTAMP", 4: "COLUMN_TYPE_DECIMAL", 5: "COLUMN_TYPE_BOOLEAN", 6: "COLUMN_TYPE_JSON", 7: "COLUMN_TYPE_DOUBLE", } ColumnType_value = map[string]int32{ "COLUMN_TYPE_UNSPECIFIED": 0, "COLUMN_TYPE_VARCHAR": 1, "COLUMN_TYPE_BIGINT": 2, "COLUMN_TYPE_TIMESTAMP": 3, "COLUMN_TYPE_DECIMAL": 4, "COLUMN_TYPE_BOOLEAN": 5, "COLUMN_TYPE_JSON": 6, "COLUMN_TYPE_DOUBLE": 7, } )
Enum value maps for ColumnType.
var ( // operation 选项编号: 50101 // 用于配置 Channel (即 Topic/Queue) 和操作类型 // // optional eventapi.v1.OperationRule operation = 50101; E_Operation = &file_eventapi_v1_eventapi_proto_extTypes[1] )
Extension fields to descriptorpb.MethodOptions.
var ( // server 选项编号: 50201 // 用于配置 AsyncAPI Server (即消息 Broker) 的协议信息 // // optional eventapi.v1.AsyncApiServerRule server = 50201; E_Server = &file_eventapi_v1_eventapi_proto_extTypes[0] )
Extension fields to descriptorpb.ServiceOptions.
var ( // sink 选项编号: 50102 // // optional eventapi.v1.SinkRule sink = 50102; E_Sink = &file_eventapi_v1_sink_proto_extTypes[0] )
Extension fields to descriptorpb.MethodOptions.
var File_eventapi_v1_cloudevent_proto protoreflect.FileDescriptor
var File_eventapi_v1_eventapi_proto protoreflect.FileDescriptor
var File_eventapi_v1_sink_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AsyncApiServerRule ¶
type AsyncApiServerRule struct {
// 支持的协议列表
// 当有多个协议时,会为每个协议生成一个独立的 SDK
// 例如: [{name: "kafka", version: "3.5.0"}, {name: "amqp", version: "0.9.1"}]
Protocols []*Protocol `protobuf:"bytes,1,rep,name=protocols,proto3" json:"protocols,omitempty"`
// contains filtered or unexported fields
}
Service 级别:AsyncAPI Server(Broker)协议配置 对应 AsyncAPI 规范中的 Server Object 参考: https://www.asyncapi.com/docs/reference/specification/latest#serverObject
func (*AsyncApiServerRule) Descriptor
deprecated
func (*AsyncApiServerRule) Descriptor() ([]byte, []int)
Deprecated: Use AsyncApiServerRule.ProtoReflect.Descriptor instead.
func (*AsyncApiServerRule) GetProtocols ¶
func (x *AsyncApiServerRule) GetProtocols() []*Protocol
func (*AsyncApiServerRule) ProtoMessage ¶
func (*AsyncApiServerRule) ProtoMessage()
func (*AsyncApiServerRule) ProtoReflect ¶
func (x *AsyncApiServerRule) ProtoReflect() protoreflect.Message
func (*AsyncApiServerRule) Reset ¶
func (x *AsyncApiServerRule) Reset()
func (*AsyncApiServerRule) String ¶
func (x *AsyncApiServerRule) String() string
type CloudEvent ¶
type CloudEvent struct {
// CloudEvent ID,唯一标识符
// 由 SDK 自动生成 UUID
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// 事件来源,标识事件发生的位置
// 格式: URI 或 URN
// 例如: "urn:eventapi:service:user-service", "/myapp/users"
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
// CloudEvents 规范版本
// 固定值: "1.0"
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion
SpecVersion string `protobuf:"bytes,3,opt,name=spec_version,json=specVersion,proto3" json:"spec_version,omitempty"`
// 事件类型,唯一标识事件的类型和版本
// 由 event_type 选项定义
// 例如: "acme.user.created.v1"
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
// 数据内容类型 (MIME type)
// 由 Codec 决定,如:
// - JSON Codec: "application/json"
// - Protobuf Codec: "application/protobuf"
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#datacontenttype
DataContentType EventDataContentType `` /* 147-byte string literal not displayed */
// 数据模式 (Schema URL),指向数据的 schema 定义
// 可选字段
// 例如: "https://acme.com/schemas/user-created.json"
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#dataschema
DataSchema string `protobuf:"bytes,6,opt,name=data_schema,json=dataSchema,proto3" json:"data_schema,omitempty"`
// 主题,标识事件相关的资源
// 由 is_subject 标记的字段提取
// 例如: "user.123", "order.456"
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject
Subject string `protobuf:"bytes,7,opt,name=subject,proto3" json:"subject,omitempty"`
// 事件发生时间
// 由 SDK 在发送时自动填充
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#time
Time *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=time,proto3" json:"time,omitempty"`
// 扩展属性 (可选)
// 用于添加自定义元数据,如 trace_id, tenant_id
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#extension-context-attributes
Extensions map[string]*CloudEvent_AttributeValue `` /* 147-byte string literal not displayed */
// 事件数据负载
// 由 Codec 编码后的字节数据
// JSON Codec: UTF-8 编码的 JSON 字符串
// Protobuf Codec: protobuf 序列化后的字节
// 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#data
Data []byte `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
CloudEvent 消息结构 符合 CloudEvents 1.0.2 规范 参考: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md Protobuf 格式: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md
func (*CloudEvent) Descriptor
deprecated
func (*CloudEvent) Descriptor() ([]byte, []int)
Deprecated: Use CloudEvent.ProtoReflect.Descriptor instead.
func (*CloudEvent) GetData ¶
func (x *CloudEvent) GetData() []byte
func (*CloudEvent) GetDataContentType ¶
func (x *CloudEvent) GetDataContentType() EventDataContentType
func (*CloudEvent) GetDataSchema ¶
func (x *CloudEvent) GetDataSchema() string
func (*CloudEvent) GetExtensions ¶
func (x *CloudEvent) GetExtensions() map[string]*CloudEvent_AttributeValue
func (*CloudEvent) GetId ¶
func (x *CloudEvent) GetId() string
func (*CloudEvent) GetSource ¶
func (x *CloudEvent) GetSource() string
func (*CloudEvent) GetSpecVersion ¶
func (x *CloudEvent) GetSpecVersion() string
func (*CloudEvent) GetSubject ¶
func (x *CloudEvent) GetSubject() string
func (*CloudEvent) GetTime ¶
func (x *CloudEvent) GetTime() *timestamppb.Timestamp
func (*CloudEvent) GetType ¶
func (x *CloudEvent) GetType() string
func (*CloudEvent) ProtoMessage ¶
func (*CloudEvent) ProtoMessage()
func (*CloudEvent) ProtoReflect ¶
func (x *CloudEvent) ProtoReflect() protoreflect.Message
func (*CloudEvent) Reset ¶
func (x *CloudEvent) Reset()
func (*CloudEvent) String ¶
func (x *CloudEvent) String() string
type CloudEvent_AttributeValue ¶
type CloudEvent_AttributeValue struct {
// Types that are valid to be assigned to Attr:
//
// *CloudEvent_AttributeValue_Boolean
// *CloudEvent_AttributeValue_Integer
// *CloudEvent_AttributeValue_String_
// *CloudEvent_AttributeValue_Bytes
// *CloudEvent_AttributeValue_Uri
// *CloudEvent_AttributeValue_UriRef
// *CloudEvent_AttributeValue_Timestamp
Attr isCloudEvent_AttributeValue_Attr `protobuf_oneof:"attr"`
// contains filtered or unexported fields
}
扩展属性值类型 支持多种数据类型
func (*CloudEvent_AttributeValue) Descriptor
deprecated
func (*CloudEvent_AttributeValue) Descriptor() ([]byte, []int)
Deprecated: Use CloudEvent_AttributeValue.ProtoReflect.Descriptor instead.
func (*CloudEvent_AttributeValue) GetAttr ¶
func (x *CloudEvent_AttributeValue) GetAttr() isCloudEvent_AttributeValue_Attr
func (*CloudEvent_AttributeValue) GetBoolean ¶
func (x *CloudEvent_AttributeValue) GetBoolean() bool
func (*CloudEvent_AttributeValue) GetBytes ¶
func (x *CloudEvent_AttributeValue) GetBytes() []byte
func (*CloudEvent_AttributeValue) GetInteger ¶
func (x *CloudEvent_AttributeValue) GetInteger() int32
func (*CloudEvent_AttributeValue) GetString_ ¶
func (x *CloudEvent_AttributeValue) GetString_() string
func (*CloudEvent_AttributeValue) GetTimestamp ¶
func (x *CloudEvent_AttributeValue) GetTimestamp() *timestamppb.Timestamp
func (*CloudEvent_AttributeValue) GetUri ¶
func (x *CloudEvent_AttributeValue) GetUri() string
func (*CloudEvent_AttributeValue) GetUriRef ¶
func (x *CloudEvent_AttributeValue) GetUriRef() string
func (*CloudEvent_AttributeValue) ProtoMessage ¶
func (*CloudEvent_AttributeValue) ProtoMessage()
func (*CloudEvent_AttributeValue) ProtoReflect ¶
func (x *CloudEvent_AttributeValue) ProtoReflect() protoreflect.Message
func (*CloudEvent_AttributeValue) Reset ¶
func (x *CloudEvent_AttributeValue) Reset()
func (*CloudEvent_AttributeValue) String ¶
func (x *CloudEvent_AttributeValue) String() string
type CloudEvent_AttributeValue_Boolean ¶
type CloudEvent_AttributeValue_Boolean struct {
// 布尔值
Boolean bool `protobuf:"varint,1,opt,name=boolean,proto3,oneof"`
}
type CloudEvent_AttributeValue_Bytes ¶
type CloudEvent_AttributeValue_Bytes struct {
// 字节数组
Bytes []byte `protobuf:"bytes,4,opt,name=bytes,proto3,oneof"`
}
type CloudEvent_AttributeValue_Integer ¶
type CloudEvent_AttributeValue_Integer struct {
// 32位整数
Integer int32 `protobuf:"varint,2,opt,name=integer,proto3,oneof"`
}
type CloudEvent_AttributeValue_String_ ¶
type CloudEvent_AttributeValue_String_ struct {
// 字符串
String_ string `protobuf:"bytes,3,opt,name=string,proto3,oneof"`
}
type CloudEvent_AttributeValue_Timestamp ¶
type CloudEvent_AttributeValue_Timestamp struct {
// 时间戳
Timestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=timestamp,proto3,oneof"`
}
type CloudEvent_AttributeValue_Uri ¶
type CloudEvent_AttributeValue_Uri struct {
// URI
Uri string `protobuf:"bytes,5,opt,name=uri,proto3,oneof"`
}
type CloudEvent_AttributeValue_UriRef ¶
type CloudEvent_AttributeValue_UriRef struct {
// URI Reference
UriRef string `protobuf:"bytes,6,opt,name=uri_ref,json=uriRef,proto3,oneof"`
}
type ColumnType ¶ added in v0.0.2
type ColumnType int32
const ( ColumnType_COLUMN_TYPE_UNSPECIFIED ColumnType = 0 ColumnType_COLUMN_TYPE_VARCHAR ColumnType = 1 ColumnType_COLUMN_TYPE_BIGINT ColumnType = 2 ColumnType_COLUMN_TYPE_TIMESTAMP ColumnType = 3 ColumnType_COLUMN_TYPE_DECIMAL ColumnType = 4 ColumnType_COLUMN_TYPE_BOOLEAN ColumnType = 5 ColumnType_COLUMN_TYPE_JSON ColumnType = 6 ColumnType_COLUMN_TYPE_DOUBLE ColumnType = 7 )
func (ColumnType) Descriptor ¶ added in v0.0.2
func (ColumnType) Descriptor() protoreflect.EnumDescriptor
func (ColumnType) Enum ¶ added in v0.0.2
func (x ColumnType) Enum() *ColumnType
func (ColumnType) EnumDescriptor
deprecated
added in
v0.0.2
func (ColumnType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ColumnType.Descriptor instead.
func (ColumnType) Number ¶ added in v0.0.2
func (x ColumnType) Number() protoreflect.EnumNumber
func (ColumnType) String ¶ added in v0.0.2
func (x ColumnType) String() string
func (ColumnType) Type ¶ added in v0.0.2
func (ColumnType) Type() protoreflect.EnumType
type EventDataContentType ¶ added in v0.0.2
type EventDataContentType int32
事件数据编码格式,编译时确定
const ( EventDataContentType_CONTENT_TYPE_UNSPECIFIED EventDataContentType = 0 EventDataContentType_CONTENT_TYPE_JSON EventDataContentType = 1 EventDataContentType_CONTENT_TYPE_PROTOBUF EventDataContentType = 2 EventDataContentType_CONTENT_TYPE_AVRO EventDataContentType = 3 )
func (EventDataContentType) Descriptor ¶ added in v0.0.2
func (EventDataContentType) Descriptor() protoreflect.EnumDescriptor
func (EventDataContentType) Enum ¶ added in v0.0.2
func (x EventDataContentType) Enum() *EventDataContentType
func (EventDataContentType) EnumDescriptor
deprecated
added in
v0.0.2
func (EventDataContentType) EnumDescriptor() ([]byte, []int)
Deprecated: Use EventDataContentType.Descriptor instead.
func (EventDataContentType) Number ¶ added in v0.0.2
func (x EventDataContentType) Number() protoreflect.EnumNumber
func (EventDataContentType) String ¶ added in v0.0.2
func (x EventDataContentType) String() string
func (EventDataContentType) Type ¶ added in v0.0.2
func (EventDataContentType) Type() protoreflect.EnumType
type FieldMapping ¶ added in v0.0.2
type FieldMapping struct {
// 源字段路径
//
// Types that are valid to be assigned to Source:
//
// *FieldMapping_HeaderPath
// *FieldMapping_DataPath
Source isFieldMapping_Source `protobuf_oneof:"source"`
// 目标列名
TargetColumn string `protobuf:"bytes,3,opt,name=target_column,json=targetColumn,proto3" json:"target_column,omitempty"`
// 目标列类型
Type ColumnType `protobuf:"varint,4,opt,name=type,proto3,enum=eventapi.v1.ColumnType" json:"type,omitempty"`
// 是否 NOT NULL
NotNull bool `protobuf:"varint,5,opt,name=not_null,json=notNull,proto3" json:"not_null,omitempty"`
// 列注释
Comment string `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"`
// 是否忽略该字段(不落盘)
// 仅在 auto_map: true 时有效,用于屏蔽敏感字段
Ignore bool `protobuf:"varint,7,opt,name=ignore,proto3" json:"ignore,omitempty"`
// contains filtered or unexported fields
}
func (*FieldMapping) Descriptor
deprecated
added in
v0.0.2
func (*FieldMapping) Descriptor() ([]byte, []int)
Deprecated: Use FieldMapping.ProtoReflect.Descriptor instead.
func (*FieldMapping) GetComment ¶ added in v0.0.2
func (x *FieldMapping) GetComment() string
func (*FieldMapping) GetDataPath ¶ added in v0.0.2
func (x *FieldMapping) GetDataPath() string
func (*FieldMapping) GetHeaderPath ¶ added in v0.0.2
func (x *FieldMapping) GetHeaderPath() string
func (*FieldMapping) GetIgnore ¶ added in v0.0.2
func (x *FieldMapping) GetIgnore() bool
func (*FieldMapping) GetNotNull ¶ added in v0.0.2
func (x *FieldMapping) GetNotNull() bool
func (*FieldMapping) GetSource ¶ added in v0.0.2
func (x *FieldMapping) GetSource() isFieldMapping_Source
func (*FieldMapping) GetTargetColumn ¶ added in v0.0.2
func (x *FieldMapping) GetTargetColumn() string
func (*FieldMapping) GetType ¶ added in v0.0.2
func (x *FieldMapping) GetType() ColumnType
func (*FieldMapping) ProtoMessage ¶ added in v0.0.2
func (*FieldMapping) ProtoMessage()
func (*FieldMapping) ProtoReflect ¶ added in v0.0.2
func (x *FieldMapping) ProtoReflect() protoreflect.Message
func (*FieldMapping) Reset ¶ added in v0.0.2
func (x *FieldMapping) Reset()
func (*FieldMapping) String ¶ added in v0.0.2
func (x *FieldMapping) String() string
type FieldMapping_DataPath ¶ added in v0.0.2
type FieldMapping_DataPath struct {
// 数据路径: "$.user_id", "$.order.amount"
// 解析方式由 event_data_content_type 决定
DataPath string `protobuf:"bytes,2,opt,name=data_path,json=dataPath,proto3,oneof"`
}
type FieldMapping_HeaderPath ¶ added in v0.0.2
type FieldMapping_HeaderPath struct {
// 元数据路径: "ce_id", "ce_source", "ce_time"
// 嵌套 JSON 提取: "$.ce_source.tenant"
HeaderPath string `protobuf:"bytes,1,opt,name=header_path,json=headerPath,proto3,oneof"`
}
type OperationRule ¶
type OperationRule struct {
// 操作动作: send 或 receive
Action OperationRule_ActionType `protobuf:"varint,1,opt,name=action,proto3,enum=eventapi.v1.OperationRule_ActionType" json:"action,omitempty"`
// 通道配置,包含地址、描述和协议绑定
Channel *OperationRule_Channel `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"`
// contains filtered or unexported fields
}
Method 级别:通道与操作配置 对应 Channel Item Object
func (*OperationRule) Descriptor
deprecated
func (*OperationRule) Descriptor() ([]byte, []int)
Deprecated: Use OperationRule.ProtoReflect.Descriptor instead.
func (*OperationRule) GetAction ¶
func (x *OperationRule) GetAction() OperationRule_ActionType
func (*OperationRule) GetChannel ¶
func (x *OperationRule) GetChannel() *OperationRule_Channel
func (*OperationRule) ProtoMessage ¶
func (*OperationRule) ProtoMessage()
func (*OperationRule) ProtoReflect ¶
func (x *OperationRule) ProtoReflect() protoreflect.Message
func (*OperationRule) Reset ¶
func (x *OperationRule) Reset()
func (*OperationRule) String ¶
func (x *OperationRule) String() string
type OperationRule_ActionType ¶
type OperationRule_ActionType int32
操作动作枚举
const ( OperationRule_UNSPECIFIED OperationRule_ActionType = 0 OperationRule_SEND OperationRule_ActionType = 1 OperationRule_RECEIVE OperationRule_ActionType = 2 )
func (OperationRule_ActionType) Descriptor ¶
func (OperationRule_ActionType) Descriptor() protoreflect.EnumDescriptor
func (OperationRule_ActionType) Enum ¶
func (x OperationRule_ActionType) Enum() *OperationRule_ActionType
func (OperationRule_ActionType) EnumDescriptor
deprecated
func (OperationRule_ActionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use OperationRule_ActionType.Descriptor instead.
func (OperationRule_ActionType) Number ¶
func (x OperationRule_ActionType) Number() protoreflect.EnumNumber
func (OperationRule_ActionType) String ¶
func (x OperationRule_ActionType) String() string
func (OperationRule_ActionType) Type ¶
func (OperationRule_ActionType) Type() protoreflect.EnumType
type OperationRule_Channel ¶
type OperationRule_Channel struct {
// 通道地址,即 Topic 或 Queue 名称
// 例如: "user.events", "order.created"
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
// 通道描述,用于文档生成
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// 协议特定的绑定配置
// 参考: https://github.com/asyncapi/bindings
Binding *OperationRule_Channel_Binding `protobuf:"bytes,3,opt,name=binding,proto3" json:"binding,omitempty"`
// contains filtered or unexported fields
}
Channel 通道定义 参考: https://www.asyncapi.com/docs/reference/specification/latest#channelItemObject
func (*OperationRule_Channel) Descriptor
deprecated
func (*OperationRule_Channel) Descriptor() ([]byte, []int)
Deprecated: Use OperationRule_Channel.ProtoReflect.Descriptor instead.
func (*OperationRule_Channel) GetAddress ¶
func (x *OperationRule_Channel) GetAddress() string
func (*OperationRule_Channel) GetBinding ¶
func (x *OperationRule_Channel) GetBinding() *OperationRule_Channel_Binding
func (*OperationRule_Channel) GetDescription ¶
func (x *OperationRule_Channel) GetDescription() string
func (*OperationRule_Channel) ProtoMessage ¶
func (*OperationRule_Channel) ProtoMessage()
func (*OperationRule_Channel) ProtoReflect ¶
func (x *OperationRule_Channel) ProtoReflect() protoreflect.Message
func (*OperationRule_Channel) Reset ¶
func (x *OperationRule_Channel) Reset()
func (*OperationRule_Channel) String ¶
func (x *OperationRule_Channel) String() string
type OperationRule_Channel_Binding ¶
type OperationRule_Channel_Binding struct {
// Kafka 协议绑定
// 参考: https://github.com/asyncapi/bindings/tree/master/kafka
Kafka *OperationRule_Channel_Binding_Kafka `protobuf:"bytes,1,opt,name=kafka,proto3" json:"kafka,omitempty"`
// AMQP 协议绑定
// 参考: https://github.com/asyncapi/bindings/tree/master/amqp
Amqp *OperationRule_Channel_Binding_Amqp `protobuf:"bytes,2,opt,name=amqp,proto3" json:"amqp,omitempty"`
// MQTT 协议绑定
// 参考: https://github.com/asyncapi/bindings/tree/master/mqtt
Mqtt *OperationRule_Channel_Binding_Mqtt `protobuf:"bytes,3,opt,name=mqtt,proto3" json:"mqtt,omitempty"`
// NATS 协议绑定
// 参考: https://github.com/asyncapi/bindings/tree/master/nats
Nats *OperationRule_Channel_Binding_Nats `protobuf:"bytes,4,opt,name=nats,proto3" json:"nats,omitempty"`
// RocketMQ 协议绑定
// 参考: https://github.com/asyncapi/bindings/tree/master/rocketmq
Rocketmq *OperationRule_Channel_Binding_Rocketmq `protobuf:"bytes,5,opt,name=rocketmq,proto3" json:"rocketmq,omitempty"`
// contains filtered or unexported fields
}
协议绑定配置 包含 Kafka, AMQP, MQTT 等协议的特定配置
func (*OperationRule_Channel_Binding) Descriptor
deprecated
func (*OperationRule_Channel_Binding) Descriptor() ([]byte, []int)
Deprecated: Use OperationRule_Channel_Binding.ProtoReflect.Descriptor instead.
func (*OperationRule_Channel_Binding) GetAmqp ¶
func (x *OperationRule_Channel_Binding) GetAmqp() *OperationRule_Channel_Binding_Amqp
func (*OperationRule_Channel_Binding) GetKafka ¶
func (x *OperationRule_Channel_Binding) GetKafka() *OperationRule_Channel_Binding_Kafka
func (*OperationRule_Channel_Binding) GetMqtt ¶
func (x *OperationRule_Channel_Binding) GetMqtt() *OperationRule_Channel_Binding_Mqtt
func (*OperationRule_Channel_Binding) GetNats ¶
func (x *OperationRule_Channel_Binding) GetNats() *OperationRule_Channel_Binding_Nats
func (*OperationRule_Channel_Binding) GetRocketmq ¶
func (x *OperationRule_Channel_Binding) GetRocketmq() *OperationRule_Channel_Binding_Rocketmq
func (*OperationRule_Channel_Binding) ProtoMessage ¶
func (*OperationRule_Channel_Binding) ProtoMessage()
func (*OperationRule_Channel_Binding) ProtoReflect ¶
func (x *OperationRule_Channel_Binding) ProtoReflect() protoreflect.Message
func (*OperationRule_Channel_Binding) Reset ¶
func (x *OperationRule_Channel_Binding) Reset()
func (*OperationRule_Channel_Binding) String ¶
func (x *OperationRule_Channel_Binding) String() string
type OperationRule_Channel_Binding_Amqp ¶
type OperationRule_Channel_Binding_Amqp struct {
// Exchange 名称
// 参考: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges
Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"`
// Routing Key 模式
// 参考: https://www.rabbitmq.com/tutorials/amqp-concepts.html#bindings
RoutingKey string `protobuf:"bytes,2,opt,name=routing_key,json=routingKey,proto3" json:"routing_key,omitempty"`
// contains filtered or unexported fields
}
AMQP 绑定配置
func (*OperationRule_Channel_Binding_Amqp) Descriptor
deprecated
func (*OperationRule_Channel_Binding_Amqp) Descriptor() ([]byte, []int)
Deprecated: Use OperationRule_Channel_Binding_Amqp.ProtoReflect.Descriptor instead.
func (*OperationRule_Channel_Binding_Amqp) GetExchange ¶
func (x *OperationRule_Channel_Binding_Amqp) GetExchange() string
func (*OperationRule_Channel_Binding_Amqp) GetRoutingKey ¶
func (x *OperationRule_Channel_Binding_Amqp) GetRoutingKey() string
func (*OperationRule_Channel_Binding_Amqp) ProtoMessage ¶
func (*OperationRule_Channel_Binding_Amqp) ProtoMessage()
func (*OperationRule_Channel_Binding_Amqp) ProtoReflect ¶
func (x *OperationRule_Channel_Binding_Amqp) ProtoReflect() protoreflect.Message
func (*OperationRule_Channel_Binding_Amqp) Reset ¶
func (x *OperationRule_Channel_Binding_Amqp) Reset()
func (*OperationRule_Channel_Binding_Amqp) String ¶
func (x *OperationRule_Channel_Binding_Amqp) String() string
type OperationRule_Channel_Binding_Kafka ¶
type OperationRule_Channel_Binding_Kafka struct {
// 消息 Key,用于分区路由
// 例如: "user_id" 表示按用户 ID 路由到不同分区
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// 指定分区号 (可选)
// 如果不指定,使用默认分区策略
Partition int32 `protobuf:"varint,2,opt,name=partition,proto3" json:"partition,omitempty"`
// contains filtered or unexported fields
}
Kafka 绑定配置
func (*OperationRule_Channel_Binding_Kafka) Descriptor
deprecated
func (*OperationRule_Channel_Binding_Kafka) Descriptor() ([]byte, []int)
Deprecated: Use OperationRule_Channel_Binding_Kafka.ProtoReflect.Descriptor instead.
func (*OperationRule_Channel_Binding_Kafka) GetKey ¶
func (x *OperationRule_Channel_Binding_Kafka) GetKey() string
func (*OperationRule_Channel_Binding_Kafka) GetPartition ¶
func (x *OperationRule_Channel_Binding_Kafka) GetPartition() int32
func (*OperationRule_Channel_Binding_Kafka) ProtoMessage ¶
func (*OperationRule_Channel_Binding_Kafka) ProtoMessage()
func (*OperationRule_Channel_Binding_Kafka) ProtoReflect ¶
func (x *OperationRule_Channel_Binding_Kafka) ProtoReflect() protoreflect.Message
func (*OperationRule_Channel_Binding_Kafka) Reset ¶
func (x *OperationRule_Channel_Binding_Kafka) Reset()
func (*OperationRule_Channel_Binding_Kafka) String ¶
func (x *OperationRule_Channel_Binding_Kafka) String() string
type OperationRule_Channel_Binding_Mqtt ¶
type OperationRule_Channel_Binding_Mqtt struct {
// QoS 等级 (0, 1, 2)
// 0: 最多一次 (At most once)
// 1: 至少一次 (At least once)
// 2: 恰好一次 (Exactly once)
// 参考: https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901234
Qos int32 `protobuf:"varint,1,opt,name=qos,proto3" json:"qos,omitempty"`
// 是否保留消息
// true: Broker 会保留最后一条消息,新订阅者立即收到
// false: 普通消息,不保留
Retain bool `protobuf:"varint,2,opt,name=retain,proto3" json:"retain,omitempty"`
// contains filtered or unexported fields
}
MQTT 绑定配置
func (*OperationRule_Channel_Binding_Mqtt) Descriptor
deprecated
func (*OperationRule_Channel_Binding_Mqtt) Descriptor() ([]byte, []int)
Deprecated: Use OperationRule_Channel_Binding_Mqtt.ProtoReflect.Descriptor instead.
func (*OperationRule_Channel_Binding_Mqtt) GetQos ¶
func (x *OperationRule_Channel_Binding_Mqtt) GetQos() int32
func (*OperationRule_Channel_Binding_Mqtt) GetRetain ¶
func (x *OperationRule_Channel_Binding_Mqtt) GetRetain() bool
func (*OperationRule_Channel_Binding_Mqtt) ProtoMessage ¶
func (*OperationRule_Channel_Binding_Mqtt) ProtoMessage()
func (*OperationRule_Channel_Binding_Mqtt) ProtoReflect ¶
func (x *OperationRule_Channel_Binding_Mqtt) ProtoReflect() protoreflect.Message
func (*OperationRule_Channel_Binding_Mqtt) Reset ¶
func (x *OperationRule_Channel_Binding_Mqtt) Reset()
func (*OperationRule_Channel_Binding_Mqtt) String ¶
func (x *OperationRule_Channel_Binding_Mqtt) String() string
type OperationRule_Channel_Binding_Nats ¶
type OperationRule_Channel_Binding_Nats struct {
// contains filtered or unexported fields
}
NATS 绑定配置 (占位)
func (*OperationRule_Channel_Binding_Nats) Descriptor
deprecated
func (*OperationRule_Channel_Binding_Nats) Descriptor() ([]byte, []int)
Deprecated: Use OperationRule_Channel_Binding_Nats.ProtoReflect.Descriptor instead.
func (*OperationRule_Channel_Binding_Nats) ProtoMessage ¶
func (*OperationRule_Channel_Binding_Nats) ProtoMessage()
func (*OperationRule_Channel_Binding_Nats) ProtoReflect ¶
func (x *OperationRule_Channel_Binding_Nats) ProtoReflect() protoreflect.Message
func (*OperationRule_Channel_Binding_Nats) Reset ¶
func (x *OperationRule_Channel_Binding_Nats) Reset()
func (*OperationRule_Channel_Binding_Nats) String ¶
func (x *OperationRule_Channel_Binding_Nats) String() string
type OperationRule_Channel_Binding_Rocketmq ¶
type OperationRule_Channel_Binding_Rocketmq struct {
// 消息 Tag,用于消息过滤
// 例如: "ORDER_STATUS_CHANGE"
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
// 消息 Key,用于消息查询和去重
// 例如: 订单ID、用户ID
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// 消息类型
MessageType OperationRule_Channel_Binding_Rocketmq_MessageType `` /* 163-byte string literal not displayed */
// 延时消息级别(仅当 message_type = DELAY 时有效)
// 阿里云 RocketMQ 延时级别:
// 1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h
DelayLevel int32 `protobuf:"varint,4,opt,name=delay_level,json=delayLevel,proto3" json:"delay_level,omitempty"`
// contains filtered or unexported fields
}
RocketMQ 绑定配置 支持阿里云 RocketMQ 和开源 RocketMQ
func (*OperationRule_Channel_Binding_Rocketmq) Descriptor
deprecated
func (*OperationRule_Channel_Binding_Rocketmq) Descriptor() ([]byte, []int)
Deprecated: Use OperationRule_Channel_Binding_Rocketmq.ProtoReflect.Descriptor instead.
func (*OperationRule_Channel_Binding_Rocketmq) GetDelayLevel ¶
func (x *OperationRule_Channel_Binding_Rocketmq) GetDelayLevel() int32
func (*OperationRule_Channel_Binding_Rocketmq) GetKey ¶
func (x *OperationRule_Channel_Binding_Rocketmq) GetKey() string
func (*OperationRule_Channel_Binding_Rocketmq) GetMessageType ¶
func (x *OperationRule_Channel_Binding_Rocketmq) GetMessageType() OperationRule_Channel_Binding_Rocketmq_MessageType
func (*OperationRule_Channel_Binding_Rocketmq) GetTag ¶
func (x *OperationRule_Channel_Binding_Rocketmq) GetTag() string
func (*OperationRule_Channel_Binding_Rocketmq) ProtoMessage ¶
func (*OperationRule_Channel_Binding_Rocketmq) ProtoMessage()
func (*OperationRule_Channel_Binding_Rocketmq) ProtoReflect ¶
func (x *OperationRule_Channel_Binding_Rocketmq) ProtoReflect() protoreflect.Message
func (*OperationRule_Channel_Binding_Rocketmq) Reset ¶
func (x *OperationRule_Channel_Binding_Rocketmq) Reset()
func (*OperationRule_Channel_Binding_Rocketmq) String ¶
func (x *OperationRule_Channel_Binding_Rocketmq) String() string
type OperationRule_Channel_Binding_Rocketmq_MessageType ¶
type OperationRule_Channel_Binding_Rocketmq_MessageType int32
消息类型枚举
const ( // 普通消息 OperationRule_Channel_Binding_Rocketmq_NORMAL OperationRule_Channel_Binding_Rocketmq_MessageType = 0 // 顺序消息(分区有序) OperationRule_Channel_Binding_Rocketmq_ORDER OperationRule_Channel_Binding_Rocketmq_MessageType = 1 // 事务消息 OperationRule_Channel_Binding_Rocketmq_TRANSACTION OperationRule_Channel_Binding_Rocketmq_MessageType = 2 // 延时消息 OperationRule_Channel_Binding_Rocketmq_DELAY OperationRule_Channel_Binding_Rocketmq_MessageType = 3 )
func (OperationRule_Channel_Binding_Rocketmq_MessageType) Descriptor ¶
func (OperationRule_Channel_Binding_Rocketmq_MessageType) Descriptor() protoreflect.EnumDescriptor
func (OperationRule_Channel_Binding_Rocketmq_MessageType) EnumDescriptor
deprecated
func (OperationRule_Channel_Binding_Rocketmq_MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use OperationRule_Channel_Binding_Rocketmq_MessageType.Descriptor instead.
func (OperationRule_Channel_Binding_Rocketmq_MessageType) Number ¶
func (x OperationRule_Channel_Binding_Rocketmq_MessageType) Number() protoreflect.EnumNumber
func (OperationRule_Channel_Binding_Rocketmq_MessageType) String ¶
func (x OperationRule_Channel_Binding_Rocketmq_MessageType) String() string
type Protocol ¶
type Protocol struct {
// 协议名称,如: kafka, amqp, mqtt, nats, rocketmq
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// 协议版本,如: "3.5.0" (Kafka), "0.9.1" (AMQP)
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// contains filtered or unexported fields
}
协议定义
func (*Protocol) Descriptor
deprecated
func (*Protocol) GetVersion ¶
func (*Protocol) ProtoMessage ¶
func (*Protocol) ProtoMessage()
func (*Protocol) ProtoReflect ¶
func (x *Protocol) ProtoReflect() protoreflect.Message
type SinkConfig ¶ added in v0.0.2
type SinkConfig struct {
// Flink checkpoint 间隔(如 "60s")
CheckpointInterval string `protobuf:"bytes,1,opt,name=checkpoint_interval,json=checkpointInterval,proto3" json:"checkpoint_interval,omitempty"`
// 批量大小
BatchSize int32 `protobuf:"varint,2,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"`
// Sink 并行度
Parallelism int32 `protobuf:"varint,3,opt,name=parallelism,proto3" json:"parallelism,omitempty"`
// 额外属性
Properties map[string]string `` /* 147-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*SinkConfig) Descriptor
deprecated
added in
v0.0.2
func (*SinkConfig) Descriptor() ([]byte, []int)
Deprecated: Use SinkConfig.ProtoReflect.Descriptor instead.
func (*SinkConfig) GetBatchSize ¶ added in v0.0.2
func (x *SinkConfig) GetBatchSize() int32
func (*SinkConfig) GetCheckpointInterval ¶ added in v0.0.2
func (x *SinkConfig) GetCheckpointInterval() string
func (*SinkConfig) GetParallelism ¶ added in v0.0.2
func (x *SinkConfig) GetParallelism() int32
func (*SinkConfig) GetProperties ¶ added in v0.0.2
func (x *SinkConfig) GetProperties() map[string]string
func (*SinkConfig) ProtoMessage ¶ added in v0.0.2
func (*SinkConfig) ProtoMessage()
func (*SinkConfig) ProtoReflect ¶ added in v0.0.2
func (x *SinkConfig) ProtoReflect() protoreflect.Message
func (*SinkConfig) Reset ¶ added in v0.0.2
func (x *SinkConfig) Reset()
func (*SinkConfig) String ¶ added in v0.0.2
func (x *SinkConfig) String() string
type SinkRule ¶ added in v0.0.2
type SinkRule struct {
// 目标系统类型
Target SinkType `protobuf:"varint,1,opt,name=target,proto3,enum=eventapi.v1.SinkType" json:"target,omitempty"`
// 目标数据库名
Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
// 目标表名
Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"`
// 主键列
PrimaryKey []string `protobuf:"bytes,4,rep,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"`
// 分区列
PartitionKey []string `protobuf:"bytes,5,rep,name=partition_key,json=partitionKey,proto3" json:"partition_key,omitempty"`
// 字段映射
Mapping []*FieldMapping `protobuf:"bytes,6,rep,name=mapping,proto3" json:"mapping,omitempty"`
// Sink 特定配置
Config *SinkConfig `protobuf:"bytes,7,opt,name=config,proto3" json:"config,omitempty"`
// 源 Topic 名称(可选,通常从事件定义推断)
SourceTopic string `protobuf:"bytes,8,opt,name=source_topic,json=sourceTopic,proto3" json:"source_topic,omitempty"`
// 事件数据编码格式,编译时确定
// 用于 Sink 生成器决定如何解析 data 字段
EventDataContentType EventDataContentType `` /* 164-byte string literal not displayed */
// 是否自动推断 data_path 映射,默认开启
// 关闭后必须手动写全所有 mapping
AutoInferDataMapping *bool `` /* 133-byte string literal not displayed */
// 是否自动映射所有字段,默认关闭
// 开启后自动将所有 Header/Data 字段映射到同名列
// 可通过 mapping 中的 ignore: true 排除特定字段
AutoMap bool `protobuf:"varint,11,opt,name=auto_map,json=autoMap,proto3" json:"auto_map,omitempty"`
// contains filtered or unexported fields
}
Method 级别:Sink 目标配置
func (*SinkRule) Descriptor
deprecated
added in
v0.0.2
func (*SinkRule) GetAutoInferDataMapping ¶ added in v0.0.2
func (*SinkRule) GetAutoMap ¶ added in v0.0.2
func (*SinkRule) GetConfig ¶ added in v0.0.2
func (x *SinkRule) GetConfig() *SinkConfig
func (*SinkRule) GetDatabase ¶ added in v0.0.2
func (*SinkRule) GetEventDataContentType ¶ added in v0.0.2
func (x *SinkRule) GetEventDataContentType() EventDataContentType
func (*SinkRule) GetMapping ¶ added in v0.0.2
func (x *SinkRule) GetMapping() []*FieldMapping
func (*SinkRule) GetPartitionKey ¶ added in v0.0.2
func (*SinkRule) GetPrimaryKey ¶ added in v0.0.2
func (*SinkRule) GetSourceTopic ¶ added in v0.0.2
func (*SinkRule) ProtoMessage ¶ added in v0.0.2
func (*SinkRule) ProtoMessage()
func (*SinkRule) ProtoReflect ¶ added in v0.0.2
func (x *SinkRule) ProtoReflect() protoreflect.Message
type SinkType ¶ added in v0.0.2
type SinkType int32
func (SinkType) Descriptor ¶ added in v0.0.2
func (SinkType) Descriptor() protoreflect.EnumDescriptor
func (SinkType) EnumDescriptor
deprecated
added in
v0.0.2
func (SinkType) Number ¶ added in v0.0.2
func (x SinkType) Number() protoreflect.EnumNumber
func (SinkType) Type ¶ added in v0.0.2
func (SinkType) Type() protoreflect.EnumType