diff --git a/Makefile b/Makefile index 78462f8f..91c8a993 100644 --- a/Makefile +++ b/Makefile @@ -16,4 +16,9 @@ proto: generate: go generate ./... +.PHONY: image-push-all +image-push-all: + for dir in $(shell find ./pkg -name 'Makefile' -exec dirname {} \;); do \ + $(MAKE) -C $$dir image-push TAG=$(TAG); \ + done diff --git a/pkg/apis/proto/map/v1/map.pb.go b/pkg/apis/proto/map/v1/map.pb.go index 29d0b37d..7d615a9b 100644 --- a/pkg/apis/proto/map/v1/map.pb.go +++ b/pkg/apis/proto/map/v1/map.pb.go @@ -33,6 +33,7 @@ type MapRequest struct { Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` EventTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` Watermark *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=watermark,proto3" json:"watermark,omitempty"` + Headers map[string]string `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *MapRequest) Reset() { @@ -95,6 +96,13 @@ func (x *MapRequest) GetWatermark() *timestamppb.Timestamp { return nil } +func (x *MapRequest) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + // * // MapResponse represents a response element. type MapResponse struct { @@ -206,7 +214,7 @@ type MapResponse_Result struct { func (x *MapResponse_Result) Reset() { *x = MapResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_map_v1_map_proto_msgTypes[3] + mi := &file_pkg_apis_proto_map_v1_map_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -219,7 +227,7 @@ func (x *MapResponse_Result) String() string { func (*MapResponse_Result) ProtoMessage() {} func (x *MapResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_map_v1_map_proto_msgTypes[3] + mi := &file_pkg_apis_proto_map_v1_map_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -265,7 +273,7 @@ var file_pkg_apis_proto_map_v1_map_proto_rawDesc = []byte{ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x0a, 0x4d, 0x61, 0x70, 0x52, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x02, 0x0a, 0x0a, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, @@ -276,29 +284,37 @@ var file_pkg_apis_proto_map_v1_map_proto_rawDesc = []byte{ 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x77, 0x61, 0x74, 0x65, - 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0x8b, 0x01, 0x0a, 0x0b, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x46, 0x0a, 0x06, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x61, 0x67, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, 0x71, 0x0a, 0x03, 0x4d, 0x61, - 0x70, 0x12, 0x30, 0x0a, 0x05, 0x4d, 0x61, 0x70, 0x46, 0x6e, 0x12, 0x12, 0x2e, 0x6d, 0x61, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, - 0x2e, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x37, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, - 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x6d, 0x61, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8b, 0x01, 0x0a, + 0x0b, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x1a, 0x46, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, + 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x32, 0x71, 0x0a, 0x03, 0x4d, 0x61, 0x70, 0x12, 0x30, 0x0a, 0x05, 0x4d, 0x61, 0x70, 0x46, + 0x6e, 0x12, 0x12, 0x2e, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x49, 0x73, + 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, + 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x61, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -313,28 +329,30 @@ func file_pkg_apis_proto_map_v1_map_proto_rawDescGZIP() []byte { return file_pkg_apis_proto_map_v1_map_proto_rawDescData } -var file_pkg_apis_proto_map_v1_map_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_pkg_apis_proto_map_v1_map_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_pkg_apis_proto_map_v1_map_proto_goTypes = []interface{}{ (*MapRequest)(nil), // 0: map.v1.MapRequest (*MapResponse)(nil), // 1: map.v1.MapResponse (*ReadyResponse)(nil), // 2: map.v1.ReadyResponse - (*MapResponse_Result)(nil), // 3: map.v1.MapResponse.Result - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 5: google.protobuf.Empty + nil, // 3: map.v1.MapRequest.HeadersEntry + (*MapResponse_Result)(nil), // 4: map.v1.MapResponse.Result + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 6: google.protobuf.Empty } var file_pkg_apis_proto_map_v1_map_proto_depIdxs = []int32{ - 4, // 0: map.v1.MapRequest.event_time:type_name -> google.protobuf.Timestamp - 4, // 1: map.v1.MapRequest.watermark:type_name -> google.protobuf.Timestamp - 3, // 2: map.v1.MapResponse.results:type_name -> map.v1.MapResponse.Result - 0, // 3: map.v1.Map.MapFn:input_type -> map.v1.MapRequest - 5, // 4: map.v1.Map.IsReady:input_type -> google.protobuf.Empty - 1, // 5: map.v1.Map.MapFn:output_type -> map.v1.MapResponse - 2, // 6: map.v1.Map.IsReady:output_type -> map.v1.ReadyResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 5, // 0: map.v1.MapRequest.event_time:type_name -> google.protobuf.Timestamp + 5, // 1: map.v1.MapRequest.watermark:type_name -> google.protobuf.Timestamp + 3, // 2: map.v1.MapRequest.headers:type_name -> map.v1.MapRequest.HeadersEntry + 4, // 3: map.v1.MapResponse.results:type_name -> map.v1.MapResponse.Result + 0, // 4: map.v1.Map.MapFn:input_type -> map.v1.MapRequest + 6, // 5: map.v1.Map.IsReady:input_type -> google.protobuf.Empty + 1, // 6: map.v1.Map.MapFn:output_type -> map.v1.MapResponse + 2, // 7: map.v1.Map.IsReady:output_type -> map.v1.ReadyResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_pkg_apis_proto_map_v1_map_proto_init() } @@ -379,7 +397,7 @@ func file_pkg_apis_proto_map_v1_map_proto_init() { return nil } } - file_pkg_apis_proto_map_v1_map_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_map_v1_map_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MapResponse_Result); i { case 0: return &v.state @@ -398,7 +416,7 @@ func file_pkg_apis_proto_map_v1_map_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_proto_map_v1_map_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/proto/map/v1/map.proto b/pkg/apis/proto/map/v1/map.proto index 89e5dd85..e93a9b01 100644 --- a/pkg/apis/proto/map/v1/map.proto +++ b/pkg/apis/proto/map/v1/map.proto @@ -23,6 +23,7 @@ message MapRequest { bytes value = 2; google.protobuf.Timestamp event_time = 3; google.protobuf.Timestamp watermark = 4; + map headers = 5; } /** diff --git a/pkg/apis/proto/mapstream/v1/mapstream.pb.go b/pkg/apis/proto/mapstream/v1/mapstream.pb.go index 23112488..2a2f2bd1 100644 --- a/pkg/apis/proto/mapstream/v1/mapstream.pb.go +++ b/pkg/apis/proto/mapstream/v1/mapstream.pb.go @@ -33,6 +33,7 @@ type MapStreamRequest struct { Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` EventTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` Watermark *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=watermark,proto3" json:"watermark,omitempty"` + Headers map[string]string `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *MapStreamRequest) Reset() { @@ -95,6 +96,13 @@ func (x *MapStreamRequest) GetWatermark() *timestamppb.Timestamp { return nil } +func (x *MapStreamRequest) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + // * // MapStreamResponse represents a response element. type MapStreamResponse struct { @@ -206,7 +214,7 @@ type MapStreamResponse_Result struct { func (x *MapStreamResponse_Result) Reset() { *x = MapStreamResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_mapstream_v1_mapstream_proto_msgTypes[3] + mi := &file_pkg_apis_proto_mapstream_v1_mapstream_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -219,7 +227,7 @@ func (x *MapStreamResponse_Result) String() string { func (*MapStreamResponse_Result) ProtoMessage() {} func (x *MapStreamResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_mapstream_v1_mapstream_proto_msgTypes[3] + mi := &file_pkg_apis_proto_mapstream_v1_mapstream_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -266,7 +274,7 @@ var file_pkg_apis_proto_mapstream_v1_mapstream_proto_rawDesc = []byte{ 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x4d, 0x61, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x02, 0x0a, 0x10, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -277,34 +285,42 @@ var file_pkg_apis_proto_mapstream_v1_mapstream_proto_rawDesc = []byte{ 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0x9b, 0x01, - 0x0a, 0x11, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x1a, 0x46, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, - 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, - 0x64, 0x79, 0x32, 0x9d, 0x01, 0x0a, 0x09, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x12, 0x50, 0x0a, 0x0b, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x46, 0x6e, 0x12, - 0x1e, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, - 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x70, 0x52, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x45, 0x0a, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, + 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x46, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, + 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x25, + 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, 0x9d, 0x01, 0x0a, 0x09, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x50, 0x0a, 0x0b, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x46, 0x6e, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -319,28 +335,30 @@ func file_pkg_apis_proto_mapstream_v1_mapstream_proto_rawDescGZIP() []byte { return file_pkg_apis_proto_mapstream_v1_mapstream_proto_rawDescData } -var file_pkg_apis_proto_mapstream_v1_mapstream_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_pkg_apis_proto_mapstream_v1_mapstream_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_pkg_apis_proto_mapstream_v1_mapstream_proto_goTypes = []interface{}{ (*MapStreamRequest)(nil), // 0: mapstream.v1.MapStreamRequest (*MapStreamResponse)(nil), // 1: mapstream.v1.MapStreamResponse (*ReadyResponse)(nil), // 2: mapstream.v1.ReadyResponse - (*MapStreamResponse_Result)(nil), // 3: mapstream.v1.MapStreamResponse.Result - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 5: google.protobuf.Empty + nil, // 3: mapstream.v1.MapStreamRequest.HeadersEntry + (*MapStreamResponse_Result)(nil), // 4: mapstream.v1.MapStreamResponse.Result + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 6: google.protobuf.Empty } var file_pkg_apis_proto_mapstream_v1_mapstream_proto_depIdxs = []int32{ - 4, // 0: mapstream.v1.MapStreamRequest.event_time:type_name -> google.protobuf.Timestamp - 4, // 1: mapstream.v1.MapStreamRequest.watermark:type_name -> google.protobuf.Timestamp - 3, // 2: mapstream.v1.MapStreamResponse.result:type_name -> mapstream.v1.MapStreamResponse.Result - 0, // 3: mapstream.v1.MapStream.MapStreamFn:input_type -> mapstream.v1.MapStreamRequest - 5, // 4: mapstream.v1.MapStream.IsReady:input_type -> google.protobuf.Empty - 1, // 5: mapstream.v1.MapStream.MapStreamFn:output_type -> mapstream.v1.MapStreamResponse - 2, // 6: mapstream.v1.MapStream.IsReady:output_type -> mapstream.v1.ReadyResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 5, // 0: mapstream.v1.MapStreamRequest.event_time:type_name -> google.protobuf.Timestamp + 5, // 1: mapstream.v1.MapStreamRequest.watermark:type_name -> google.protobuf.Timestamp + 3, // 2: mapstream.v1.MapStreamRequest.headers:type_name -> mapstream.v1.MapStreamRequest.HeadersEntry + 4, // 3: mapstream.v1.MapStreamResponse.result:type_name -> mapstream.v1.MapStreamResponse.Result + 0, // 4: mapstream.v1.MapStream.MapStreamFn:input_type -> mapstream.v1.MapStreamRequest + 6, // 5: mapstream.v1.MapStream.IsReady:input_type -> google.protobuf.Empty + 1, // 6: mapstream.v1.MapStream.MapStreamFn:output_type -> mapstream.v1.MapStreamResponse + 2, // 7: mapstream.v1.MapStream.IsReady:output_type -> mapstream.v1.ReadyResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_pkg_apis_proto_mapstream_v1_mapstream_proto_init() } @@ -385,7 +403,7 @@ func file_pkg_apis_proto_mapstream_v1_mapstream_proto_init() { return nil } } - file_pkg_apis_proto_mapstream_v1_mapstream_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_mapstream_v1_mapstream_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MapStreamResponse_Result); i { case 0: return &v.state @@ -404,7 +422,7 @@ func file_pkg_apis_proto_mapstream_v1_mapstream_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_proto_mapstream_v1_mapstream_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/proto/mapstream/v1/mapstream.proto b/pkg/apis/proto/mapstream/v1/mapstream.proto index 5d95ff39..43f85f60 100644 --- a/pkg/apis/proto/mapstream/v1/mapstream.proto +++ b/pkg/apis/proto/mapstream/v1/mapstream.proto @@ -24,6 +24,7 @@ message MapStreamRequest { bytes value = 2; google.protobuf.Timestamp event_time = 3; google.protobuf.Timestamp watermark = 4; + map headers = 5; } /** diff --git a/pkg/apis/proto/reduce/v1/reduce.pb.go b/pkg/apis/proto/reduce/v1/reduce.pb.go index 2f9b365c..5376e90a 100644 --- a/pkg/apis/proto/reduce/v1/reduce.pb.go +++ b/pkg/apis/proto/reduce/v1/reduce.pb.go @@ -376,6 +376,7 @@ type ReduceRequest_Payload struct { Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` EventTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` Watermark *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=watermark,proto3" json:"watermark,omitempty"` + Headers map[string]string `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *ReduceRequest_Payload) Reset() { @@ -438,6 +439,13 @@ func (x *ReduceRequest_Payload) GetWatermark() *timestamppb.Timestamp { return nil } +func (x *ReduceRequest_Payload) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + // Result represents a result element. It contains the result of the reduce function. type ReduceResponse_Result struct { state protoimpl.MessageState @@ -452,7 +460,7 @@ type ReduceResponse_Result struct { func (x *ReduceResponse_Result) Reset() { *x = ReduceResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_reduce_v1_reduce_proto_msgTypes[6] + mi := &file_pkg_apis_proto_reduce_v1_reduce_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -465,7 +473,7 @@ func (x *ReduceResponse_Result) String() string { func (*ReduceResponse_Result) ProtoMessage() {} func (x *ReduceResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_reduce_v1_reduce_proto_msgTypes[6] + mi := &file_pkg_apis_proto_reduce_v1_reduce_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -512,7 +520,7 @@ var file_pkg_apis_proto_reduce_v1_reduce_proto_rawDesc = []byte{ 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xef, 0x03, 0x0a, 0x0d, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x22, 0xf4, 0x04, 0x0a, 0x0d, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, @@ -532,7 +540,7 @@ var file_pkg_apis_proto_reduce_v1_reduce_proto_rawDesc = []byte{ 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x28, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, - 0x50, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x1a, 0xa8, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, + 0x50, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x1a, 0xad, 0x02, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, @@ -543,43 +551,51 @@ var file_pkg_apis_proto_reduce_v1_reduce_proto_rawDesc = []byte{ 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, - 0x72, 0x6b, 0x22, 0x7c, 0x0a, 0x06, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x30, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, - 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, - 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x29, 0x0a, - 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x4f, 0x46, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x45, 0x4f, 0x46, 0x1a, 0x46, 0x0a, 0x06, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, - 0x67, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, 0x8a, 0x01, 0x0a, 0x06, 0x52, 0x65, - 0x64, 0x75, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x46, 0x6e, - 0x12, 0x18, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, - 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x64, - 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3b, 0x0a, 0x07, 0x49, 0x73, 0x52, - 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x72, - 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, - 0x6d, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6b, 0x12, 0x47, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7c, 0x0a, 0x06, 0x57, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x10, 0x0a, + 0x03, 0x45, 0x4f, 0x46, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x45, 0x4f, 0x46, 0x1a, + 0x46, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, 0x8a, + 0x01, 0x0a, 0x06, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x52, 0x65, 0x64, + 0x75, 0x63, 0x65, 0x46, 0x6e, 0x12, 0x18, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x75, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3b, + 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x1a, 0x18, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, + 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, + 0x64, 0x75, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -595,7 +611,7 @@ func file_pkg_apis_proto_reduce_v1_reduce_proto_rawDescGZIP() []byte { } var file_pkg_apis_proto_reduce_v1_reduce_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pkg_apis_proto_reduce_v1_reduce_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_pkg_apis_proto_reduce_v1_reduce_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_pkg_apis_proto_reduce_v1_reduce_proto_goTypes = []interface{}{ (ReduceRequest_WindowOperation_Event)(0), // 0: reduce.v1.ReduceRequest.WindowOperation.Event (*ReduceRequest)(nil), // 1: reduce.v1.ReduceRequest @@ -604,30 +620,32 @@ var file_pkg_apis_proto_reduce_v1_reduce_proto_goTypes = []interface{}{ (*ReadyResponse)(nil), // 4: reduce.v1.ReadyResponse (*ReduceRequest_WindowOperation)(nil), // 5: reduce.v1.ReduceRequest.WindowOperation (*ReduceRequest_Payload)(nil), // 6: reduce.v1.ReduceRequest.Payload - (*ReduceResponse_Result)(nil), // 7: reduce.v1.ReduceResponse.Result - (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 9: google.protobuf.Empty + nil, // 7: reduce.v1.ReduceRequest.Payload.HeadersEntry + (*ReduceResponse_Result)(nil), // 8: reduce.v1.ReduceResponse.Result + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 10: google.protobuf.Empty } var file_pkg_apis_proto_reduce_v1_reduce_proto_depIdxs = []int32{ 6, // 0: reduce.v1.ReduceRequest.payload:type_name -> reduce.v1.ReduceRequest.Payload 5, // 1: reduce.v1.ReduceRequest.operation:type_name -> reduce.v1.ReduceRequest.WindowOperation - 8, // 2: reduce.v1.Window.start:type_name -> google.protobuf.Timestamp - 8, // 3: reduce.v1.Window.end:type_name -> google.protobuf.Timestamp - 7, // 4: reduce.v1.ReduceResponse.result:type_name -> reduce.v1.ReduceResponse.Result + 9, // 2: reduce.v1.Window.start:type_name -> google.protobuf.Timestamp + 9, // 3: reduce.v1.Window.end:type_name -> google.protobuf.Timestamp + 8, // 4: reduce.v1.ReduceResponse.result:type_name -> reduce.v1.ReduceResponse.Result 2, // 5: reduce.v1.ReduceResponse.window:type_name -> reduce.v1.Window 0, // 6: reduce.v1.ReduceRequest.WindowOperation.event:type_name -> reduce.v1.ReduceRequest.WindowOperation.Event 2, // 7: reduce.v1.ReduceRequest.WindowOperation.windows:type_name -> reduce.v1.Window - 8, // 8: reduce.v1.ReduceRequest.Payload.event_time:type_name -> google.protobuf.Timestamp - 8, // 9: reduce.v1.ReduceRequest.Payload.watermark:type_name -> google.protobuf.Timestamp - 1, // 10: reduce.v1.Reduce.ReduceFn:input_type -> reduce.v1.ReduceRequest - 9, // 11: reduce.v1.Reduce.IsReady:input_type -> google.protobuf.Empty - 3, // 12: reduce.v1.Reduce.ReduceFn:output_type -> reduce.v1.ReduceResponse - 4, // 13: reduce.v1.Reduce.IsReady:output_type -> reduce.v1.ReadyResponse - 12, // [12:14] is the sub-list for method output_type - 10, // [10:12] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 9, // 8: reduce.v1.ReduceRequest.Payload.event_time:type_name -> google.protobuf.Timestamp + 9, // 9: reduce.v1.ReduceRequest.Payload.watermark:type_name -> google.protobuf.Timestamp + 7, // 10: reduce.v1.ReduceRequest.Payload.headers:type_name -> reduce.v1.ReduceRequest.Payload.HeadersEntry + 1, // 11: reduce.v1.Reduce.ReduceFn:input_type -> reduce.v1.ReduceRequest + 10, // 12: reduce.v1.Reduce.IsReady:input_type -> google.protobuf.Empty + 3, // 13: reduce.v1.Reduce.ReduceFn:output_type -> reduce.v1.ReduceResponse + 4, // 14: reduce.v1.Reduce.IsReady:output_type -> reduce.v1.ReadyResponse + 13, // [13:15] is the sub-list for method output_type + 11, // [11:13] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_pkg_apis_proto_reduce_v1_reduce_proto_init() } @@ -708,7 +726,7 @@ func file_pkg_apis_proto_reduce_v1_reduce_proto_init() { return nil } } - file_pkg_apis_proto_reduce_v1_reduce_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_reduce_v1_reduce_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReduceResponse_Result); i { case 0: return &v.state @@ -727,7 +745,7 @@ func file_pkg_apis_proto_reduce_v1_reduce_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_proto_reduce_v1_reduce_proto_rawDesc, NumEnums: 1, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/proto/reduce/v1/reduce.proto b/pkg/apis/proto/reduce/v1/reduce.proto index 2b2e071d..d807f2d4 100644 --- a/pkg/apis/proto/reduce/v1/reduce.proto +++ b/pkg/apis/proto/reduce/v1/reduce.proto @@ -39,6 +39,7 @@ message ReduceRequest { bytes value = 2; google.protobuf.Timestamp event_time = 3; google.protobuf.Timestamp watermark = 4; + map headers = 5; } Payload payload = 1; diff --git a/pkg/apis/proto/sessionreduce/v1/sessionreduce.pb.go b/pkg/apis/proto/sessionreduce/v1/sessionreduce.pb.go index 8a672b83..79cd3f65 100644 --- a/pkg/apis/proto/sessionreduce/v1/sessionreduce.pb.go +++ b/pkg/apis/proto/sessionreduce/v1/sessionreduce.pb.go @@ -390,6 +390,7 @@ type SessionReduceRequest_Payload struct { Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` EventTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` Watermark *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=watermark,proto3" json:"watermark,omitempty"` + Headers map[string]string `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *SessionReduceRequest_Payload) Reset() { @@ -452,6 +453,13 @@ func (x *SessionReduceRequest_Payload) GetWatermark() *timestamppb.Timestamp { return nil } +func (x *SessionReduceRequest_Payload) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + // Result represents a result element. It contains the result of the reduce function. type SessionReduceResponse_Result struct { state protoimpl.MessageState @@ -466,7 +474,7 @@ type SessionReduceResponse_Result struct { func (x *SessionReduceResponse_Result) Reset() { *x = SessionReduceResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_msgTypes[6] + mi := &file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -479,7 +487,7 @@ func (x *SessionReduceResponse_Result) String() string { func (*SessionReduceResponse_Result) ProtoMessage() {} func (x *SessionReduceResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_msgTypes[6] + mi := &file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -536,7 +544,7 @@ var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xcd, 0x04, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xe0, 0x05, 0x0a, 0x14, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, @@ -563,7 +571,7 @@ var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_rawDesc = []byte{ 0x45, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, - 0x10, 0x04, 0x1a, 0xa8, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, + 0x10, 0x04, 0x1a, 0xbb, 0x02, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, @@ -573,42 +581,51 @@ var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_rawDesc = []byte{ 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0xfa, 0x01, - 0x0a, 0x15, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x3f, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x65, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x72, 0x65, - 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x65, 0x64, 0x57, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x65, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x12, 0x10, 0x0a, 0x03, 0x45, 0x4f, 0x46, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x45, - 0x4f, 0x46, 0x1a, 0x46, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, - 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, - 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, - 0x79, 0x32, 0xbb, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x64, - 0x75, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x0f, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x64, 0x75, 0x63, 0x65, 0x46, 0x6e, 0x12, 0x26, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x6d, 0x70, 0x52, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x55, 0x0a, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x07, 0x49, - 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, - 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, - 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, - 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xfa, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x64, 0x75, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x3f, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x65, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x65, 0x64, + 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x65, 0x64, 0x57, 0x69, 0x6e, + 0x64, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x4f, 0x46, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x03, 0x45, 0x4f, 0x46, 0x1a, 0x46, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x25, 0x0a, + 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x32, 0xbb, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x0f, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x46, 0x6e, 0x12, 0x26, 0x2e, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x64, 0x75, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x64, 0x75, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x42, + 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x64, 0x75, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -624,7 +641,7 @@ func file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_rawDescGZIP() []by } var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_goTypes = []interface{}{ (SessionReduceRequest_WindowOperation_Event)(0), // 0: sessionreduce.v1.SessionReduceRequest.WindowOperation.Event (*KeyedWindow)(nil), // 1: sessionreduce.v1.KeyedWindow @@ -633,30 +650,32 @@ var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_goTypes = []interfa (*ReadyResponse)(nil), // 4: sessionreduce.v1.ReadyResponse (*SessionReduceRequest_WindowOperation)(nil), // 5: sessionreduce.v1.SessionReduceRequest.WindowOperation (*SessionReduceRequest_Payload)(nil), // 6: sessionreduce.v1.SessionReduceRequest.Payload - (*SessionReduceResponse_Result)(nil), // 7: sessionreduce.v1.SessionReduceResponse.Result - (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 9: google.protobuf.Empty + nil, // 7: sessionreduce.v1.SessionReduceRequest.Payload.HeadersEntry + (*SessionReduceResponse_Result)(nil), // 8: sessionreduce.v1.SessionReduceResponse.Result + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 10: google.protobuf.Empty } var file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_depIdxs = []int32{ - 8, // 0: sessionreduce.v1.KeyedWindow.start:type_name -> google.protobuf.Timestamp - 8, // 1: sessionreduce.v1.KeyedWindow.end:type_name -> google.protobuf.Timestamp + 9, // 0: sessionreduce.v1.KeyedWindow.start:type_name -> google.protobuf.Timestamp + 9, // 1: sessionreduce.v1.KeyedWindow.end:type_name -> google.protobuf.Timestamp 6, // 2: sessionreduce.v1.SessionReduceRequest.payload:type_name -> sessionreduce.v1.SessionReduceRequest.Payload 5, // 3: sessionreduce.v1.SessionReduceRequest.operation:type_name -> sessionreduce.v1.SessionReduceRequest.WindowOperation - 7, // 4: sessionreduce.v1.SessionReduceResponse.result:type_name -> sessionreduce.v1.SessionReduceResponse.Result + 8, // 4: sessionreduce.v1.SessionReduceResponse.result:type_name -> sessionreduce.v1.SessionReduceResponse.Result 1, // 5: sessionreduce.v1.SessionReduceResponse.keyedWindow:type_name -> sessionreduce.v1.KeyedWindow 0, // 6: sessionreduce.v1.SessionReduceRequest.WindowOperation.event:type_name -> sessionreduce.v1.SessionReduceRequest.WindowOperation.Event 1, // 7: sessionreduce.v1.SessionReduceRequest.WindowOperation.keyedWindows:type_name -> sessionreduce.v1.KeyedWindow - 8, // 8: sessionreduce.v1.SessionReduceRequest.Payload.event_time:type_name -> google.protobuf.Timestamp - 8, // 9: sessionreduce.v1.SessionReduceRequest.Payload.watermark:type_name -> google.protobuf.Timestamp - 2, // 10: sessionreduce.v1.SessionReduce.SessionReduceFn:input_type -> sessionreduce.v1.SessionReduceRequest - 9, // 11: sessionreduce.v1.SessionReduce.IsReady:input_type -> google.protobuf.Empty - 3, // 12: sessionreduce.v1.SessionReduce.SessionReduceFn:output_type -> sessionreduce.v1.SessionReduceResponse - 4, // 13: sessionreduce.v1.SessionReduce.IsReady:output_type -> sessionreduce.v1.ReadyResponse - 12, // [12:14] is the sub-list for method output_type - 10, // [10:12] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 9, // 8: sessionreduce.v1.SessionReduceRequest.Payload.event_time:type_name -> google.protobuf.Timestamp + 9, // 9: sessionreduce.v1.SessionReduceRequest.Payload.watermark:type_name -> google.protobuf.Timestamp + 7, // 10: sessionreduce.v1.SessionReduceRequest.Payload.headers:type_name -> sessionreduce.v1.SessionReduceRequest.Payload.HeadersEntry + 2, // 11: sessionreduce.v1.SessionReduce.SessionReduceFn:input_type -> sessionreduce.v1.SessionReduceRequest + 10, // 12: sessionreduce.v1.SessionReduce.IsReady:input_type -> google.protobuf.Empty + 3, // 13: sessionreduce.v1.SessionReduce.SessionReduceFn:output_type -> sessionreduce.v1.SessionReduceResponse + 4, // 14: sessionreduce.v1.SessionReduce.IsReady:output_type -> sessionreduce.v1.ReadyResponse + 13, // [13:15] is the sub-list for method output_type + 11, // [11:13] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_init() } @@ -737,7 +756,7 @@ func file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_init() { return nil } } - file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SessionReduceResponse_Result); i { case 0: return &v.state @@ -756,7 +775,7 @@ func file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_proto_sessionreduce_v1_sessionreduce_proto_rawDesc, NumEnums: 1, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/proto/sessionreduce/v1/sessionreduce.proto b/pkg/apis/proto/sessionreduce/v1/sessionreduce.proto index 07d354e6..22144af1 100644 --- a/pkg/apis/proto/sessionreduce/v1/sessionreduce.proto +++ b/pkg/apis/proto/sessionreduce/v1/sessionreduce.proto @@ -50,6 +50,7 @@ message SessionReduceRequest { bytes value = 2; google.protobuf.Timestamp event_time = 3; google.protobuf.Timestamp watermark = 4; + map headers = 5; } Payload payload = 1; diff --git a/pkg/apis/proto/sink/v1/sink.pb.go b/pkg/apis/proto/sink/v1/sink.pb.go index 3da1634b..0bc0a086 100644 --- a/pkg/apis/proto/sink/v1/sink.pb.go +++ b/pkg/apis/proto/sink/v1/sink.pb.go @@ -34,6 +34,7 @@ type SinkRequest struct { EventTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` Watermark *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=watermark,proto3" json:"watermark,omitempty"` Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` + Headers map[string]string `protobuf:"bytes,6,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *SinkRequest) Reset() { @@ -103,6 +104,13 @@ func (x *SinkRequest) GetId() string { return "" } +func (x *SinkRequest) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + // * // ReadyResponse is the health check result. type ReadyResponse struct { @@ -217,7 +225,7 @@ type SinkResponse_Result struct { func (x *SinkResponse_Result) Reset() { *x = SinkResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_sink_v1_sink_proto_msgTypes[3] + mi := &file_pkg_apis_proto_sink_v1_sink_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -230,7 +238,7 @@ func (x *SinkResponse_Result) String() string { func (*SinkResponse_Result) ProtoMessage() {} func (x *SinkResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_sink_v1_sink_proto_msgTypes[3] + mi := &file_pkg_apis_proto_sink_v1_sink_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -276,7 +284,7 @@ var file_pkg_apis_proto_sink_v1_sink_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x01, 0x0a, 0x0b, 0x53, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x02, 0x0a, 0x0b, 0x53, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, @@ -288,31 +296,38 @@ var file_pkg_apis_proto_sink_v1_sink_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, - 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, - 0x22, 0x93, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x4b, 0x0a, 0x06, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, - 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x32, 0x7a, 0x0a, 0x04, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x37, - 0x0a, 0x06, 0x53, 0x69, 0x6e, 0x6b, 0x46, 0x6e, 0x12, 0x14, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, - 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x39, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x6e, - 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, - 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x69, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x69, 0x6e, + 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x93, 0x01, 0x0a, 0x0c, 0x53, 0x69, + 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x69, + 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x1a, 0x4b, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x32, + 0x7a, 0x0a, 0x04, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x37, 0x0a, 0x06, 0x53, 0x69, 0x6e, 0x6b, 0x46, + 0x6e, 0x12, 0x14, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, + 0x12, 0x39, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, + 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x69, + 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -327,28 +342,30 @@ func file_pkg_apis_proto_sink_v1_sink_proto_rawDescGZIP() []byte { return file_pkg_apis_proto_sink_v1_sink_proto_rawDescData } -var file_pkg_apis_proto_sink_v1_sink_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_pkg_apis_proto_sink_v1_sink_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_pkg_apis_proto_sink_v1_sink_proto_goTypes = []interface{}{ (*SinkRequest)(nil), // 0: sink.v1.SinkRequest (*ReadyResponse)(nil), // 1: sink.v1.ReadyResponse (*SinkResponse)(nil), // 2: sink.v1.SinkResponse - (*SinkResponse_Result)(nil), // 3: sink.v1.SinkResponse.Result - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 5: google.protobuf.Empty + nil, // 3: sink.v1.SinkRequest.HeadersEntry + (*SinkResponse_Result)(nil), // 4: sink.v1.SinkResponse.Result + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 6: google.protobuf.Empty } var file_pkg_apis_proto_sink_v1_sink_proto_depIdxs = []int32{ - 4, // 0: sink.v1.SinkRequest.event_time:type_name -> google.protobuf.Timestamp - 4, // 1: sink.v1.SinkRequest.watermark:type_name -> google.protobuf.Timestamp - 3, // 2: sink.v1.SinkResponse.results:type_name -> sink.v1.SinkResponse.Result - 0, // 3: sink.v1.Sink.SinkFn:input_type -> sink.v1.SinkRequest - 5, // 4: sink.v1.Sink.IsReady:input_type -> google.protobuf.Empty - 2, // 5: sink.v1.Sink.SinkFn:output_type -> sink.v1.SinkResponse - 1, // 6: sink.v1.Sink.IsReady:output_type -> sink.v1.ReadyResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 5, // 0: sink.v1.SinkRequest.event_time:type_name -> google.protobuf.Timestamp + 5, // 1: sink.v1.SinkRequest.watermark:type_name -> google.protobuf.Timestamp + 3, // 2: sink.v1.SinkRequest.headers:type_name -> sink.v1.SinkRequest.HeadersEntry + 4, // 3: sink.v1.SinkResponse.results:type_name -> sink.v1.SinkResponse.Result + 0, // 4: sink.v1.Sink.SinkFn:input_type -> sink.v1.SinkRequest + 6, // 5: sink.v1.Sink.IsReady:input_type -> google.protobuf.Empty + 2, // 6: sink.v1.Sink.SinkFn:output_type -> sink.v1.SinkResponse + 1, // 7: sink.v1.Sink.IsReady:output_type -> sink.v1.ReadyResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_pkg_apis_proto_sink_v1_sink_proto_init() } @@ -393,7 +410,7 @@ func file_pkg_apis_proto_sink_v1_sink_proto_init() { return nil } } - file_pkg_apis_proto_sink_v1_sink_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_sink_v1_sink_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SinkResponse_Result); i { case 0: return &v.state @@ -412,7 +429,7 @@ func file_pkg_apis_proto_sink_v1_sink_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_proto_sink_v1_sink_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/proto/sink/v1/sink.proto b/pkg/apis/proto/sink/v1/sink.proto index 1c97077a..5e47fe4c 100644 --- a/pkg/apis/proto/sink/v1/sink.proto +++ b/pkg/apis/proto/sink/v1/sink.proto @@ -25,6 +25,7 @@ message SinkRequest { google.protobuf.Timestamp event_time = 3; google.protobuf.Timestamp watermark = 4; string id = 5; + map headers = 6; } /** diff --git a/pkg/apis/proto/source/v1/source.pb.go b/pkg/apis/proto/source/v1/source.pb.go index 60903e31..1304f4ee 100644 --- a/pkg/apis/proto/source/v1/source.pb.go +++ b/pkg/apis/proto/source/v1/source.pb.go @@ -511,6 +511,10 @@ type ReadResponse_Result struct { // We add this optional field to support the use case where the user defined source can provide keys for the datum. // e.g. Kafka and Redis Stream message usually include information about the keys. Keys []string `protobuf:"bytes,4,rep,name=keys,proto3" json:"keys,omitempty"` + // Optional list of headers associated with the datum. + // Headers are the metadata associated with the datum. + // e.g. Kafka and Redis Stream message usually include information about the headers. + Headers map[string]string `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *ReadResponse_Result) Reset() { @@ -573,6 +577,13 @@ func (x *ReadResponse_Result) GetKeys() []string { return nil } +func (x *ReadResponse_Result) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + type AckRequest_Request struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -588,7 +599,7 @@ type AckRequest_Request struct { func (x *AckRequest_Request) Reset() { *x = AckRequest_Request{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[10] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -601,7 +612,7 @@ func (x *AckRequest_Request) String() string { func (*AckRequest_Request) ProtoMessage() {} func (x *AckRequest_Request) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[10] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -636,7 +647,7 @@ type AckResponse_Result struct { func (x *AckResponse_Result) Reset() { *x = AckResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[11] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -649,7 +660,7 @@ func (x *AckResponse_Result) String() string { func (*AckResponse_Result) ProtoMessage() {} func (x *AckResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[11] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -685,7 +696,7 @@ type PendingResponse_Result struct { func (x *PendingResponse_Result) Reset() { *x = PendingResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[12] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -698,7 +709,7 @@ func (x *PendingResponse_Result) String() string { func (*PendingResponse_Result) ProtoMessage() {} func (x *PendingResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[12] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -733,7 +744,7 @@ type PartitionsResponse_Result struct { func (x *PartitionsResponse_Result) Reset() { *x = PartitionsResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[13] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -746,7 +757,7 @@ func (x *PartitionsResponse_Result) String() string { func (*PartitionsResponse_Result) ProtoMessage() {} func (x *PartitionsResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[13] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -788,12 +799,12 @@ var file_pkg_apis_proto_source_v1_source_proto_rawDesc = []byte{ 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x4d, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x0c, 0x52, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x4d, 0x73, 0x22, 0xe8, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x1a, 0x9c, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, + 0x75, 0x6c, 0x74, 0x1a, 0x9f, 0x02, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x29, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, @@ -803,69 +814,77 @@ var file_pkg_apis_proto_source_v1_source_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, - 0x79, 0x73, 0x22, 0x7d, 0x0a, 0x0a, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x37, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x0a, 0x07, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x07, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x73, 0x22, 0x80, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x35, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x3a, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x6c, 0x0a, 0x0f, 0x50, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x1e, 0x0a, 0x06, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7c, 0x0a, 0x12, 0x50, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3c, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x28, 0x0a, - 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x43, 0x0a, 0x06, 0x4f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0xc2, 0x02, 0x0a, - 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x46, - 0x6e, 0x12, 0x16, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x30, 0x01, 0x12, 0x36, 0x0a, 0x05, 0x41, 0x63, 0x6b, 0x46, 0x6e, 0x12, 0x15, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, - 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, - 0x0c, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6e, 0x12, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, 0x6f, - 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x73, 0x12, 0x45, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7d, 0x0a, 0x0a, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x0a, 0x07, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x07, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x3a, 0x0a, 0x06, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x6c, + 0x0a, 0x0f, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x1e, 0x0a, 0x06, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7c, 0x0a, 0x12, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x1a, 0x28, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x43, 0x0a, 0x06, 0x4f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, + 0xc2, 0x02, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x52, 0x65, + 0x61, 0x64, 0x46, 0x6e, 0x12, 0x16, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x36, 0x0a, 0x05, 0x41, 0x63, 0x6b, 0x46, 0x6e, + 0x12, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3f, 0x0a, 0x09, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x6e, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x45, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6e, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, + 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -880,7 +899,7 @@ func file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP() []byte { return file_pkg_apis_proto_source_v1_source_proto_rawDescData } -var file_pkg_apis_proto_source_v1_source_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_pkg_apis_proto_source_v1_source_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_pkg_apis_proto_source_v1_source_proto_goTypes = []interface{}{ (*ReadRequest)(nil), // 0: source.v1.ReadRequest (*ReadResponse)(nil), // 1: source.v1.ReadResponse @@ -892,39 +911,41 @@ var file_pkg_apis_proto_source_v1_source_proto_goTypes = []interface{}{ (*Offset)(nil), // 7: source.v1.Offset (*ReadRequest_Request)(nil), // 8: source.v1.ReadRequest.Request (*ReadResponse_Result)(nil), // 9: source.v1.ReadResponse.Result - (*AckRequest_Request)(nil), // 10: source.v1.AckRequest.Request - (*AckResponse_Result)(nil), // 11: source.v1.AckResponse.Result - (*PendingResponse_Result)(nil), // 12: source.v1.PendingResponse.Result - (*PartitionsResponse_Result)(nil), // 13: source.v1.PartitionsResponse.Result - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 15: google.protobuf.Empty + nil, // 10: source.v1.ReadResponse.Result.HeadersEntry + (*AckRequest_Request)(nil), // 11: source.v1.AckRequest.Request + (*AckResponse_Result)(nil), // 12: source.v1.AckResponse.Result + (*PendingResponse_Result)(nil), // 13: source.v1.PendingResponse.Result + (*PartitionsResponse_Result)(nil), // 14: source.v1.PartitionsResponse.Result + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 16: google.protobuf.Empty } var file_pkg_apis_proto_source_v1_source_proto_depIdxs = []int32{ 8, // 0: source.v1.ReadRequest.request:type_name -> source.v1.ReadRequest.Request 9, // 1: source.v1.ReadResponse.result:type_name -> source.v1.ReadResponse.Result - 10, // 2: source.v1.AckRequest.request:type_name -> source.v1.AckRequest.Request - 11, // 3: source.v1.AckResponse.result:type_name -> source.v1.AckResponse.Result - 12, // 4: source.v1.PendingResponse.result:type_name -> source.v1.PendingResponse.Result - 13, // 5: source.v1.PartitionsResponse.result:type_name -> source.v1.PartitionsResponse.Result + 11, // 2: source.v1.AckRequest.request:type_name -> source.v1.AckRequest.Request + 12, // 3: source.v1.AckResponse.result:type_name -> source.v1.AckResponse.Result + 13, // 4: source.v1.PendingResponse.result:type_name -> source.v1.PendingResponse.Result + 14, // 5: source.v1.PartitionsResponse.result:type_name -> source.v1.PartitionsResponse.Result 7, // 6: source.v1.ReadResponse.Result.offset:type_name -> source.v1.Offset - 14, // 7: source.v1.ReadResponse.Result.event_time:type_name -> google.protobuf.Timestamp - 7, // 8: source.v1.AckRequest.Request.offsets:type_name -> source.v1.Offset - 15, // 9: source.v1.AckResponse.Result.success:type_name -> google.protobuf.Empty - 0, // 10: source.v1.Source.ReadFn:input_type -> source.v1.ReadRequest - 2, // 11: source.v1.Source.AckFn:input_type -> source.v1.AckRequest - 15, // 12: source.v1.Source.PendingFn:input_type -> google.protobuf.Empty - 15, // 13: source.v1.Source.PartitionsFn:input_type -> google.protobuf.Empty - 15, // 14: source.v1.Source.IsReady:input_type -> google.protobuf.Empty - 1, // 15: source.v1.Source.ReadFn:output_type -> source.v1.ReadResponse - 3, // 16: source.v1.Source.AckFn:output_type -> source.v1.AckResponse - 5, // 17: source.v1.Source.PendingFn:output_type -> source.v1.PendingResponse - 6, // 18: source.v1.Source.PartitionsFn:output_type -> source.v1.PartitionsResponse - 4, // 19: source.v1.Source.IsReady:output_type -> source.v1.ReadyResponse - 15, // [15:20] is the sub-list for method output_type - 10, // [10:15] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 15, // 7: source.v1.ReadResponse.Result.event_time:type_name -> google.protobuf.Timestamp + 10, // 8: source.v1.ReadResponse.Result.headers:type_name -> source.v1.ReadResponse.Result.HeadersEntry + 7, // 9: source.v1.AckRequest.Request.offsets:type_name -> source.v1.Offset + 16, // 10: source.v1.AckResponse.Result.success:type_name -> google.protobuf.Empty + 0, // 11: source.v1.Source.ReadFn:input_type -> source.v1.ReadRequest + 2, // 12: source.v1.Source.AckFn:input_type -> source.v1.AckRequest + 16, // 13: source.v1.Source.PendingFn:input_type -> google.protobuf.Empty + 16, // 14: source.v1.Source.PartitionsFn:input_type -> google.protobuf.Empty + 16, // 15: source.v1.Source.IsReady:input_type -> google.protobuf.Empty + 1, // 16: source.v1.Source.ReadFn:output_type -> source.v1.ReadResponse + 3, // 17: source.v1.Source.AckFn:output_type -> source.v1.AckResponse + 5, // 18: source.v1.Source.PendingFn:output_type -> source.v1.PendingResponse + 6, // 19: source.v1.Source.PartitionsFn:output_type -> source.v1.PartitionsResponse + 4, // 20: source.v1.Source.IsReady:output_type -> source.v1.ReadyResponse + 16, // [16:21] is the sub-list for method output_type + 11, // [11:16] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_pkg_apis_proto_source_v1_source_proto_init() } @@ -1053,7 +1074,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { return nil } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_source_v1_source_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AckRequest_Request); i { case 0: return &v.state @@ -1065,7 +1086,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { return nil } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_source_v1_source_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AckResponse_Result); i { case 0: return &v.state @@ -1077,7 +1098,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { return nil } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_source_v1_source_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PendingResponse_Result); i { case 0: return &v.state @@ -1089,7 +1110,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { return nil } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_source_v1_source_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PartitionsResponse_Result); i { case 0: return &v.state @@ -1108,7 +1129,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_proto_source_v1_source_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/proto/source/v1/source.proto b/pkg/apis/proto/source/v1/source.proto index a0778dfe..9ee6f688 100644 --- a/pkg/apis/proto/source/v1/source.proto +++ b/pkg/apis/proto/source/v1/source.proto @@ -62,6 +62,10 @@ message ReadResponse { // We add this optional field to support the use case where the user defined source can provide keys for the datum. // e.g. Kafka and Redis Stream message usually include information about the keys. repeated string keys = 4; + // Optional list of headers associated with the datum. + // Headers are the metadata associated with the datum. + // e.g. Kafka and Redis Stream message usually include information about the headers. + map headers = 5; } // Required field holding the result. Result result = 1; diff --git a/pkg/apis/proto/sourcetransform/v1/transform.pb.go b/pkg/apis/proto/sourcetransform/v1/transform.pb.go index 6aff9fb6..3a34e351 100644 --- a/pkg/apis/proto/sourcetransform/v1/transform.pb.go +++ b/pkg/apis/proto/sourcetransform/v1/transform.pb.go @@ -33,6 +33,7 @@ type SourceTransformRequest struct { Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` EventTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` Watermark *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=watermark,proto3" json:"watermark,omitempty"` + Headers map[string]string `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *SourceTransformRequest) Reset() { @@ -95,6 +96,13 @@ func (x *SourceTransformRequest) GetWatermark() *timestamppb.Timestamp { return nil } +func (x *SourceTransformRequest) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + // * // SourceTransformerResponse represents a response element. type SourceTransformResponse struct { @@ -207,7 +215,7 @@ type SourceTransformResponse_Result struct { func (x *SourceTransformResponse_Result) Reset() { *x = SourceTransformResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_sourcetransform_v1_transform_proto_msgTypes[3] + mi := &file_pkg_apis_proto_sourcetransform_v1_transform_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -220,7 +228,7 @@ func (x *SourceTransformResponse_Result) String() string { func (*SourceTransformResponse_Result) ProtoMessage() {} func (x *SourceTransformResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_sourcetransform_v1_transform_proto_msgTypes[3] + mi := &file_pkg_apis_proto_sourcetransform_v1_transform_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -275,7 +283,7 @@ var file_pkg_apis_proto_sourcetransform_v1_transform_proto_rawDesc = []byte{ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x16, 0x53, 0x6f, 0x75, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, @@ -287,42 +295,51 @@ var file_pkg_apis_proto_sourcetransform_v1_transform_proto_rawDesc = []byte{ 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, - 0x6b, 0x22, 0xed, 0x01, 0x0a, 0x17, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, - 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x81, 0x01, - 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, 0xcb, 0x01, 0x0a, 0x0f, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x70, 0x0a, 0x11, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, - 0x6e, 0x12, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, + 0x6b, 0x12, 0x53, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0xed, 0x01, 0x0a, 0x17, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, + 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x34, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, - 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, - 0x6d, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x81, + 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, 0xcb, 0x01, 0x0a, 0x0f, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x70, 0x0a, + 0x11, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x46, 0x6e, 0x12, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x46, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, + 0x75, 0x6d, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -337,29 +354,31 @@ func file_pkg_apis_proto_sourcetransform_v1_transform_proto_rawDescGZIP() []byte return file_pkg_apis_proto_sourcetransform_v1_transform_proto_rawDescData } -var file_pkg_apis_proto_sourcetransform_v1_transform_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_pkg_apis_proto_sourcetransform_v1_transform_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_pkg_apis_proto_sourcetransform_v1_transform_proto_goTypes = []interface{}{ (*SourceTransformRequest)(nil), // 0: sourcetransformer.v1.SourceTransformRequest (*SourceTransformResponse)(nil), // 1: sourcetransformer.v1.SourceTransformResponse (*ReadyResponse)(nil), // 2: sourcetransformer.v1.ReadyResponse - (*SourceTransformResponse_Result)(nil), // 3: sourcetransformer.v1.SourceTransformResponse.Result - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 5: google.protobuf.Empty + nil, // 3: sourcetransformer.v1.SourceTransformRequest.HeadersEntry + (*SourceTransformResponse_Result)(nil), // 4: sourcetransformer.v1.SourceTransformResponse.Result + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 6: google.protobuf.Empty } var file_pkg_apis_proto_sourcetransform_v1_transform_proto_depIdxs = []int32{ - 4, // 0: sourcetransformer.v1.SourceTransformRequest.event_time:type_name -> google.protobuf.Timestamp - 4, // 1: sourcetransformer.v1.SourceTransformRequest.watermark:type_name -> google.protobuf.Timestamp - 3, // 2: sourcetransformer.v1.SourceTransformResponse.results:type_name -> sourcetransformer.v1.SourceTransformResponse.Result - 4, // 3: sourcetransformer.v1.SourceTransformResponse.Result.event_time:type_name -> google.protobuf.Timestamp - 0, // 4: sourcetransformer.v1.SourceTransform.SourceTransformFn:input_type -> sourcetransformer.v1.SourceTransformRequest - 5, // 5: sourcetransformer.v1.SourceTransform.IsReady:input_type -> google.protobuf.Empty - 1, // 6: sourcetransformer.v1.SourceTransform.SourceTransformFn:output_type -> sourcetransformer.v1.SourceTransformResponse - 2, // 7: sourcetransformer.v1.SourceTransform.IsReady:output_type -> sourcetransformer.v1.ReadyResponse - 6, // [6:8] is the sub-list for method output_type - 4, // [4:6] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 5, // 0: sourcetransformer.v1.SourceTransformRequest.event_time:type_name -> google.protobuf.Timestamp + 5, // 1: sourcetransformer.v1.SourceTransformRequest.watermark:type_name -> google.protobuf.Timestamp + 3, // 2: sourcetransformer.v1.SourceTransformRequest.headers:type_name -> sourcetransformer.v1.SourceTransformRequest.HeadersEntry + 4, // 3: sourcetransformer.v1.SourceTransformResponse.results:type_name -> sourcetransformer.v1.SourceTransformResponse.Result + 5, // 4: sourcetransformer.v1.SourceTransformResponse.Result.event_time:type_name -> google.protobuf.Timestamp + 0, // 5: sourcetransformer.v1.SourceTransform.SourceTransformFn:input_type -> sourcetransformer.v1.SourceTransformRequest + 6, // 6: sourcetransformer.v1.SourceTransform.IsReady:input_type -> google.protobuf.Empty + 1, // 7: sourcetransformer.v1.SourceTransform.SourceTransformFn:output_type -> sourcetransformer.v1.SourceTransformResponse + 2, // 8: sourcetransformer.v1.SourceTransform.IsReady:output_type -> sourcetransformer.v1.ReadyResponse + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_pkg_apis_proto_sourcetransform_v1_transform_proto_init() } @@ -404,7 +423,7 @@ func file_pkg_apis_proto_sourcetransform_v1_transform_proto_init() { return nil } } - file_pkg_apis_proto_sourcetransform_v1_transform_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_proto_sourcetransform_v1_transform_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SourceTransformResponse_Result); i { case 0: return &v.state @@ -423,7 +442,7 @@ func file_pkg_apis_proto_sourcetransform_v1_transform_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_proto_sourcetransform_v1_transform_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/proto/sourcetransform/v1/transform.proto b/pkg/apis/proto/sourcetransform/v1/transform.proto index 1267bb02..8885db08 100644 --- a/pkg/apis/proto/sourcetransform/v1/transform.proto +++ b/pkg/apis/proto/sourcetransform/v1/transform.proto @@ -25,6 +25,7 @@ message SourceTransformRequest { bytes value = 2; google.protobuf.Timestamp event_time = 3; google.protobuf.Timestamp watermark = 4; + map headers = 5; } /** diff --git a/pkg/mapper/interface.go b/pkg/mapper/interface.go index 12700009..e4f8355f 100644 --- a/pkg/mapper/interface.go +++ b/pkg/mapper/interface.go @@ -7,9 +7,14 @@ import ( // Datum contains methods to get the payload information. type Datum interface { + // Value returns the payload of the message. Value() []byte + // EventTime returns the event time of the message. EventTime() time.Time + // Watermark returns the watermark of the message. Watermark() time.Time + // Headers returns the headers of the message. + Headers() map[string]string } // Mapper is the interface of map function implementation. diff --git a/pkg/mapper/service.go b/pkg/mapper/service.go index 16aab8a0..636f494e 100644 --- a/pkg/mapper/service.go +++ b/pkg/mapper/service.go @@ -29,7 +29,7 @@ func (fs *Service) IsReady(context.Context, *emptypb.Empty) (*mappb.ReadyRespons // MapFn applies a user defined function to each request element and returns a list of results. func (fs *Service) MapFn(ctx context.Context, d *mappb.MapRequest) (*mappb.MapResponse, error) { - var hd = NewHandlerDatum(d.GetValue(), d.GetEventTime().AsTime(), d.GetWatermark().AsTime()) + var hd = NewHandlerDatum(d.GetValue(), d.GetEventTime().AsTime(), d.GetWatermark().AsTime(), d.GetHeaders()) messages := fs.Mapper.Map(ctx, d.GetKeys(), hd) var elements []*mappb.MapResponse_Result for _, m := range messages.Items() { diff --git a/pkg/mapper/types.go b/pkg/mapper/types.go index e924b926..fd18c024 100644 --- a/pkg/mapper/types.go +++ b/pkg/mapper/types.go @@ -7,13 +7,15 @@ type handlerDatum struct { value []byte eventTime time.Time watermark time.Time + headers map[string]string } -func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time) Datum { +func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time, headers map[string]string) Datum { return &handlerDatum{ value: value, eventTime: eventTime, watermark: watermark, + headers: headers, } } @@ -28,3 +30,7 @@ func (h *handlerDatum) EventTime() time.Time { func (h *handlerDatum) Watermark() time.Time { return h.watermark } + +func (h *handlerDatum) Headers() map[string]string { + return h.headers +} diff --git a/pkg/mapstreamer/interface.go b/pkg/mapstreamer/interface.go index 8a14ffe3..57487914 100644 --- a/pkg/mapstreamer/interface.go +++ b/pkg/mapstreamer/interface.go @@ -7,9 +7,14 @@ import ( // Datum contains methods to get the payload information. type Datum interface { + // Value returns the payload of the message. Value() []byte + // EventTime returns the event time of the message. EventTime() time.Time + // Watermark returns the watermark of the message. Watermark() time.Time + // Headers returns the headers of the message. + Headers() map[string]string } // MapStreamer is the interface of map stream function implementation. diff --git a/pkg/mapstreamer/service.go b/pkg/mapstreamer/service.go index 2e9022e0..c272b7ce 100644 --- a/pkg/mapstreamer/service.go +++ b/pkg/mapstreamer/service.go @@ -30,7 +30,7 @@ func (fs *Service) IsReady(context.Context, *emptypb.Empty) (*mapstreampb.ReadyR // MapStreamFn applies a function to each request element and streams the results back. func (fs *Service) MapStreamFn(d *mapstreampb.MapStreamRequest, stream mapstreampb.MapStream_MapStreamFnServer) error { - var hd = NewHandlerDatum(d.GetValue(), d.EventTime.AsTime(), d.Watermark.AsTime()) + var hd = NewHandlerDatum(d.GetValue(), d.GetEventTime().AsTime(), d.GetWatermark().AsTime(), d.GetHeaders()) ctx := stream.Context() messageCh := make(chan Message) diff --git a/pkg/mapstreamer/types.go b/pkg/mapstreamer/types.go index 72038a6c..e7f95d0a 100644 --- a/pkg/mapstreamer/types.go +++ b/pkg/mapstreamer/types.go @@ -7,13 +7,15 @@ type handlerDatum struct { value []byte eventTime time.Time watermark time.Time + headers map[string]string } -func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time) Datum { +func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time, headers map[string]string) Datum { return &handlerDatum{ value: value, eventTime: eventTime, watermark: watermark, + headers: headers, } } @@ -28,3 +30,7 @@ func (h *handlerDatum) EventTime() time.Time { func (h *handlerDatum) Watermark() time.Time { return h.watermark } + +func (h *handlerDatum) Headers() map[string]string { + return h.headers +} diff --git a/pkg/reducer/interface.go b/pkg/reducer/interface.go index e49d858a..08d6dd31 100644 --- a/pkg/reducer/interface.go +++ b/pkg/reducer/interface.go @@ -7,9 +7,14 @@ import ( // Datum contains methods to get the payload information. type Datum interface { + // Value returns the payload of the message. Value() []byte + // EventTime returns the event time of the message. EventTime() time.Time + // Watermark returns the watermark of the message. Watermark() time.Time + // Headers returns the headers of the message. + Headers() map[string]string } // Metadata contains methods to get the metadata for the reduce operation. diff --git a/pkg/reducer/task_manager.go b/pkg/reducer/task_manager.go index 53e37503..a722eba3 100644 --- a/pkg/reducer/task_manager.go +++ b/pkg/reducer/task_manager.go @@ -166,5 +166,10 @@ func generateKey(window *v1.Window, keys []string) string { } func buildDatum(request *v1.ReduceRequest) Datum { - return NewHandlerDatum(request.Payload.GetValue(), request.Payload.EventTime.AsTime(), request.Payload.Watermark.AsTime()) + return NewHandlerDatum( + request.GetPayload().GetValue(), + request.GetPayload().GetEventTime().AsTime(), + request.GetPayload().GetWatermark().AsTime(), + request.GetPayload().GetHeaders(), + ) } diff --git a/pkg/reducer/types.go b/pkg/reducer/types.go index 3210a5a4..b17f690d 100644 --- a/pkg/reducer/types.go +++ b/pkg/reducer/types.go @@ -7,13 +7,15 @@ type handlerDatum struct { value []byte eventTime time.Time watermark time.Time + headers map[string]string } -func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time) Datum { +func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time, headers map[string]string) Datum { return &handlerDatum{ value: value, eventTime: eventTime, watermark: watermark, + headers: headers, } } @@ -29,6 +31,10 @@ func (h *handlerDatum) Watermark() time.Time { return h.watermark } +func (h *handlerDatum) Headers() map[string]string { + return h.headers +} + // intervalWindow implements IntervalWindow interface which will be passed as metadata // to reduce handlers type intervalWindow struct { diff --git a/pkg/reducestreamer/interface.go b/pkg/reducestreamer/interface.go index 40dd4faa..c0730570 100644 --- a/pkg/reducestreamer/interface.go +++ b/pkg/reducestreamer/interface.go @@ -7,9 +7,14 @@ import ( // Datum contains methods to get the payload information. type Datum interface { + // Value returns the payload of the message. Value() []byte + // EventTime returns the event time of the message. EventTime() time.Time + // Watermark returns the watermark of the message. Watermark() time.Time + // Headers returns the headers of the message. + Headers() map[string]string } // Metadata contains methods to get the metadata for the reduceStream operation. diff --git a/pkg/reducestreamer/task_manager.go b/pkg/reducestreamer/task_manager.go index a6d5feee..ae04f096 100644 --- a/pkg/reducestreamer/task_manager.go +++ b/pkg/reducestreamer/task_manager.go @@ -173,5 +173,10 @@ func generateKey(window *v1.Window, keys []string) string { } func buildDatum(request *v1.ReduceRequest) Datum { - return NewHandlerDatum(request.Payload.GetValue(), request.Payload.EventTime.AsTime(), request.Payload.Watermark.AsTime()) + return NewHandlerDatum( + request.GetPayload().GetValue(), + request.GetPayload().GetEventTime().AsTime(), + request.GetPayload().GetWatermark().AsTime(), + request.GetPayload().GetHeaders(), + ) } diff --git a/pkg/reducestreamer/types.go b/pkg/reducestreamer/types.go index 1f19c27a..0e22917c 100644 --- a/pkg/reducestreamer/types.go +++ b/pkg/reducestreamer/types.go @@ -7,13 +7,15 @@ type handlerDatum struct { value []byte eventTime time.Time watermark time.Time + headers map[string]string } -func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time) Datum { +func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time, headers map[string]string) Datum { return &handlerDatum{ value: value, eventTime: eventTime, watermark: watermark, + headers: headers, } } @@ -29,6 +31,10 @@ func (h *handlerDatum) Watermark() time.Time { return h.watermark } +func (h *handlerDatum) Headers() map[string]string { + return h.headers +} + // intervalWindow implements IntervalWindow interface which will be passed as metadata // to reduce handlers type intervalWindow struct { diff --git a/pkg/sessionreducer/interface.go b/pkg/sessionreducer/interface.go index 905ae380..7dac50cd 100644 --- a/pkg/sessionreducer/interface.go +++ b/pkg/sessionreducer/interface.go @@ -7,9 +7,14 @@ import ( // Datum contains methods to get the payload information. type Datum interface { + // Value returns the payload of the message. Value() []byte + // EventTime returns the event time of the message. EventTime() time.Time + // Watermark returns the watermark of the message. Watermark() time.Time + // Headers returns the headers of the message. + Headers() map[string]string } // SessionReducer is the interface which can be used to implement a session reduce operation. diff --git a/pkg/sessionreducer/service_test.go b/pkg/sessionreducer/service_test.go index b001bd3a..a0c55531 100644 --- a/pkg/sessionreducer/service_test.go +++ b/pkg/sessionreducer/service_test.go @@ -109,6 +109,7 @@ func TestService_SessionReduceFn(t *testing.T) { Value: []byte(strconv.Itoa(10)), EventTime: timestamppb.New(time.Time{}), Watermark: timestamppb.New(time.Time{}), + Headers: map[string]string{"x-txn-id": "test-txn-1"}, }, Operation: &sessionreducepb.SessionReduceRequest_WindowOperation{ Event: sessionreducepb.SessionReduceRequest_WindowOperation_OPEN, diff --git a/pkg/sessionreducer/task_manager.go b/pkg/sessionreducer/task_manager.go index 3bfaa050..49500eef 100644 --- a/pkg/sessionreducer/task_manager.go +++ b/pkg/sessionreducer/task_manager.go @@ -320,5 +320,10 @@ func generateKey(keyedWindow *v1.KeyedWindow) string { } func buildDatum(payload *v1.SessionReduceRequest_Payload) Datum { - return NewHandlerDatum(payload.GetValue(), payload.EventTime.AsTime(), payload.Watermark.AsTime()) + return NewHandlerDatum( + payload.GetValue(), + payload.GetEventTime().AsTime(), + payload.GetWatermark().AsTime(), + payload.GetHeaders(), + ) } diff --git a/pkg/sessionreducer/types.go b/pkg/sessionreducer/types.go index ee5c4966..490b377b 100644 --- a/pkg/sessionreducer/types.go +++ b/pkg/sessionreducer/types.go @@ -7,13 +7,15 @@ type handlerDatum struct { value []byte eventTime time.Time watermark time.Time + headers map[string]string } -func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time) Datum { +func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time, headers map[string]string) Datum { return &handlerDatum{ value: value, eventTime: eventTime, watermark: watermark, + headers: headers, } } @@ -28,3 +30,7 @@ func (h *handlerDatum) EventTime() time.Time { func (h *handlerDatum) Watermark() time.Time { return h.watermark } + +func (h *handlerDatum) Headers() map[string]string { + return h.headers +} diff --git a/pkg/sinker/interface.go b/pkg/sinker/interface.go index 9118a102..9d00a933 100644 --- a/pkg/sinker/interface.go +++ b/pkg/sinker/interface.go @@ -7,11 +7,18 @@ import ( // Datum is the interface of incoming message payload for sink function. type Datum interface { + // Keys returns the keys of the message. Keys() []string + // Value returns the payload of the message. Value() []byte + // EventTime returns the event time of the message. EventTime() time.Time + // Watermark returns the watermark of the message. Watermark() time.Time + // ID returns the ID of the message. ID() string + // Headers returns the headers of the message. + Headers() map[string]string } // Sinker is the interface of sink function implementation. diff --git a/pkg/sinker/service.go b/pkg/sinker/service.go index d008c1a3..4ac48c15 100644 --- a/pkg/sinker/service.go +++ b/pkg/sinker/service.go @@ -25,6 +25,7 @@ type handlerDatum struct { value []byte eventTime time.Time watermark time.Time + headers map[string]string } func (h *handlerDatum) Keys() []string { @@ -47,6 +48,10 @@ func (h *handlerDatum) Watermark() time.Time { return h.watermark } +func (h *handlerDatum) Headers() map[string]string { + return h.headers +} + // Service implements the proto gen server interface and contains the sinkfn operation handler. type Service struct { sinkpb.UnimplementedSinkServer @@ -98,6 +103,7 @@ func (fs *Service) SinkFn(stream sinkpb.Sink_SinkFnServer) error { keys: d.GetKeys(), eventTime: d.GetEventTime().AsTime(), watermark: d.GetWatermark().AsTime(), + headers: d.GetHeaders(), } datumStreamCh <- hd } diff --git a/pkg/sinker/service_test.go b/pkg/sinker/service_test.go index 5b88a0d2..176499a6 100644 --- a/pkg/sinker/service_test.go +++ b/pkg/sinker/service_test.go @@ -57,6 +57,7 @@ func TestService_SinkFn(t *testing.T) { Value: []byte(strconv.Itoa(10)), EventTime: timestamppb.New(time.Time{}), Watermark: timestamppb.New(time.Time{}), + Headers: map[string]string{"x-txn-id": "test-txn-1"}, }, { Id: "two-processed", @@ -64,6 +65,7 @@ func TestService_SinkFn(t *testing.T) { Value: []byte(strconv.Itoa(20)), EventTime: timestamppb.New(time.Time{}), Watermark: timestamppb.New(time.Time{}), + Headers: map[string]string{"x-txn-id": "test-txn-2"}, }, { Id: "three-processed", @@ -71,6 +73,7 @@ func TestService_SinkFn(t *testing.T) { Value: []byte(strconv.Itoa(30)), EventTime: timestamppb.New(time.Time{}), Watermark: timestamppb.New(time.Time{}), + Headers: map[string]string{"x-txn-id": "test-txn-3"}, }, }, sh: SinkerFunc(func(ctx context.Context, rch <-chan Datum) Responses { @@ -109,6 +112,7 @@ func TestService_SinkFn(t *testing.T) { Value: []byte(strconv.Itoa(10)), EventTime: timestamppb.New(time.Time{}), Watermark: timestamppb.New(time.Time{}), + Headers: map[string]string{"x-txn-id": "test-txn-1"}, }, { Id: "two-processed", @@ -123,6 +127,7 @@ func TestService_SinkFn(t *testing.T) { Value: []byte(strconv.Itoa(30)), EventTime: timestamppb.New(time.Time{}), Watermark: timestamppb.New(time.Time{}), + Headers: map[string]string{"x-txn-id": "test-txn-2"}, }, }, sh: SinkerFunc(func(ctx context.Context, rch <-chan Datum) Responses { diff --git a/pkg/sourcer/examples/simple_source/go.mod b/pkg/sourcer/examples/simple_source/go.mod index 5eb180a0..c46157e5 100644 --- a/pkg/sourcer/examples/simple_source/go.mod +++ b/pkg/sourcer/examples/simple_source/go.mod @@ -5,6 +5,7 @@ go 1.20 replace github.com/numaproj/numaflow-go => ../../../.. require ( + github.com/google/uuid v1.3.0 github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 github.com/stretchr/testify v1.8.1 ) diff --git a/pkg/sourcer/examples/simple_source/go.sum b/pkg/sourcer/examples/simple_source/go.sum index 0eb6ac02..7e7e9a2c 100644 --- a/pkg/sourcer/examples/simple_source/go.sum +++ b/pkg/sourcer/examples/simple_source/go.sum @@ -7,6 +7,8 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= diff --git a/pkg/sourcer/examples/simple_source/impl/simple_source.go b/pkg/sourcer/examples/simple_source/impl/simple_source.go index bd8c783c..b294850d 100644 --- a/pkg/sourcer/examples/simple_source/impl/simple_source.go +++ b/pkg/sourcer/examples/simple_source/impl/simple_source.go @@ -6,6 +6,8 @@ import ( "sync" "time" + "github.com/google/uuid" + sourcesdk "github.com/numaproj/numaflow-go/pkg/sourcer" ) @@ -52,12 +54,15 @@ func (s *SimpleSource) Read(_ context.Context, readRequest sourcesdk.ReadRequest return default: s.lock.Lock() + headers := map[string]string{ + "x-txn-id": uuid.NewString(), + } // Otherwise, we read the data from the source and send the data to the message channel. offsetValue := serializeOffset(s.readIdx) messageCh <- sourcesdk.NewMessage( []byte(strconv.FormatInt(s.readIdx, 10)), sourcesdk.NewOffsetWithDefaultPartitionId(offsetValue), - time.Now()) + time.Now()).WithHeaders(headers) // Mark the offset as to be acked, and increment the read index. s.toAckSet[s.readIdx] = struct{}{} s.readIdx++ diff --git a/pkg/sourcer/message.go b/pkg/sourcer/message.go index 7bdb26a7..2ea4ea58 100644 --- a/pkg/sourcer/message.go +++ b/pkg/sourcer/message.go @@ -15,6 +15,7 @@ type Message struct { offset Offset eventTime time.Time keys []string + headers map[string]string } // NewMessage creates a Message with value @@ -28,11 +29,22 @@ func (m Message) WithKeys(keys []string) Message { return m } +// WithHeaders is used to assign the headers to the message +func (m Message) WithHeaders(headers map[string]string) Message { + m.headers = headers + return m +} + // Keys returns message keys func (m Message) Keys() []string { return m.keys } +// Headers returns message headers +func (m Message) Headers() map[string]string { + return m.headers +} + // Value returns message value func (m Message) Value() []byte { return m.value @@ -67,7 +79,7 @@ func NewOffsetWithDefaultPartitionId(value []byte) Offset { } // DefaultPartitions returns default partitions for the source. -// It can be used in the Partitions() function of the Sourcer interface only +// It can be used in the Partitions() function of the Sourcer interface only // if the source doesn't have partitions. DefaultPartition will be the pod replica // index of the source. func DefaultPartitions() []int32 { diff --git a/pkg/sourcer/service.go b/pkg/sourcer/service.go index 33d82743..185c0e8f 100644 --- a/pkg/sourcer/service.go +++ b/pkg/sourcer/service.go @@ -76,6 +76,7 @@ func (fs *Service) ReadFn(d *sourcepb.ReadRequest, stream sourcepb.Source_ReadFn Offset: offset, EventTime: timestamppb.New(msg.EventTime()), Keys: msg.Keys(), + Headers: msg.Headers(), }, } // The error here is returned by the stream, which is already a gRPC error diff --git a/pkg/sourcer/service_test.go b/pkg/sourcer/service_test.go index 1f340777..fe6643c8 100644 --- a/pkg/sourcer/service_test.go +++ b/pkg/sourcer/service_test.go @@ -24,7 +24,7 @@ var testPartitions = []int32{1, 3, 5} type TestSource struct{} func (ts TestSource) Read(_ context.Context, _ ReadRequest, messageCh chan<- Message) { - msg := NewMessage([]byte(`test`), Offset{}, testEventTime) + msg := NewMessage([]byte(`test`), Offset{}, testEventTime).WithHeaders(map[string]string{"x-txn-id": "test-txn-id"}) messageCh <- msg.WithKeys([]string{testKey}) } @@ -120,6 +120,7 @@ func TestService_ReadFn(t *testing.T) { Offset: &sourcepb.Offset{}, EventTime: timestamppb.New(testEventTime), Keys: []string{testKey}, + Headers: map[string]string{"x-txn-id": "test-txn-id"}, }, }, }, @@ -140,6 +141,7 @@ func TestService_ReadFn(t *testing.T) { Offset: &sourcepb.Offset{}, EventTime: timestamppb.New(testEventTime), Keys: []string{testKey}, + Headers: map[string]string{"x-txn-id": "test-txn-id"}, }, }, }, diff --git a/pkg/sourcetransformer/interface.go b/pkg/sourcetransformer/interface.go index 4b1fd609..131e100c 100644 --- a/pkg/sourcetransformer/interface.go +++ b/pkg/sourcetransformer/interface.go @@ -7,9 +7,14 @@ import ( // Datum contains methods to get the payload information. type Datum interface { + // Value returns the payload of the message. Value() []byte + // EventTime returns the event time of the message. EventTime() time.Time + // Watermark returns the watermark of the message. Watermark() time.Time + // Headers returns the headers of the message. + Headers() map[string]string } // SourceTransformer is the interface of SourceTransformer function implementation. diff --git a/pkg/sourcetransformer/service.go b/pkg/sourcetransformer/service.go index 327c7fdd..004e13dc 100644 --- a/pkg/sourcetransformer/service.go +++ b/pkg/sourcetransformer/service.go @@ -32,7 +32,7 @@ func (fs *Service) IsReady(context.Context, *emptypb.Empty) (*v1.ReadyResponse, // In addition to map function, SourceTransformFn also supports assigning a new event time to response. // SourceTransformFn can be used only at source vertex by source data transformer. func (fs *Service) SourceTransformFn(ctx context.Context, d *v1.SourceTransformRequest) (*v1.SourceTransformResponse, error) { - var hd = NewHandlerDatum(d.GetValue(), d.EventTime.AsTime(), d.Watermark.AsTime()) + var hd = NewHandlerDatum(d.GetValue(), d.EventTime.AsTime(), d.Watermark.AsTime(), d.Headers) messageTs := fs.Transformer.Transform(ctx, d.GetKeys(), hd) var results []*v1.SourceTransformResponse_Result for _, m := range messageTs.Items() { diff --git a/pkg/sourcetransformer/types.go b/pkg/sourcetransformer/types.go index 472d0f26..ad1a2290 100644 --- a/pkg/sourcetransformer/types.go +++ b/pkg/sourcetransformer/types.go @@ -9,13 +9,15 @@ type handlerDatum struct { value []byte eventTime time.Time watermark time.Time + headers map[string]string } -func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time) Datum { +func NewHandlerDatum(value []byte, eventTime time.Time, watermark time.Time, headers map[string]string) Datum { return &handlerDatum{ value: value, eventTime: eventTime, watermark: watermark, + headers: headers, } } @@ -30,3 +32,7 @@ func (h *handlerDatum) EventTime() time.Time { func (h *handlerDatum) Watermark() time.Time { return h.watermark } + +func (h *handlerDatum) Headers() map[string]string { + return h.headers +}