Compare commits

...

3 Commits

4 changed files with 79 additions and 45 deletions

View File

@ -36,6 +36,8 @@ type Header struct {
Project string `protobuf:"bytes,9,opt,name=project,proto3" json:"project,omitempty"`
CallID string `protobuf:"bytes,10,opt,name=callID,proto3" json:"callID,omitempty"`
CallPrevID string `protobuf:"bytes,11,opt,name=callPrevID,proto3" json:"callPrevID,omitempty"`
PayloadSize int64 `protobuf:"varint,12,opt,name=payloadSize,proto3" json:"payloadSize,omitempty"`
PayloadS3Uri string `protobuf:"bytes,13,opt,name=payloadS3Uri,proto3" json:"payloadS3Uri,omitempty"`
}
func (x *Header) Reset() {
@ -147,6 +149,20 @@ func (x *Header) GetCallPrevID() string {
return ""
}
func (x *Header) GetPayloadSize() int64 {
if x != nil {
return x.PayloadSize
}
return 0
}
func (x *Header) GetPayloadS3Uri() string {
if x != nil {
return x.PayloadS3Uri
}
return ""
}
var File_protobuf_header_proto protoreflect.FileDescriptor
var file_protobuf_header_proto_rawDesc = []byte{
@ -155,7 +171,7 @@ var file_protobuf_header_proto_rawDesc = []byte{
0x1a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x2d,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74,
0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x05, 0x0a, 0x06,
0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x06, 0x0a, 0x06,
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
@ -185,25 +201,30 @@ var file_protobuf_header_proto_rawDesc = []byte{
0x06, 0x63, 0x61, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63,
0x61, 0x6c, 0x6c, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x50, 0x72, 0x65,
0x76, 0x49, 0x44, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x50,
0x72, 0x65, 0x76, 0x49, 0x44, 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, 0x1a, 0x54, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x4f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d,
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, 0x1a, 0x42, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x65, 0x76, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
0x53, 0x69, 0x7a, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f,
0x61, 0x64, 0x53, 0x33, 0x55, 0x72, 0x69, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x33, 0x55, 0x72, 0x69, 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, 0x1a, 0x54, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79,
0x41, 0x72, 0x67, 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, 0x2c, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x74,
0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e,
0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a,
0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 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, 0x1a, 0x42, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 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, 0x42, 0x0b, 0x5a, 0x09,
0x2e, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (

View File

@ -114,7 +114,7 @@ func (x *ListOfFiles) GetFile() []*ListOfFiles_File {
return nil
}
type ListOfBinaryes struct {
type ListOfBinaries struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -122,8 +122,8 @@ type ListOfBinaryes struct {
Value [][]byte `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
}
func (x *ListOfBinaryes) Reset() {
*x = ListOfBinaryes{}
func (x *ListOfBinaries) Reset() {
*x = ListOfBinaries{}
if protoimpl.UnsafeEnabled {
mi := &file_protobuf_list_values_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -131,13 +131,13 @@ func (x *ListOfBinaryes) Reset() {
}
}
func (x *ListOfBinaryes) String() string {
func (x *ListOfBinaries) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListOfBinaryes) ProtoMessage() {}
func (*ListOfBinaries) ProtoMessage() {}
func (x *ListOfBinaryes) ProtoReflect() protoreflect.Message {
func (x *ListOfBinaries) ProtoReflect() protoreflect.Message {
mi := &file_protobuf_list_values_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -149,12 +149,12 @@ func (x *ListOfBinaryes) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use ListOfBinaryes.ProtoReflect.Descriptor instead.
func (*ListOfBinaryes) Descriptor() ([]byte, []int) {
// Deprecated: Use ListOfBinaries.ProtoReflect.Descriptor instead.
func (*ListOfBinaries) Descriptor() ([]byte, []int) {
return file_protobuf_list_values_proto_rawDescGZIP(), []int{2}
}
func (x *ListOfBinaryes) GetValue() [][]byte {
func (x *ListOfBinaries) GetValue() [][]byte {
if x != nil {
return x.Value
}
@ -170,6 +170,7 @@ type ListOfFiles_File struct {
ContentType []string `protobuf:"bytes,2,rep,name=contentType,proto3" json:"contentType,omitempty"`
Size int64 `protobuf:"zigzag64,3,opt,name=size,proto3" json:"size,omitempty"`
Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
S3Uri string `protobuf:"bytes,5,opt,name=s3Uri,proto3" json:"s3Uri,omitempty"`
}
func (x *ListOfFiles_File) Reset() {
@ -232,6 +233,13 @@ func (x *ListOfFiles_File) GetContent() []byte {
return nil
}
func (x *ListOfFiles_File) GetS3Uri() string {
if x != nil {
return x.S3Uri
}
return ""
}
var File_protobuf_list_values_proto protoreflect.FileDescriptor
var file_protobuf_list_values_proto_rawDesc = []byte{
@ -239,22 +247,24 @@ var file_protobuf_list_values_proto_rawDesc = []byte{
0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6e, 0x65,
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x25, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x53,
0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb0, 0x01, 0x0a,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc7, 0x01, 0x0a,
0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x04,
0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x74,
0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x46, 0x69, 0x6c, 0x65, 0x73,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x72, 0x0a, 0x04, 0x46,
0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52,
0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22,
0x26, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x65,
0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6e, 0x65, 0x74,
0x77, 0x6f, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x88, 0x01, 0x0a, 0x04,
0x46, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18,
0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79,
0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12,
0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x12, 0x14, 0x0a, 0x05, 0x73, 0x33, 0x55, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x73, 0x33, 0x55, 0x72, 0x69, 0x22, 0x26, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66,
0x42, 0x69, 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b,
0x5a, 0x09, 0x2e, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@ -273,7 +283,7 @@ var file_protobuf_list_values_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_protobuf_list_values_proto_goTypes = []interface{}{
(*ListOfStrings)(nil), // 0: network.ListOfStrings
(*ListOfFiles)(nil), // 1: network.ListOfFiles
(*ListOfBinaryes)(nil), // 2: network.ListOfBinaryes
(*ListOfBinaries)(nil), // 2: network.ListOfBinaries
(*ListOfFiles_File)(nil), // 3: network.ListOfFiles.File
}
var file_protobuf_list_values_proto_depIdxs = []int32{
@ -316,7 +326,7 @@ func file_protobuf_list_values_proto_init() {
}
}
file_protobuf_list_values_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListOfBinaryes); i {
switch v := v.(*ListOfBinaries); i {
case 0:
return &v.state
case 1:

@ -1 +1 @@
Subproject commit 0614836308d39991470fabf39be6caf2f0dfba68
Subproject commit 0be663c0cdbcbd9620d0b68a6824e62d5d38dcb8

View File

@ -477,6 +477,9 @@ func (serve *Serve) CallAsync(name string, header *network.Header, payload []byt
header.CallPrevID = header.CallID
header.CallID = metadata.CallID
header.Project = serve.projectName
if header.PayloadSize == 0 {
header.PayloadSize = int64(len(payload))
}
pkg := network.Function{
Header: header,
Payload: payload,