VOL-1460 Updated core to use voltha-protos instead of local protos
Moved protos to python directory in order to maintain functionaly of containers built there.
Added capability to do local builds of protos
Added instructions on running dep ensure for getting protos.
Updated github.com/golang/protobuf version to v1.3.1
Change-Id: Ia6ef55f07f0d5dcb5b750d7c37b21b71db85bfc4
diff --git a/vendor/gopkg.in/Shopify/sarama.v1/message.go b/vendor/gopkg.in/Shopify/sarama.v1/message.go
index 51d3309..f64c79b 100644
--- a/vendor/gopkg.in/Shopify/sarama.v1/message.go
+++ b/vendor/gopkg.in/Shopify/sarama.v1/message.go
@@ -5,12 +5,15 @@
"time"
)
-// CompressionCodec represents the various compression codecs recognized by Kafka in messages.
-type CompressionCodec int8
-
// The lowest 3 bits contain the compression codec used for the message
const compressionCodecMask int8 = 0x07
+// Bit 3 set for "LogAppend" timestamps
+const timestampTypeMask = 0x08
+
+// CompressionCodec represents the various compression codecs recognized by Kafka in messages.
+type CompressionCodec int8
+
const (
CompressionNone CompressionCodec = 0
CompressionGZIP CompressionCodec = 1
@@ -36,6 +39,7 @@
type Message struct {
Codec CompressionCodec // codec used to compress the message contents
CompressionLevel int // compression level
+ LogAppendTime bool // the used timestamp is LogAppendTime
Key []byte // the message key, may be nil
Value []byte // the message contents
Set *MessageSet // the message set a message might wrap
@@ -52,6 +56,9 @@
pe.putInt8(m.Version)
attributes := int8(m.Codec) & compressionCodecMask
+ if m.LogAppendTime {
+ attributes |= timestampTypeMask
+ }
pe.putInt8(attributes)
if m.Version >= 1 {
@@ -108,6 +115,7 @@
return err
}
m.Codec = CompressionCodec(attribute & compressionCodecMask)
+ m.LogAppendTime = attribute×tampTypeMask == timestampTypeMask
if m.Version == 1 {
if err := (Timestamp{&m.Timestamp}).decode(pd); err != nil {
@@ -149,7 +157,7 @@
return pd.pop()
}
-// decodes a message set from a previousy encoded bulk-message
+// decodes a message set from a previously encoded bulk-message
func (m *Message) decodeSet() (err error) {
pd := realDecoder{raw: m.Value}
m.Set = &MessageSet{}