From da125e323c630b1fa2679fca36e02b24d2a5ee5e Mon Sep 17 00:00:00 2001 From: Travis Turner Date: Wed, 21 Feb 2018 14:56:38 -0600 Subject: [PATCH] broadcast.SendSync field creation and deletion to all nodes --- broadcast.go | 10 + handler.go | 31 +- internal/private.pb.go | 634 +++++++++++++++++++++++++++++++++++------ internal/private.proto | 12 + server.go | 11 + 5 files changed, 607 insertions(+), 91 deletions(-) diff --git a/broadcast.go b/broadcast.go index 38eb53b96..bc3593a2c 100644 --- a/broadcast.go +++ b/broadcast.go @@ -132,6 +132,8 @@ const ( MessageTypeCreateInputDefinition = 6 MessageTypeDeleteInputDefinition = 7 MessageTypeDeleteView = 8 + MessageTypeCreateField = 9 + MessageTypeDeleteField = 10 ) // MarshalMessage encodes the protobuf message into a byte slice. @@ -148,6 +150,10 @@ func MarshalMessage(m proto.Message) ([]byte, error) { typ = MessageTypeCreateFrame case *internal.DeleteFrameMessage: typ = MessageTypeDeleteFrame + case *internal.CreateFieldMessage: + typ = MessageTypeCreateField + case *internal.DeleteFieldMessage: + typ = MessageTypeDeleteField case *internal.CreateInputDefinitionMessage: typ = MessageTypeCreateInputDefinition case *internal.DeleteInputDefinitionMessage: @@ -180,6 +186,10 @@ func UnmarshalMessage(buf []byte) (proto.Message, error) { m = &internal.CreateFrameMessage{} case MessageTypeDeleteFrame: m = &internal.DeleteFrameMessage{} + case MessageTypeCreateField: + m = &internal.CreateFieldMessage{} + case MessageTypeDeleteField: + m = &internal.DeleteFieldMessage{} case MessageTypeCreateInputDefinition: m = &internal.CreateInputDefinitionMessage{} case MessageTypeDeleteInputDefinition: diff --git a/handler.go b/handler.go index e5cce4648..1a67d79be 100644 --- a/handler.go +++ b/handler.go @@ -648,7 +648,6 @@ func (h *Handler) handlePostFrame(w http.ResponseWriter, r *http.Request) { } h.Holder.Stats.CountWithCustomTags("createFrame", 1, 1.0, []string{fmt.Sprintf("index:%s", indexName)}) - } type _postFrameRequest postFrameRequest @@ -800,17 +799,30 @@ func (h *Handler) handlePostFrameField(w http.ResponseWriter, r *http.Request) { return } - // Create new field. - if err := f.CreateField(&Field{ + field := &Field{ Name: fieldName, Type: req.Type, Min: req.Min, Max: req.Max, - }); err != nil { + } + + // Create new field. + if err := f.CreateField(field); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } + // Send the create field message to all nodes. + err := h.Broadcaster.SendSync( + &internal.CreateFieldMessage{ + Index: indexName, + Frame: frameName, + Field: encodeField(field), + }) + if err != nil { + h.logger().Printf("problem sending CreateField message: %s", err) + } + // Encode response. if err := json.NewEncoder(w).Encode(postFrameFieldResponse{}); err != nil { h.logger().Printf("response encoding error: %s", err) @@ -844,6 +856,17 @@ func (h *Handler) handleDeleteFrameField(w http.ResponseWriter, r *http.Request) return } + // Send the delete field message to all nodes. + err := h.Broadcaster.SendSync( + &internal.DeleteFieldMessage{ + Index: indexName, + Frame: frameName, + Field: fieldName, + }) + if err != nil { + h.logger().Printf("problem sending DeleteField message: %s", err) + } + // Encode response. if err := json.NewEncoder(w).Encode(deleteFrameFieldResponse{}); err != nil { h.logger().Printf("response encoding error: %s", err) diff --git a/internal/private.pb.go b/internal/private.pb.go index 1c26aa307..63f2ca581 100644 --- a/internal/private.pb.go +++ b/internal/private.pb.go @@ -21,6 +21,8 @@ CreateIndexMessage CreateFrameMessage DeleteFrameMessage + CreateFieldMessage + DeleteFieldMessage Frame Index InputDefinition @@ -389,6 +391,70 @@ func (m *DeleteFrameMessage) GetFrame() string { return "" } +type CreateFieldMessage struct { + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + Field *Field `protobuf:"bytes,3,opt,name=Field" json:"Field,omitempty"` +} + +func (m *CreateFieldMessage) Reset() { *m = CreateFieldMessage{} } +func (m *CreateFieldMessage) String() string { return proto.CompactTextString(m) } +func (*CreateFieldMessage) ProtoMessage() {} +func (*CreateFieldMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{12} } + +func (m *CreateFieldMessage) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +func (m *CreateFieldMessage) GetFrame() string { + if m != nil { + return m.Frame + } + return "" +} + +func (m *CreateFieldMessage) GetField() *Field { + if m != nil { + return m.Field + } + return nil +} + +type DeleteFieldMessage struct { + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + Field string `protobuf:"bytes,3,opt,name=Field,proto3" json:"Field,omitempty"` +} + +func (m *DeleteFieldMessage) Reset() { *m = DeleteFieldMessage{} } +func (m *DeleteFieldMessage) String() string { return proto.CompactTextString(m) } +func (*DeleteFieldMessage) ProtoMessage() {} +func (*DeleteFieldMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{13} } + +func (m *DeleteFieldMessage) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +func (m *DeleteFieldMessage) GetFrame() string { + if m != nil { + return m.Frame + } + return "" +} + +func (m *DeleteFieldMessage) GetField() string { + if m != nil { + return m.Field + } + return "" +} + type Frame struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Meta *FrameMeta `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"` @@ -397,7 +463,7 @@ type Frame struct { func (m *Frame) Reset() { *m = Frame{} } func (m *Frame) String() string { return proto.CompactTextString(m) } func (*Frame) ProtoMessage() {} -func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{12} } +func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{14} } func (m *Frame) GetName() string { if m != nil { @@ -425,7 +491,7 @@ type Index struct { func (m *Index) Reset() { *m = Index{} } func (m *Index) String() string { return proto.CompactTextString(m) } func (*Index) ProtoMessage() {} -func (*Index) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{13} } +func (*Index) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{15} } func (m *Index) GetName() string { if m != nil { @@ -478,7 +544,7 @@ type InputDefinition struct { func (m *InputDefinition) Reset() { *m = InputDefinition{} } func (m *InputDefinition) String() string { return proto.CompactTextString(m) } func (*InputDefinition) ProtoMessage() {} -func (*InputDefinition) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{14} } +func (*InputDefinition) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{16} } func (m *InputDefinition) GetName() string { if m != nil { @@ -510,7 +576,7 @@ type InputDefinitionField struct { func (m *InputDefinitionField) Reset() { *m = InputDefinitionField{} } func (m *InputDefinitionField) String() string { return proto.CompactTextString(m) } func (*InputDefinitionField) ProtoMessage() {} -func (*InputDefinitionField) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{15} } +func (*InputDefinitionField) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{17} } func (m *InputDefinitionField) GetName() string { if m != nil { @@ -543,7 +609,7 @@ type InputDefinitionAction struct { func (m *InputDefinitionAction) Reset() { *m = InputDefinitionAction{} } func (m *InputDefinitionAction) String() string { return proto.CompactTextString(m) } func (*InputDefinitionAction) ProtoMessage() {} -func (*InputDefinitionAction) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{16} } +func (*InputDefinitionAction) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{18} } func (m *InputDefinitionAction) GetFrame() string { if m != nil { @@ -582,7 +648,7 @@ func (m *CreateInputDefinitionMessage) Reset() { *m = CreateInputDefinit func (m *CreateInputDefinitionMessage) String() string { return proto.CompactTextString(m) } func (*CreateInputDefinitionMessage) ProtoMessage() {} func (*CreateInputDefinitionMessage) Descriptor() ([]byte, []int) { - return fileDescriptorPrivate, []int{17} + return fileDescriptorPrivate, []int{19} } func (m *CreateInputDefinitionMessage) GetIndex() string { @@ -608,7 +674,7 @@ func (m *DeleteInputDefinitionMessage) Reset() { *m = DeleteInputDefinit func (m *DeleteInputDefinitionMessage) String() string { return proto.CompactTextString(m) } func (*DeleteInputDefinitionMessage) ProtoMessage() {} func (*DeleteInputDefinitionMessage) Descriptor() ([]byte, []int) { - return fileDescriptorPrivate, []int{18} + return fileDescriptorPrivate, []int{20} } func (m *DeleteInputDefinitionMessage) GetIndex() string { @@ -635,7 +701,7 @@ type NodeStatus struct { func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (m *NodeStatus) String() string { return proto.CompactTextString(m) } func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{19} } +func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{21} } func (m *NodeStatus) GetHost() string { if m != nil { @@ -672,7 +738,7 @@ type ClusterStatus struct { func (m *ClusterStatus) Reset() { *m = ClusterStatus{} } func (m *ClusterStatus) String() string { return proto.CompactTextString(m) } func (*ClusterStatus) ProtoMessage() {} -func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{20} } +func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{22} } func (m *ClusterStatus) GetNodes() []*NodeStatus { if m != nil { @@ -688,7 +754,7 @@ type FrameSchema struct { func (m *FrameSchema) Reset() { *m = FrameSchema{} } func (m *FrameSchema) String() string { return proto.CompactTextString(m) } func (*FrameSchema) ProtoMessage() {} -func (*FrameSchema) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{21} } +func (*FrameSchema) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{23} } func (m *FrameSchema) GetFields() []*Field { if m != nil { @@ -707,7 +773,7 @@ type Field struct { func (m *Field) Reset() { *m = Field{} } func (m *Field) String() string { return proto.CompactTextString(m) } func (*Field) ProtoMessage() {} -func (*Field) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{22} } +func (*Field) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{24} } func (m *Field) GetName() string { if m != nil { @@ -746,7 +812,7 @@ type DeleteViewMessage struct { func (m *DeleteViewMessage) Reset() { *m = DeleteViewMessage{} } func (m *DeleteViewMessage) String() string { return proto.CompactTextString(m) } func (*DeleteViewMessage) ProtoMessage() {} -func (*DeleteViewMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{23} } +func (*DeleteViewMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{25} } func (m *DeleteViewMessage) GetIndex() string { if m != nil { @@ -782,6 +848,8 @@ func init() { proto.RegisterType((*CreateIndexMessage)(nil), "internal.CreateIndexMessage") proto.RegisterType((*CreateFrameMessage)(nil), "internal.CreateFrameMessage") proto.RegisterType((*DeleteFrameMessage)(nil), "internal.DeleteFrameMessage") + proto.RegisterType((*CreateFieldMessage)(nil), "internal.CreateFieldMessage") + proto.RegisterType((*DeleteFieldMessage)(nil), "internal.DeleteFieldMessage") proto.RegisterType((*Frame)(nil), "internal.Frame") proto.RegisterType((*Index)(nil), "internal.Index") proto.RegisterType((*InputDefinition)(nil), "internal.InputDefinition") @@ -1256,6 +1324,82 @@ func (m *DeleteFrameMessage) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *CreateFieldMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateFieldMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Index) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i += copy(dAtA[i:], m.Index) + } + if len(m.Frame) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Frame))) + i += copy(dAtA[i:], m.Frame) + } + if m.Field != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Field.Size())) + n9, err := m.Field.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *DeleteFieldMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteFieldMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Index) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i += copy(dAtA[i:], m.Index) + } + if len(m.Frame) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Frame))) + i += copy(dAtA[i:], m.Frame) + } + if len(m.Field) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) + } + return i, nil +} + func (m *Frame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1281,11 +1425,11 @@ func (m *Frame) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Meta.Size())) - n9, err := m.Meta.MarshalTo(dAtA[i:]) + n10, err := m.Meta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n10 } return i, nil } @@ -1315,11 +1459,11 @@ func (m *Index) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Meta.Size())) - n10, err := m.Meta.MarshalTo(dAtA[i:]) + n11, err := m.Meta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n11 } if m.MaxSlice != 0 { dAtA[i] = 0x18 @@ -1339,21 +1483,21 @@ func (m *Index) MarshalTo(dAtA []byte) (int, error) { } } if len(m.Slices) > 0 { - dAtA12 := make([]byte, len(m.Slices)*10) - var j11 int + dAtA13 := make([]byte, len(m.Slices)*10) + var j12 int for _, num := range m.Slices { for num >= 1<<7 { - dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j11++ + j12++ } - dAtA12[j11] = uint8(num) - j11++ + dAtA13[j12] = uint8(num) + j12++ } dAtA[i] = 0x2a i++ - i = encodeVarintPrivate(dAtA, i, uint64(j11)) - i += copy(dAtA[i:], dAtA12[:j11]) + i = encodeVarintPrivate(dAtA, i, uint64(j12)) + i += copy(dAtA[i:], dAtA13[:j12]) } if len(m.InputDefinitions) > 0 { for _, msg := range m.InputDefinitions { @@ -1540,11 +1684,11 @@ func (m *CreateInputDefinitionMessage) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Definition.Size())) - n13, err := m.Definition.MarshalTo(dAtA[i:]) + n14, err := m.Definition.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n14 } return i, nil } @@ -1990,6 +2134,42 @@ func (m *DeleteFrameMessage) Size() (n int) { return n } +func (m *CreateFieldMessage) Size() (n int) { + var l int + _ = l + l = len(m.Index) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } + l = len(m.Frame) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } + if m.Field != nil { + l = m.Field.Size() + n += 1 + l + sovPrivate(uint64(l)) + } + return n +} + +func (m *DeleteFieldMessage) Size() (n int) { + var l int + _ = l + l = len(m.Index) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } + l = len(m.Frame) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } + l = len(m.Field) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } + return n +} + func (m *Frame) Size() (n int) { var l int _ = l @@ -3822,6 +4002,284 @@ func (m *DeleteFrameMessage) Unmarshal(dAtA []byte) error { } return nil } +func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateFieldMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateFieldMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Frame = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field == nil { + m.Field = &Field{} + } + if err := m.Field.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteFieldMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteFieldMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Frame = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Frame) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5634,65 +6092,67 @@ var ( func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) } var fileDescriptorPrivate = []byte{ - // 948 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xc1, 0x6e, 0x23, 0x45, - 0x10, 0x65, 0x3c, 0x63, 0xaf, 0x5d, 0x26, 0x1b, 0xa7, 0x09, 0x2b, 0x6f, 0x14, 0x19, 0xab, 0x0f, - 0x6c, 0x88, 0x44, 0x0e, 0x41, 0x5a, 0x01, 0xcb, 0x01, 0x36, 0xce, 0x2a, 0x16, 0x78, 0x81, 0xf6, - 0x6a, 0xb9, 0x21, 0x75, 0x9c, 0x62, 0x77, 0x94, 0xf1, 0x8c, 0x99, 0x69, 0x27, 0x31, 0x07, 0x8e, - 0x7c, 0x03, 0x12, 0x47, 0x7e, 0x86, 0x23, 0x9f, 0x80, 0xc2, 0x85, 0x3f, 0x40, 0xe2, 0x84, 0xba, - 0xba, 0x7b, 0x66, 0x6c, 0xc7, 0x8e, 0xb2, 0xb7, 0xae, 0x57, 0xd5, 0x55, 0xaf, 0xab, 0xab, 0xaa, - 0x1b, 0x36, 0x26, 0x69, 0x78, 0x21, 0x15, 0x1e, 0x4c, 0xd2, 0x44, 0x25, 0xac, 0x1e, 0xc6, 0x0a, - 0xd3, 0x58, 0x46, 0xfc, 0x6b, 0x68, 0xf4, 0xe3, 0x33, 0xbc, 0x1a, 0xa0, 0x92, 0xac, 0x0b, 0xcd, - 0xa3, 0x24, 0x9a, 0x8e, 0xe3, 0xaf, 0xe4, 0x29, 0x46, 0x6d, 0xaf, 0xeb, 0xed, 0x35, 0x44, 0x19, - 0xd2, 0x16, 0x2f, 0xc2, 0x31, 0x7e, 0x3b, 0x95, 0xb1, 0x9a, 0x8e, 0xdb, 0x15, 0x63, 0x51, 0x82, - 0xf8, 0x7f, 0x1e, 0x34, 0x9e, 0xa5, 0x72, 0x8c, 0xe4, 0x71, 0x07, 0xea, 0x22, 0xb9, 0x2c, 0xbb, - 0xcb, 0x65, 0xf6, 0x3e, 0xdc, 0xef, 0xc7, 0x17, 0x98, 0x66, 0x78, 0x1c, 0xcb, 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, 0x78, 0x7f, 0x5e, 0x77, 0xbc, 0xbf, 0xae, 0x3b, 0xde, 0xaf, 0x7f, 0x77, 0xde, - 0x3a, 0xad, 0xd1, 0xaf, 0xf2, 0xa3, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x47, 0xdd, 0xdd, 0x8e, - 0x66, 0x0a, 0x00, 0x00, + // 978 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0x23, 0x45, + 0x10, 0x66, 0xfc, 0xb7, 0x76, 0x99, 0x24, 0x4e, 0x13, 0x56, 0xde, 0x28, 0x32, 0x56, 0x4b, 0xb0, + 0x21, 0x12, 0x39, 0x04, 0x69, 0x05, 0x2c, 0x07, 0xd8, 0x38, 0xab, 0x58, 0xe0, 0x05, 0xda, 0xab, + 0x70, 0x43, 0xea, 0x38, 0x45, 0x32, 0xca, 0x78, 0xc6, 0xcc, 0xb4, 0x93, 0x98, 0x03, 0x47, 0x9e, + 0x01, 0x89, 0x23, 0x2f, 0xc3, 0x91, 0x47, 0x40, 0xe1, 0xc2, 0x1b, 0x20, 0x71, 0x5a, 0x75, 0x75, + 0xf7, 0xcc, 0xf8, 0x37, 0x4a, 0x6e, 0x5d, 0x5f, 0xd7, 0xcf, 0xd7, 0xd5, 0x55, 0xd5, 0x0d, 0x6b, + 0xa3, 0xd8, 0xbf, 0x92, 0x0a, 0xf7, 0x47, 0x71, 0xa4, 0x22, 0x56, 0xf5, 0x43, 0x85, 0x71, 0x28, + 0x03, 0xfe, 0x0d, 0xd4, 0xba, 0xe1, 0x19, 0xde, 0xf4, 0x50, 0x49, 0xd6, 0x86, 0xfa, 0x61, 0x14, + 0x8c, 0x87, 0xe1, 0xd7, 0xf2, 0x14, 0x83, 0xa6, 0xd7, 0xf6, 0x76, 0x6b, 0x22, 0x0f, 0x69, 0x8d, + 0xd7, 0xfe, 0x10, 0xbf, 0x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 0x61, 0x54, 0xf8, + 0x33, 0xa8, 0x53, 0x15, 0x91, 0x2f, 0x99, 0xfb, 0xfb, 0x78, 0xab, 0xff, 0x3e, 0x7d, 0x3b, 0x1a, + 0x17, 0xb6, 0x0e, 0x83, 0x12, 0x7d, 0xdf, 0x6c, 0x82, 0xe8, 0xe7, 0xd6, 0x80, 0x62, 0xcf, 0x37, + 0xd7, 0x53, 0x14, 0x7a, 0x49, 0x88, 0xbc, 0xa1, 0xc3, 0x68, 0x44, 0xea, 0xc7, 0x71, 0xd3, 0x5c, + 0x87, 0xfe, 0xba, 0x3c, 0x64, 0x60, 0xbb, 0x1f, 0x50, 0x31, 0xfb, 0x01, 0xbd, 0x68, 0xfc, 0x79, + 0xdb, 0xf2, 0xfe, 0xba, 0x6d, 0x79, 0x7f, 0xdf, 0xb6, 0xbc, 0xdf, 0xfe, 0x69, 0xbd, 0x75, 0x5a, + 0xa1, 0x6f, 0xf1, 0xc7, 0x6f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x93, 0xbf, 0xbc, 0x1f, 0x27, 0x0b, + 0x00, 0x00, } diff --git a/internal/private.proto b/internal/private.proto index 083316ddd..ed664115a 100644 --- a/internal/private.proto +++ b/internal/private.proto @@ -68,6 +68,18 @@ message DeleteFrameMessage { string Frame = 2; } +message CreateFieldMessage { + string Index = 1; + string Frame = 2; + Field Field = 3; +} + +message DeleteFieldMessage { + string Index = 1; + string Frame = 2; + string Field = 3; +} + message Frame { string Name = 1; FrameMeta Meta = 2; diff --git a/server.go b/server.go index 83d417abd..95dff018d 100644 --- a/server.go +++ b/server.go @@ -404,6 +404,17 @@ func (s *Server) ReceiveMessage(pb proto.Message) error { if err := idx.DeleteFrame(obj.Frame); err != nil { return err } + case *internal.CreateFieldMessage: + f := s.Holder.Frame(obj.Index, obj.Frame) + field := decodeField(obj.Field) + if err := f.CreateField(field); err != nil { + return err + } + case *internal.DeleteFieldMessage: + f := s.Holder.Frame(obj.Index, obj.Frame) + if err := f.DeleteField(obj.Field); err != nil { + return err + } case *internal.CreateInputDefinitionMessage: idx := s.Holder.Index(obj.Index) if idx == nil {