func (p *ThriftFlumeEvent) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("body", thrift.STRING, 2); err != nil { return fmt.Errorf("%T write field begin error 2:body: %s", p, err) } if err := oprot.WriteBinary(p.Body); err != nil { return fmt.Errorf("%T.body (2) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 2:body: %s", p, err) } return err }
func (p *AppendArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("event", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:event: %s", p, err) } if err := p.Event.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", p.Event, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:event: %s", p, err) } return err }
func (p *AppendBatchResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.I32, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) } if err := oprot.WriteI32(int32(*p.Success)); err != nil { return fmt.Errorf("%T.success (0) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 0:success: %s", p, err) } } return err }
func (p *AppendBatchArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("events", thrift.LIST, 1); err != nil { return fmt.Errorf("%T write field begin error 1:events: %s", p, err) } if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Events)); err != nil { return fmt.Errorf("error writing list begin: %s", err) } for _, v := range p.Events { if err := v.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", v, err) } } if err := oprot.WriteListEnd(); err != nil { return fmt.Errorf("error writing list end: %s", err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:events: %s", p, err) } return err }
func (p *ThriftFlumeEvent) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("headers", thrift.MAP, 1); err != nil { return fmt.Errorf("%T write field begin error 1:headers: %s", p, err) } if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Headers)); err != nil { return fmt.Errorf("error writing map begin: %s", err) } for k, v := range p.Headers { if err := oprot.WriteString(string(k)); err != nil { return fmt.Errorf("%T. (0) field write error: %s", p, err) } if err := oprot.WriteString(string(v)); err != nil { return fmt.Errorf("%T. (0) field write error: %s", p, err) } } if err := oprot.WriteMapEnd(); err != nil { return fmt.Errorf("error writing map end: %s", err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:headers: %s", p, err) } return err }