diff --git a/mesosproto/allocator.pb.go b/mesosproto/allocator.pb.go new file mode 100644 index 00000000..8530419e --- /dev/null +++ b/mesosproto/allocator.pb.go @@ -0,0 +1,1179 @@ +// Code generated by protoc-gen-gogo. +// source: allocator.proto +// DO NOT EDIT! + +/* + Package mesosproto is a generated protocol buffer package. + + It is generated from these files: + allocator.proto + authentication.proto + authorizer.proto + containerizer.proto + internal.proto + log.proto + maintenance.proto + mesos.proto + messages.proto + registry.proto + scheduler.proto + state.proto + + It has these top-level messages: + RoleInfo + InverseOfferStatus + AuthenticateMessage + AuthenticationMechanismsMessage + AuthenticationStartMessage + AuthenticationStepMessage + AuthenticationCompletedMessage + AuthenticationFailedMessage + AuthenticationErrorMessage + ACL + ACLs + Launch + Update + Wait + Destroy + Usage + Termination + Containers + InternalMasterChangeDetected + InternalTryAuthentication + InternalAuthenticationResult + Promise + Action + Metadata + Record + PromiseRequest + PromiseResponse + WriteRequest + WriteResponse + LearnedMessage + RecoverRequest + RecoverResponse + Window + Schedule + ClusterStatus + FrameworkID + OfferID + SlaveID + TaskID + ExecutorID + ContainerID + TimeInfo + DurationInfo + Address + URL + Unavailability + MachineID + MachineInfo + FrameworkInfo + HealthCheck + CommandInfo + ExecutorInfo + MasterInfo + SlaveInfo + Value + Attribute + Resource + TrafficControlStatistics + ResourceStatistics + ResourceUsage + PerfStatistics + Request + Offer + InverseOffer + TaskInfo + TaskStatus + Filters + Environment + Parameter + Parameters + Credential + Credentials + RateLimit + RateLimits + Image + Volume + NetworkInfo + ContainerInfo + ContainerStatus + Labels + Label + Port + Ports + DiscoveryInfo + AppcImageManifest + Task + StatusUpdate + StatusUpdateRecord + SubmitSchedulerRequest + SubmitSchedulerResponse + ExecutorToFrameworkMessage + FrameworkToExecutorMessage + RegisterFrameworkMessage + ReregisterFrameworkMessage + FrameworkRegisteredMessage + FrameworkReregisteredMessage + UnregisterFrameworkMessage + DeactivateFrameworkMessage + ResourceRequestMessage + ResourceOffersMessage + LaunchTasksMessage + RescindResourceOfferMessage + ReviveOffersMessage + RunTaskMessage + KillTaskMessage + StatusUpdateMessage + StatusUpdateAcknowledgementMessage + LostSlaveMessage + ReconcileTasksMessage + FrameworkErrorMessage + RegisterSlaveMessage + ReregisterSlaveMessage + SlaveRegisteredMessage + SlaveReregisteredMessage + UnregisterSlaveMessage + MasterSlaveConnection + PingSlaveMessage + PongSlaveMessage + ShutdownFrameworkMessage + ShutdownExecutorMessage + UpdateFrameworkMessage + CheckpointResourcesMessage + UpdateSlaveMessage + RegisterExecutorMessage + ExecutorRegisteredMessage + ExecutorReregisteredMessage + ExitedExecutorMessage + ReconnectExecutorMessage + ReregisterExecutorMessage + ShutdownMessage + Archive + TaskHealthStatus + HookExecuted + Registry + Event + Call + Entry + Operation +*/ +package mesosproto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type InverseOfferStatus_Status int32 + +const ( + // We have not received a response yet. This is the default state before + // receiving a response. + InverseOfferStatus_UNKNOWN InverseOfferStatus_Status = 1 + // The framework is ok with the inverse offer. This means it will not + // violate any SLAs and will attempt to evacuate any tasks running on the + // agent. If the tasks are not evacuated by the framework, the operator can + // manually shut down the slave knowing that the framework will not have + // violated its SLAs. + InverseOfferStatus_ACCEPT InverseOfferStatus_Status = 2 + // The framework wants to block the maintenance operation from happening. An + // example would be that it can not meet its SLA by losing resources. + InverseOfferStatus_DECLINE InverseOfferStatus_Status = 3 +) + +var InverseOfferStatus_Status_name = map[int32]string{ + 1: "UNKNOWN", + 2: "ACCEPT", + 3: "DECLINE", +} +var InverseOfferStatus_Status_value = map[string]int32{ + "UNKNOWN": 1, + "ACCEPT": 2, + "DECLINE": 3, +} + +func (x InverseOfferStatus_Status) Enum() *InverseOfferStatus_Status { + p := new(InverseOfferStatus_Status) + *p = x + return p +} +func (x InverseOfferStatus_Status) String() string { + return proto.EnumName(InverseOfferStatus_Status_name, int32(x)) +} +func (x *InverseOfferStatus_Status) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(InverseOfferStatus_Status_value, data, "InverseOfferStatus_Status") + if err != nil { + return err + } + *x = InverseOfferStatus_Status(value) + return nil +} + +// * +// Describes a role, which is used to group frameworks for allocation +// decisions, depending on the allocation policy being used. +// The weight field can be used to indicate forms of priority. +type RoleInfo struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Weight *float64 `protobuf:"fixed64,2,opt,name=weight,def=1" json:"weight,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RoleInfo) Reset() { *m = RoleInfo{} } +func (*RoleInfo) ProtoMessage() {} + +const Default_RoleInfo_Weight float64 = 1 + +func (m *RoleInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *RoleInfo) GetWeight() float64 { + if m != nil && m.Weight != nil { + return *m.Weight + } + return Default_RoleInfo_Weight +} + +// TODO(jmlvanre): Copy this when V1 Allocator API is introduced. +type InverseOfferStatus struct { + Status *InverseOfferStatus_Status `protobuf:"varint,1,req,name=status,enum=mesosproto.InverseOfferStatus_Status" json:"status,omitempty"` + FrameworkId *FrameworkID `protobuf:"bytes,2,req,name=framework_id" json:"framework_id,omitempty"` + // Time, since the epoch, when this status was last updated. + Timestamp *TimeInfo `protobuf:"bytes,3,req,name=timestamp" json:"timestamp,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *InverseOfferStatus) Reset() { *m = InverseOfferStatus{} } +func (*InverseOfferStatus) ProtoMessage() {} + +func (m *InverseOfferStatus) GetStatus() InverseOfferStatus_Status { + if m != nil && m.Status != nil { + return *m.Status + } + return InverseOfferStatus_UNKNOWN +} + +func (m *InverseOfferStatus) GetFrameworkId() *FrameworkID { + if m != nil { + return m.FrameworkId + } + return nil +} + +func (m *InverseOfferStatus) GetTimestamp() *TimeInfo { + if m != nil { + return m.Timestamp + } + return nil +} + +func init() { + proto.RegisterEnum("mesosproto.InverseOfferStatus_Status", InverseOfferStatus_Status_name, InverseOfferStatus_Status_value) +} +func (this *RoleInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RoleInfo) + if !ok { + return fmt.Errorf("that is not of type *RoleInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RoleInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RoleInfobut is not nil && this == nil") + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Weight != nil && that1.Weight != nil { + if *this.Weight != *that1.Weight { + return fmt.Errorf("Weight this(%v) Not Equal that(%v)", *this.Weight, *that1.Weight) + } + } else if this.Weight != nil { + return fmt.Errorf("this.Weight == nil && that.Weight != nil") + } else if that1.Weight != nil { + return fmt.Errorf("Weight this(%v) Not Equal that(%v)", this.Weight, that1.Weight) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RoleInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*RoleInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Weight != nil && that1.Weight != nil { + if *this.Weight != *that1.Weight { + return false + } + } else if this.Weight != nil { + return false + } else if that1.Weight != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *InverseOfferStatus) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*InverseOfferStatus) + if !ok { + return fmt.Errorf("that is not of type *InverseOfferStatus") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *InverseOfferStatus but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *InverseOfferStatusbut is not nil && this == nil") + } + if this.Status != nil && that1.Status != nil { + if *this.Status != *that1.Status { + return fmt.Errorf("Status this(%v) Not Equal that(%v)", *this.Status, *that1.Status) + } + } else if this.Status != nil { + return fmt.Errorf("this.Status == nil && that.Status != nil") + } else if that1.Status != nil { + return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) + } + if !this.FrameworkId.Equal(that1.FrameworkId) { + return fmt.Errorf("FrameworkId this(%v) Not Equal that(%v)", this.FrameworkId, that1.FrameworkId) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *InverseOfferStatus) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*InverseOfferStatus) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Status != nil && that1.Status != nil { + if *this.Status != *that1.Status { + return false + } + } else if this.Status != nil { + return false + } else if that1.Status != nil { + return false + } + if !this.FrameworkId.Equal(that1.FrameworkId) { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RoleInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesosproto.RoleInfo{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringAllocator(this.Name, "string")+",\n") + } + if this.Weight != nil { + s = append(s, "Weight: "+valueToGoStringAllocator(this.Weight, "float64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *InverseOfferStatus) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesosproto.InverseOfferStatus{") + if this.Status != nil { + s = append(s, "Status: "+valueToGoStringAllocator(this.Status, "mesosproto.InverseOfferStatus_Status")+",\n") + } + if this.FrameworkId != nil { + s = append(s, "FrameworkId: "+fmt.Sprintf("%#v", this.FrameworkId)+",\n") + } + if this.Timestamp != nil { + s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringAllocator(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringAllocator(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "}" + return s +} +func (m *RoleInfo) 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 *RoleInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Name == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } else { + data[i] = 0xa + i++ + i = encodeVarintAllocator(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) + } + if m.Weight != nil { + data[i] = 0x11 + i++ + i = encodeFixed64Allocator(data, i, uint64(math.Float64bits(*m.Weight))) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *InverseOfferStatus) 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 *InverseOfferStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") + } else { + data[i] = 0x8 + i++ + i = encodeVarintAllocator(data, i, uint64(*m.Status)) + } + if m.FrameworkId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } else { + data[i] = 0x12 + i++ + i = encodeVarintAllocator(data, i, uint64(m.FrameworkId.Size())) + n1, err := m.FrameworkId.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Timestamp == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") + } else { + data[i] = 0x1a + i++ + i = encodeVarintAllocator(data, i, uint64(m.Timestamp.Size())) + n2, err := m.Timestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Allocator(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Allocator(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintAllocator(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func NewPopulatedRoleInfo(r randyAllocator, easy bool) *RoleInfo { + this := &RoleInfo{} + v1 := randStringAllocator(r) + this.Name = &v1 + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Weight = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedAllocator(r, 3) + } + return this +} + +func NewPopulatedInverseOfferStatus(r randyAllocator, easy bool) *InverseOfferStatus { + this := &InverseOfferStatus{} + v3 := InverseOfferStatus_Status([]int32{1, 2, 3}[r.Intn(3)]) + this.Status = &v3 + this.FrameworkId = NewPopulatedFrameworkID(r, easy) + this.Timestamp = NewPopulatedTimeInfo(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedAllocator(r, 4) + } + return this +} + +type randyAllocator interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAllocator(r randyAllocator) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringAllocator(r randyAllocator) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneAllocator(r) + } + return string(tmps) +} +func randUnrecognizedAllocator(r randyAllocator, maxFieldNumber int) (data []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + data = randFieldAllocator(data, r, fieldNumber, wire) + } + return data +} +func randFieldAllocator(data []byte, r randyAllocator, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateAllocator(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateAllocator(data, uint64(v5)) + case 1: + data = encodeVarintPopulateAllocator(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + data = encodeVarintPopulateAllocator(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateAllocator(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateAllocator(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return data +} +func encodeVarintPopulateAllocator(data []byte, v uint64) []byte { + for v >= 1<<7 { + data = append(data, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + data = append(data, uint8(v)) + return data +} +func (m *RoleInfo) Size() (n int) { + var l int + _ = l + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovAllocator(uint64(l)) + } + if m.Weight != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *InverseOfferStatus) Size() (n int) { + var l int + _ = l + if m.Status != nil { + n += 1 + sovAllocator(uint64(*m.Status)) + } + if m.FrameworkId != nil { + l = m.FrameworkId.Size() + n += 1 + l + sovAllocator(uint64(l)) + } + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovAllocator(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovAllocator(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAllocator(x uint64) (n int) { + return sovAllocator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *RoleInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleInfo{`, + `Name:` + valueToStringAllocator(this.Name) + `,`, + `Weight:` + valueToStringAllocator(this.Weight) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *InverseOfferStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&InverseOfferStatus{`, + `Status:` + valueToStringAllocator(this.Status) + `,`, + `FrameworkId:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, + `Timestamp:` + strings.Replace(fmt.Sprintf("%v", this.Timestamp), "TimeInfo", "TimeInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringAllocator(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *RoleInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAllocator + } + 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: RoleInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAllocator + } + 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 ErrInvalidLengthAllocator + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Weight = &v2 + default: + iNdEx = preIndex + skippy, err := skipAllocator(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAllocator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InverseOfferStatus) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAllocator + } + 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: InverseOfferStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InverseOfferStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v InverseOfferStatus_Status + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAllocator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (InverseOfferStatus_Status(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAllocator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAllocator + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrameworkId == nil { + m.FrameworkId = &FrameworkID{} + } + if err := m.FrameworkId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAllocator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAllocator + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = &TimeInfo{} + } + if err := m.Timestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + default: + iNdEx = preIndex + skippy, err := skipAllocator(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAllocator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAllocator(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAllocator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAllocator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAllocator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthAllocator + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAllocator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipAllocator(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthAllocator = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAllocator = fmt.Errorf("proto: integer overflow") +) diff --git a/mesosproto/allocator.proto b/mesosproto/allocator.proto new file mode 100644 index 00000000..0d88e113 --- /dev/null +++ b/mesosproto/allocator.proto @@ -0,0 +1,77 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package mesosproto; + +import "mesos.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; + +/** + * Describes a role, which is used to group frameworks for allocation + * decisions, depending on the allocation policy being used. + * The weight field can be used to indicate forms of priority. + */ +message RoleInfo { + required string name = 1; + optional double weight = 2 [default = 1]; +} + + +/** + * Describes the status of an inverse offer. + * + * This is a protobuf so as to be able to share the status to inverse offers + * through endpoints such as the maintenance status endpoint. + */ +// TODO(jmlvanre): Copy this when V1 Allocator API is introduced. +message InverseOfferStatus { + enum Status { + // We have not received a response yet. This is the default state before + // receiving a response. + UNKNOWN = 1; + // The framework is ok with the inverse offer. This means it will not + // violate any SLAs and will attempt to evacuate any tasks running on the + // agent. If the tasks are not evacuated by the framework, the operator can + // manually shut down the slave knowing that the framework will not have + // violated its SLAs. + ACCEPT = 2; + // The framework wants to block the maintenance operation from happening. An + // example would be that it can not meet its SLA by losing resources. + DECLINE = 3; + } + + required Status status = 1; + required FrameworkID framework_id = 2; + + // Time, since the epoch, when this status was last updated. + required TimeInfo timestamp = 3; + + // TODO(jmlvanre): Capture decline message. +} diff --git a/mesosproto/allocatorpb_test.go b/mesosproto/allocatorpb_test.go new file mode 100644 index 00000000..b3ae9d89 --- /dev/null +++ b/mesosproto/allocatorpb_test.go @@ -0,0 +1,642 @@ +// Code generated by protoc-gen-gogo. +// source: allocator.proto +// DO NOT EDIT! + +/* +Package mesosproto is a generated protocol buffer package. + +It is generated from these files: + allocator.proto + authentication.proto + authorizer.proto + containerizer.proto + internal.proto + log.proto + maintenance.proto + mesos.proto + messages.proto + registry.proto + scheduler.proto + state.proto + +It has these top-level messages: + RoleInfo + InverseOfferStatus + AuthenticateMessage + AuthenticationMechanismsMessage + AuthenticationStartMessage + AuthenticationStepMessage + AuthenticationCompletedMessage + AuthenticationFailedMessage + AuthenticationErrorMessage + ACL + ACLs + Launch + Update + Wait + Destroy + Usage + Termination + Containers + InternalMasterChangeDetected + InternalTryAuthentication + InternalAuthenticationResult + Promise + Action + Metadata + Record + PromiseRequest + PromiseResponse + WriteRequest + WriteResponse + LearnedMessage + RecoverRequest + RecoverResponse + Window + Schedule + ClusterStatus + FrameworkID + OfferID + SlaveID + TaskID + ExecutorID + ContainerID + TimeInfo + DurationInfo + Address + URL + Unavailability + MachineID + MachineInfo + FrameworkInfo + HealthCheck + CommandInfo + ExecutorInfo + MasterInfo + SlaveInfo + Value + Attribute + Resource + TrafficControlStatistics + ResourceStatistics + ResourceUsage + PerfStatistics + Request + Offer + InverseOffer + TaskInfo + TaskStatus + Filters + Environment + Parameter + Parameters + Credential + Credentials + RateLimit + RateLimits + Image + Volume + NetworkInfo + ContainerInfo + ContainerStatus + Labels + Label + Port + Ports + DiscoveryInfo + AppcImageManifest + Task + StatusUpdate + StatusUpdateRecord + SubmitSchedulerRequest + SubmitSchedulerResponse + ExecutorToFrameworkMessage + FrameworkToExecutorMessage + RegisterFrameworkMessage + ReregisterFrameworkMessage + FrameworkRegisteredMessage + FrameworkReregisteredMessage + UnregisterFrameworkMessage + DeactivateFrameworkMessage + ResourceRequestMessage + ResourceOffersMessage + LaunchTasksMessage + RescindResourceOfferMessage + ReviveOffersMessage + RunTaskMessage + KillTaskMessage + StatusUpdateMessage + StatusUpdateAcknowledgementMessage + LostSlaveMessage + ReconcileTasksMessage + FrameworkErrorMessage + RegisterSlaveMessage + ReregisterSlaveMessage + SlaveRegisteredMessage + SlaveReregisteredMessage + UnregisterSlaveMessage + MasterSlaveConnection + PingSlaveMessage + PongSlaveMessage + ShutdownFrameworkMessage + ShutdownExecutorMessage + UpdateFrameworkMessage + CheckpointResourcesMessage + UpdateSlaveMessage + RegisterExecutorMessage + ExecutorRegisteredMessage + ExecutorReregisteredMessage + ExitedExecutorMessage + ReconnectExecutorMessage + ReregisterExecutorMessage + ShutdownMessage + Archive + TaskHealthStatus + HookExecuted + Registry + Event + Call + Entry + Operation +*/ +package mesosproto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" + +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestRoleInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRoleInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RoleInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRoleInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRoleInfo(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RoleInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRoleInfoProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RoleInfo, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRoleInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRoleInfoProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRoleInfo(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &RoleInfo{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestInverseOfferStatusProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOfferStatus(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &InverseOfferStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestInverseOfferStatusMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOfferStatus(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &InverseOfferStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkInverseOfferStatusProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*InverseOfferStatus, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedInverseOfferStatus(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkInverseOfferStatusProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedInverseOfferStatus(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &InverseOfferStatus{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRoleInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRoleInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RoleInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestInverseOfferStatusJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOfferStatus(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &InverseOfferStatus{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRoleInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRoleInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RoleInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRoleInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRoleInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RoleInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestInverseOfferStatusProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOfferStatus(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &InverseOfferStatus{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestInverseOfferStatusProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOfferStatus(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &InverseOfferStatus{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRoleInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRoleInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestInverseOfferStatusStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedInverseOfferStatus(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestRoleInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRoleInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRoleInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RoleInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRoleInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestInverseOfferStatusSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOfferStatus(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkInverseOfferStatusSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*InverseOfferStatus, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedInverseOfferStatus(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRoleInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRoleInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestInverseOfferStatusGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedInverseOfferStatus(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRoleInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRoleInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RoleInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestInverseOfferStatusVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedInverseOfferStatus(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &InverseOfferStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/mesosproto/authentication.pb.go b/mesosproto/authentication.pb.go index 2315ad11..0fe8180e 100644 --- a/mesosproto/authentication.pb.go +++ b/mesosproto/authentication.pb.go @@ -2,148 +2,6 @@ // source: authentication.proto // DO NOT EDIT! -/* -Package mesosproto is a generated protocol buffer package. - -It is generated from these files: - authentication.proto - authorizer.proto - containerizer.proto - internal.proto - log.proto - mesos.proto - messages.proto - registry.proto - scheduler.proto - state.proto - -It has these top-level messages: - AuthenticateMessage - AuthenticationMechanismsMessage - AuthenticationStartMessage - AuthenticationStepMessage - AuthenticationCompletedMessage - AuthenticationFailedMessage - AuthenticationErrorMessage - ACL - ACLs - Launch - Update - Wait - Destroy - Usage - Termination - Containers - InternalMasterChangeDetected - InternalTryAuthentication - InternalAuthenticationResult - Promise - Action - Metadata - Record - PromiseRequest - PromiseResponse - WriteRequest - WriteResponse - LearnedMessage - RecoverRequest - RecoverResponse - FrameworkID - OfferID - SlaveID - TaskID - ExecutorID - ContainerID - Address - URL - FrameworkInfo - HealthCheck - CommandInfo - ExecutorInfo - MasterInfo - SlaveInfo - Value - Attribute - Resource - TrafficControlStatistics - ResourceStatistics - ResourceUsage - PerfStatistics - Request - Offer - TaskInfo - TaskStatus - Filters - Environment - Parameter - Parameters - Credential - Credentials - RateLimit - RateLimits - Image - Volume - ContainerInfo - Labels - Label - Port - Ports - DiscoveryInfo - AppcImageManifest - Task - StatusUpdate - StatusUpdateRecord - SubmitSchedulerRequest - SubmitSchedulerResponse - ExecutorToFrameworkMessage - FrameworkToExecutorMessage - RegisterFrameworkMessage - ReregisterFrameworkMessage - FrameworkRegisteredMessage - FrameworkReregisteredMessage - UnregisterFrameworkMessage - DeactivateFrameworkMessage - ResourceRequestMessage - ResourceOffersMessage - LaunchTasksMessage - RescindResourceOfferMessage - ReviveOffersMessage - RunTaskMessage - KillTaskMessage - StatusUpdateMessage - StatusUpdateAcknowledgementMessage - LostSlaveMessage - ReconcileTasksMessage - FrameworkErrorMessage - RegisterSlaveMessage - ReregisterSlaveMessage - SlaveRegisteredMessage - SlaveReregisteredMessage - UnregisterSlaveMessage - MasterSlaveConnection - PingSlaveMessage - PongSlaveMessage - ShutdownFrameworkMessage - ShutdownExecutorMessage - UpdateFrameworkMessage - CheckpointResourcesMessage - UpdateSlaveMessage - RegisterExecutorMessage - ExecutorRegisteredMessage - ExecutorReregisteredMessage - ExitedExecutorMessage - ReconnectExecutorMessage - ReregisterExecutorMessage - ShutdownMessage - Archive - TaskHealthStatus - HookExecuted - Registry - Event - Call - Entry - Operation -*/ package mesosproto import proto "github.com/gogo/protobuf/proto" @@ -1394,8 +1252,12 @@ func (m *AuthenticateMessage) 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 ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1408,6 +1270,12 @@ func (m *AuthenticateMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthenticateMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthenticateMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1415,6 +1283,9 @@ func (m *AuthenticateMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1438,15 +1309,7 @@ func (m *AuthenticateMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthentication(data[iNdEx:]) if err != nil { return err @@ -1465,14 +1328,21 @@ func (m *AuthenticateMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("pid") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AuthenticationMechanismsMessage) 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 ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1485,6 +1355,12 @@ func (m *AuthenticationMechanismsMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthenticationMechanismsMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthenticationMechanismsMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1492,6 +1368,9 @@ func (m *AuthenticationMechanismsMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1513,15 +1392,7 @@ func (m *AuthenticationMechanismsMessage) Unmarshal(data []byte) error { m.Mechanisms = append(m.Mechanisms, string(data[iNdEx:postIndex])) iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthentication(data[iNdEx:]) if err != nil { return err @@ -1537,6 +1408,9 @@ func (m *AuthenticationMechanismsMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AuthenticationStartMessage) Unmarshal(data []byte) error { @@ -1544,8 +1418,12 @@ func (m *AuthenticationStartMessage) 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 ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1558,6 +1436,12 @@ func (m *AuthenticationStartMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthenticationStartMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthenticationStartMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1565,6 +1449,9 @@ func (m *AuthenticationStartMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1593,6 +1480,9 @@ func (m *AuthenticationStartMessage) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1613,15 +1503,7 @@ func (m *AuthenticationStartMessage) Unmarshal(data []byte) error { m.Data = append([]byte{}, data[iNdEx:postIndex]...) iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthentication(data[iNdEx:]) if err != nil { return err @@ -1640,6 +1522,9 @@ func (m *AuthenticationStartMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("mechanism") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AuthenticationStepMessage) Unmarshal(data []byte) error { @@ -1647,8 +1532,12 @@ func (m *AuthenticationStepMessage) 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 ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1661,6 +1550,12 @@ func (m *AuthenticationStepMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthenticationStepMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthenticationStepMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1668,6 +1563,9 @@ func (m *AuthenticationStepMessage) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1689,15 +1587,7 @@ func (m *AuthenticationStepMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthentication(data[iNdEx:]) if err != nil { return err @@ -1716,14 +1606,21 @@ func (m *AuthenticationStepMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AuthenticationCompletedMessage) 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 ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1735,17 +1632,16 @@ func (m *AuthenticationCompletedMessage) Unmarshal(data []byte) error { } } fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthenticationCompletedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthenticationCompletedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthentication(data[iNdEx:]) if err != nil { return err @@ -1761,14 +1657,21 @@ func (m *AuthenticationCompletedMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AuthenticationFailedMessage) 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 ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1780,17 +1683,16 @@ func (m *AuthenticationFailedMessage) Unmarshal(data []byte) error { } } fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthenticationFailedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthenticationFailedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthentication(data[iNdEx:]) if err != nil { return err @@ -1806,14 +1708,21 @@ func (m *AuthenticationFailedMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AuthenticationErrorMessage) 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 ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1826,6 +1735,12 @@ func (m *AuthenticationErrorMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthenticationErrorMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthenticationErrorMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1833,6 +1748,9 @@ func (m *AuthenticationErrorMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthentication + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1855,15 +1773,7 @@ func (m *AuthenticationErrorMessage) Unmarshal(data []byte) error { m.Error = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthentication(data[iNdEx:]) if err != nil { return err @@ -1879,6 +1789,9 @@ func (m *AuthenticationErrorMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipAuthentication(data []byte) (n int, err error) { @@ -1887,6 +1800,9 @@ func skipAuthentication(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthentication + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1900,7 +1816,10 @@ func skipAuthentication(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthentication + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1916,6 +1835,9 @@ func skipAuthentication(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthentication + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1936,6 +1858,9 @@ func skipAuthentication(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthentication + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1971,4 +1896,5 @@ func skipAuthentication(data []byte) (n int, err error) { var ( ErrInvalidLengthAuthentication = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthentication = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/authenticationpb_test.go b/mesosproto/authenticationpb_test.go index 4a68aaa9..426dca4e 100644 --- a/mesosproto/authenticationpb_test.go +++ b/mesosproto/authenticationpb_test.go @@ -2,148 +2,6 @@ // source: authentication.proto // DO NOT EDIT! -/* -Package mesosproto is a generated protocol buffer package. - -It is generated from these files: - authentication.proto - authorizer.proto - containerizer.proto - internal.proto - log.proto - mesos.proto - messages.proto - registry.proto - scheduler.proto - state.proto - -It has these top-level messages: - AuthenticateMessage - AuthenticationMechanismsMessage - AuthenticationStartMessage - AuthenticationStepMessage - AuthenticationCompletedMessage - AuthenticationFailedMessage - AuthenticationErrorMessage - ACL - ACLs - Launch - Update - Wait - Destroy - Usage - Termination - Containers - InternalMasterChangeDetected - InternalTryAuthentication - InternalAuthenticationResult - Promise - Action - Metadata - Record - PromiseRequest - PromiseResponse - WriteRequest - WriteResponse - LearnedMessage - RecoverRequest - RecoverResponse - FrameworkID - OfferID - SlaveID - TaskID - ExecutorID - ContainerID - Address - URL - FrameworkInfo - HealthCheck - CommandInfo - ExecutorInfo - MasterInfo - SlaveInfo - Value - Attribute - Resource - TrafficControlStatistics - ResourceStatistics - ResourceUsage - PerfStatistics - Request - Offer - TaskInfo - TaskStatus - Filters - Environment - Parameter - Parameters - Credential - Credentials - RateLimit - RateLimits - Image - Volume - ContainerInfo - Labels - Label - Port - Ports - DiscoveryInfo - AppcImageManifest - Task - StatusUpdate - StatusUpdateRecord - SubmitSchedulerRequest - SubmitSchedulerResponse - ExecutorToFrameworkMessage - FrameworkToExecutorMessage - RegisterFrameworkMessage - ReregisterFrameworkMessage - FrameworkRegisteredMessage - FrameworkReregisteredMessage - UnregisterFrameworkMessage - DeactivateFrameworkMessage - ResourceRequestMessage - ResourceOffersMessage - LaunchTasksMessage - RescindResourceOfferMessage - ReviveOffersMessage - RunTaskMessage - KillTaskMessage - StatusUpdateMessage - StatusUpdateAcknowledgementMessage - LostSlaveMessage - ReconcileTasksMessage - FrameworkErrorMessage - RegisterSlaveMessage - ReregisterSlaveMessage - SlaveRegisteredMessage - SlaveReregisteredMessage - UnregisterSlaveMessage - MasterSlaveConnection - PingSlaveMessage - PongSlaveMessage - ShutdownFrameworkMessage - ShutdownExecutorMessage - UpdateFrameworkMessage - CheckpointResourcesMessage - UpdateSlaveMessage - RegisterExecutorMessage - ExecutorRegisteredMessage - ExecutorReregisteredMessage - ExitedExecutorMessage - ReconnectExecutorMessage - ReregisterExecutorMessage - ShutdownMessage - Archive - TaskHealthStatus - HookExecuted - Registry - Event - Call - Entry - Operation -*/ package mesosproto import testing "testing" @@ -1262,200 +1120,67 @@ func TestAuthenticationErrorMessageProtoCompactText(t *testing.T) { } } -func TestAuthenticateMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAuthenticateMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AuthenticateMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAuthenticationMechanismsMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAuthenticationMechanismsMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AuthenticationMechanismsMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAuthenticationStartMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAuthenticationStartMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AuthenticationStartMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAuthenticationStepMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAuthenticationStepMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AuthenticationStepMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAuthenticationCompletedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAuthenticationCompletedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AuthenticationCompletedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAuthenticationFailedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAuthenticationFailedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AuthenticationFailedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAuthenticationErrorMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAuthenticationErrorMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AuthenticationErrorMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAuthenticateMessageGoString(t *testing.T) { +func TestAuthenticateMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticateMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAuthenticationMechanismsMessageGoString(t *testing.T) { +func TestAuthenticationMechanismsMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationMechanismsMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAuthenticationStartMessageGoString(t *testing.T) { +func TestAuthenticationStartMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationStartMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAuthenticationStepMessageGoString(t *testing.T) { +func TestAuthenticationStepMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationStepMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAuthenticationCompletedMessageGoString(t *testing.T) { +func TestAuthenticationCompletedMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationCompletedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAuthenticationFailedMessageGoString(t *testing.T) { +func TestAuthenticationFailedMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationFailedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAuthenticationErrorMessageGoString(t *testing.T) { +func TestAuthenticationErrorMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationErrorMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } func TestAuthenticateMessageSize(t *testing.T) { @@ -1710,67 +1435,200 @@ func BenchmarkAuthenticationErrorMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAuthenticateMessageStringer(t *testing.T) { +func TestAuthenticateMessageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticateMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAuthenticationMechanismsMessageStringer(t *testing.T) { +func TestAuthenticationMechanismsMessageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationMechanismsMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAuthenticationStartMessageStringer(t *testing.T) { +func TestAuthenticationStartMessageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationStartMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAuthenticationStepMessageStringer(t *testing.T) { +func TestAuthenticationStepMessageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationStepMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAuthenticationCompletedMessageStringer(t *testing.T) { +func TestAuthenticationCompletedMessageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationCompletedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAuthenticationFailedMessageStringer(t *testing.T) { +func TestAuthenticationFailedMessageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationFailedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAuthenticationErrorMessageStringer(t *testing.T) { +func TestAuthenticationErrorMessageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAuthenticationErrorMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAuthenticateMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAuthenticateMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AuthenticateMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAuthenticationMechanismsMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAuthenticationMechanismsMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AuthenticationMechanismsMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAuthenticationStartMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAuthenticationStartMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AuthenticationStartMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAuthenticationStepMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAuthenticationStepMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AuthenticationStepMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAuthenticationCompletedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAuthenticationCompletedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AuthenticationCompletedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAuthenticationFailedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAuthenticationFailedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AuthenticationFailedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAuthenticationErrorMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAuthenticationErrorMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AuthenticationErrorMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } diff --git a/mesosproto/authorizer.pb.go b/mesosproto/authorizer.pb.go index 6e06b300..834ba8b7 100644 --- a/mesosproto/authorizer.pb.go +++ b/mesosproto/authorizer.pb.go @@ -1467,8 +1467,12 @@ func (m *ACL) 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 ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1480,17 +1484,16 @@ func (m *ACL) Unmarshal(data []byte) error { } } fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ACL: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ACL: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthorizer(data[iNdEx:]) if err != nil { return err @@ -1506,14 +1509,21 @@ func (m *ACL) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ACL_Entity) 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 ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1526,6 +1536,12 @@ func (m *ACL_Entity) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Entity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Entity: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -1533,6 +1549,9 @@ func (m *ACL_Entity) Unmarshal(data []byte) error { } var v ACL_Entity_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1550,6 +1569,9 @@ func (m *ACL_Entity) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1571,15 +1593,7 @@ func (m *ACL_Entity) Unmarshal(data []byte) error { m.Values = append(m.Values, string(data[iNdEx:postIndex])) iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthorizer(data[iNdEx:]) if err != nil { return err @@ -1595,6 +1609,9 @@ func (m *ACL_Entity) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ACL_RegisterFramework) Unmarshal(data []byte) error { @@ -1602,8 +1619,12 @@ func (m *ACL_RegisterFramework) 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 ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1616,6 +1637,12 @@ func (m *ACL_RegisterFramework) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegisterFramework: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisterFramework: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1623,6 +1650,9 @@ func (m *ACL_RegisterFramework) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1654,6 +1684,9 @@ func (m *ACL_RegisterFramework) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1680,15 +1713,7 @@ func (m *ACL_RegisterFramework) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthorizer(data[iNdEx:]) if err != nil { return err @@ -1710,6 +1735,9 @@ func (m *ACL_RegisterFramework) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("roles") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ACL_RunTask) Unmarshal(data []byte) error { @@ -1717,8 +1745,12 @@ func (m *ACL_RunTask) 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 ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1731,6 +1763,12 @@ func (m *ACL_RunTask) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RunTask: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RunTask: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1738,6 +1776,9 @@ func (m *ACL_RunTask) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1769,6 +1810,9 @@ func (m *ACL_RunTask) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1795,15 +1839,7 @@ func (m *ACL_RunTask) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthorizer(data[iNdEx:]) if err != nil { return err @@ -1825,6 +1861,9 @@ func (m *ACL_RunTask) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("users") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ACL_ShutdownFramework) Unmarshal(data []byte) error { @@ -1832,8 +1871,12 @@ func (m *ACL_ShutdownFramework) 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 ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1846,6 +1889,12 @@ func (m *ACL_ShutdownFramework) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ShutdownFramework: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShutdownFramework: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1853,6 +1902,9 @@ func (m *ACL_ShutdownFramework) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1884,6 +1936,9 @@ func (m *ACL_ShutdownFramework) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1910,15 +1965,7 @@ func (m *ACL_ShutdownFramework) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthorizer(data[iNdEx:]) if err != nil { return err @@ -1940,14 +1987,21 @@ func (m *ACL_ShutdownFramework) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_principals") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ACLs) 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 ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1960,6 +2014,12 @@ func (m *ACLs) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ACLs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ACLs: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -1967,6 +2027,9 @@ func (m *ACLs) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1985,6 +2048,9 @@ func (m *ACLs) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2013,6 +2079,9 @@ func (m *ACLs) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2041,6 +2110,9 @@ func (m *ACLs) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2064,15 +2136,7 @@ func (m *ACLs) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipAuthorizer(data[iNdEx:]) if err != nil { return err @@ -2088,6 +2152,9 @@ func (m *ACLs) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipAuthorizer(data []byte) (n int, err error) { @@ -2096,6 +2163,9 @@ func skipAuthorizer(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthorizer + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -2109,7 +2179,10 @@ func skipAuthorizer(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthorizer + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -2125,6 +2198,9 @@ func skipAuthorizer(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthorizer + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -2145,6 +2221,9 @@ func skipAuthorizer(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthorizer + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -2180,4 +2259,5 @@ func skipAuthorizer(data []byte) (n int, err error) { var ( ErrInvalidLengthAuthorizer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthorizer = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/authorizerpb_test.go b/mesosproto/authorizerpb_test.go index 80875b7e..64eda847 100644 --- a/mesosproto/authorizerpb_test.go +++ b/mesosproto/authorizerpb_test.go @@ -963,172 +963,58 @@ func TestACLsProtoCompactText(t *testing.T) { } } -func TestACLVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestACL_EntityVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_Entity{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestACL_RegisterFrameworkVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_RegisterFramework(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_RegisterFramework{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestACL_RunTaskVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_RunTask(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_RunTask{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestACL_ShutdownFrameworkVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_ShutdownFramework{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestACLsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACLs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACLs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestACLGoString(t *testing.T) { +func TestACLStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACL_EntityGoString(t *testing.T) { +func TestACL_EntityStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_Entity(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACL_RegisterFrameworkGoString(t *testing.T) { +func TestACL_RegisterFrameworkStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_RegisterFramework(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACL_RunTaskGoString(t *testing.T) { +func TestACL_RunTaskStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_RunTask(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACL_ShutdownFrameworkGoString(t *testing.T) { +func TestACL_ShutdownFrameworkStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_ShutdownFramework(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACLsGoString(t *testing.T) { +func TestACLsStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACLs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } func TestACLSize(t *testing.T) { @@ -1347,58 +1233,172 @@ func BenchmarkACLsSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestACLStringer(t *testing.T) { +func TestACLGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestACL_EntityStringer(t *testing.T) { +func TestACL_EntityGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_Entity(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestACL_RegisterFrameworkStringer(t *testing.T) { +func TestACL_RegisterFrameworkGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_RegisterFramework(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestACL_RunTaskStringer(t *testing.T) { +func TestACL_RunTaskGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_RunTask(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestACL_ShutdownFrameworkStringer(t *testing.T) { +func TestACL_ShutdownFrameworkGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_ShutdownFramework(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestACLsStringer(t *testing.T) { +func TestACLsGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACLs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestACLVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACL_EntityVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_Entity(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL_Entity{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACL_RegisterFrameworkVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_RegisterFramework(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL_RegisterFramework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACL_RunTaskVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_RunTask(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL_RunTask{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACL_ShutdownFrameworkVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_ShutdownFramework(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL_ShutdownFramework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACLsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACLs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACLs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } diff --git a/mesosproto/containerizer.pb.go b/mesosproto/containerizer.pb.go index 3bb913a1..5853065e 100644 --- a/mesosproto/containerizer.pb.go +++ b/mesosproto/containerizer.pb.go @@ -183,25 +183,38 @@ func (m *Usage) GetContainerId() *ContainerID { // Information about a container termination, returned by the // containerizer to the slave. type Termination struct { - // A container may be killed if it exceeds its resources; this will - // be indicated by killed=true and described by the message string. - // TODO(jaybuff): As part of MESOS-2035 we should remove killed and - // replace it with a TaskStatus::Reason. - Killed *bool `protobuf:"varint,1,req,name=killed" json:"killed,omitempty"` - Message *string `protobuf:"bytes,2,req,name=message" json:"message,omitempty"` // Exit status of the process. - Status *int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + Status *int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` + // The 'state', 'reasons' and 'message' of a status update for + // non-terminal tasks when the executor is terminated. + State *TaskState `protobuf:"varint,4,opt,name=state,enum=mesosproto.TaskState" json:"state,omitempty"` + Reasons []TaskStatus_Reason `protobuf:"varint,5,rep,name=reasons,enum=mesosproto.TaskStatus_Reason" json:"reasons,omitempty"` + Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Termination) Reset() { *m = Termination{} } func (*Termination) ProtoMessage() {} -func (m *Termination) GetKilled() bool { - if m != nil && m.Killed != nil { - return *m.Killed +func (m *Termination) GetStatus() int32 { + if m != nil && m.Status != nil { + return *m.Status } - return false + return 0 +} + +func (m *Termination) GetState() TaskState { + if m != nil && m.State != nil { + return *m.State + } + return TaskState_TASK_STAGING +} + +func (m *Termination) GetReasons() []TaskStatus_Reason { + if m != nil { + return m.Reasons + } + return nil } func (m *Termination) GetMessage() string { @@ -211,13 +224,6 @@ func (m *Termination) GetMessage() string { return "" } -func (m *Termination) GetStatus() int32 { - if m != nil && m.Status != nil { - return *m.Status - } - return 0 -} - // * // Information on all active containers returned by the containerizer // to the slave. @@ -642,14 +648,31 @@ func (this *Termination) VerboseEqual(that interface{}) error { } else if this == nil { return fmt.Errorf("that is type *Terminationbut is not nil && this == nil") } - if this.Killed != nil && that1.Killed != nil { - if *this.Killed != *that1.Killed { - return fmt.Errorf("Killed this(%v) Not Equal that(%v)", *this.Killed, *that1.Killed) + if this.Status != nil && that1.Status != nil { + if *this.Status != *that1.Status { + return fmt.Errorf("Status this(%v) Not Equal that(%v)", *this.Status, *that1.Status) + } + } else if this.Status != nil { + return fmt.Errorf("this.Status == nil && that.Status != nil") + } else if that1.Status != nil { + return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return fmt.Errorf("State this(%v) Not Equal that(%v)", *this.State, *that1.State) + } + } else if this.State != nil { + return fmt.Errorf("this.State == nil && that.State != nil") + } else if that1.State != nil { + return fmt.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State) + } + if len(this.Reasons) != len(that1.Reasons) { + return fmt.Errorf("Reasons this(%v) Not Equal that(%v)", len(this.Reasons), len(that1.Reasons)) + } + for i := range this.Reasons { + if this.Reasons[i] != that1.Reasons[i] { + return fmt.Errorf("Reasons this[%v](%v) Not Equal that[%v](%v)", i, this.Reasons[i], i, that1.Reasons[i]) } - } else if this.Killed != nil { - return fmt.Errorf("this.Killed == nil && that.Killed != nil") - } else if that1.Killed != nil { - return fmt.Errorf("Killed this(%v) Not Equal that(%v)", this.Killed, that1.Killed) } if this.Message != nil && that1.Message != nil { if *this.Message != *that1.Message { @@ -660,15 +683,6 @@ func (this *Termination) VerboseEqual(that interface{}) error { } else if that1.Message != nil { return fmt.Errorf("Message this(%v) Not Equal that(%v)", this.Message, that1.Message) } - if this.Status != nil && that1.Status != nil { - if *this.Status != *that1.Status { - return fmt.Errorf("Status this(%v) Not Equal that(%v)", *this.Status, *that1.Status) - } - } else if this.Status != nil { - return fmt.Errorf("this.Status == nil && that.Status != nil") - } else if that1.Status != nil { - return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) - } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -694,31 +708,39 @@ func (this *Termination) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Killed != nil && that1.Killed != nil { - if *this.Killed != *that1.Killed { + if this.Status != nil && that1.Status != nil { + if *this.Status != *that1.Status { return false } - } else if this.Killed != nil { + } else if this.Status != nil { return false - } else if that1.Killed != nil { + } else if that1.Status != nil { return false } - if this.Message != nil && that1.Message != nil { - if *this.Message != *that1.Message { + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { return false } - } else if this.Message != nil { + } else if this.State != nil { return false - } else if that1.Message != nil { + } else if that1.State != nil { return false } - if this.Status != nil && that1.Status != nil { - if *this.Status != *that1.Status { + if len(this.Reasons) != len(that1.Reasons) { + return false + } + for i := range this.Reasons { + if this.Reasons[i] != that1.Reasons[i] { return false } - } else if this.Status != nil { + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return false + } + } else if this.Message != nil { return false - } else if that1.Status != nil { + } else if that1.Message != nil { return false } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { @@ -895,17 +917,20 @@ func (this *Termination) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&mesosproto.Termination{") - if this.Killed != nil { - s = append(s, "Killed: "+valueToGoStringContainerizer(this.Killed, "bool")+",\n") + if this.Status != nil { + s = append(s, "Status: "+valueToGoStringContainerizer(this.Status, "int32")+",\n") + } + if this.State != nil { + s = append(s, "State: "+valueToGoStringContainerizer(this.State, "mesosproto.TaskState")+",\n") + } + if this.Reasons != nil { + s = append(s, "Reasons: "+fmt.Sprintf("%#v", this.Reasons)+",\n") } if this.Message != nil { s = append(s, "Message: "+valueToGoStringContainerizer(this.Message, "string")+",\n") } - if this.Status != nil { - s = append(s, "Status: "+valueToGoStringContainerizer(this.Status, "int32")+",\n") - } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -1202,21 +1227,7 @@ func (m *Termination) MarshalTo(data []byte) (int, error) { _ = i var l int _ = l - if m.Killed == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("killed") - } else { - data[i] = 0x8 - i++ - if *m.Killed { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Message == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") - } else { + if m.Message != nil { data[i] = 0x12 i++ i = encodeVarintContainerizer(data, i, uint64(len(*m.Message))) @@ -1227,6 +1238,18 @@ func (m *Termination) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintContainerizer(data, i, uint64(*m.Status)) } + if m.State != nil { + data[i] = 0x20 + i++ + i = encodeVarintContainerizer(data, i, uint64(*m.State)) + } + if len(m.Reasons) > 0 { + for _, num := range m.Reasons { + data[i] = 0x28 + i++ + i = encodeVarintContainerizer(data, i, uint64(num)) + } + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } @@ -1372,19 +1395,30 @@ func NewPopulatedUsage(r randyContainerizer, easy bool) *Usage { func NewPopulatedTermination(r randyContainerizer, easy bool) *Termination { this := &Termination{} - v6 := bool(bool(r.Intn(2) == 0)) - this.Killed = &v6 - v7 := randStringContainerizer(r) - this.Message = &v7 if r.Intn(10) != 0 { - v8 := int32(r.Int31()) + v6 := randStringContainerizer(r) + this.Message = &v6 + } + if r.Intn(10) != 0 { + v7 := int32(r.Int31()) if r.Intn(2) == 0 { - v8 *= -1 + v7 *= -1 + } + this.Status = &v7 + } + if r.Intn(10) != 0 { + v8 := TaskState([]int32{6, 0, 1, 2, 3, 4, 5, 7}[r.Intn(8)]) + this.State = &v8 + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Reasons = make([]TaskStatus_Reason, v9) + for i := 0; i < v9; i++ { + this.Reasons[i] = TaskStatus_Reason([]int32{0, 21, 19, 20, 8, 17, 22, 23, 24, 1, 2, 3, 4, 5, 6, 7, 9, 18, 10, 11, 12, 13, 14, 15, 16}[r.Intn(25)]) } - this.Status = &v8 } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedContainerizer(r, 4) + this.XXX_unrecognized = randUnrecognizedContainerizer(r, 6) } return this } @@ -1392,9 +1426,9 @@ func NewPopulatedTermination(r randyContainerizer, easy bool) *Termination { func NewPopulatedContainers(r randyContainerizer, easy bool) *Containers { this := &Containers{} if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.Containers = make([]*ContainerID, v9) - for i := 0; i < v9; i++ { + v10 := r.Intn(10) + this.Containers = make([]*ContainerID, v10) + for i := 0; i < v10; i++ { this.Containers[i] = NewPopulatedContainerID(r, easy) } } @@ -1423,9 +1457,9 @@ func randUTF8RuneContainerizer(r randyContainerizer) rune { return rune(ru + 61) } func randStringContainerizer(r randyContainerizer) string { - v10 := r.Intn(100) - tmps := make([]rune, v10) - for i := 0; i < v10; i++ { + v11 := r.Intn(100) + tmps := make([]rune, v11) + for i := 0; i < v11; i++ { tmps[i] = randUTF8RuneContainerizer(r) } return string(tmps) @@ -1447,11 +1481,11 @@ func randFieldContainerizer(data []byte, r randyContainerizer, fieldNumber int, switch wire { case 0: data = encodeVarintPopulateContainerizer(data, uint64(key)) - v11 := r.Int63() + v12 := r.Int63() if r.Intn(2) == 0 { - v11 *= -1 + v12 *= -1 } - data = encodeVarintPopulateContainerizer(data, uint64(v11)) + data = encodeVarintPopulateContainerizer(data, uint64(v12)) case 1: data = encodeVarintPopulateContainerizer(data, uint64(key)) data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -1577,9 +1611,6 @@ func (m *Usage) Size() (n int) { func (m *Termination) Size() (n int) { var l int _ = l - if m.Killed != nil { - n += 2 - } if m.Message != nil { l = len(*m.Message) n += 1 + l + sovContainerizer(uint64(l)) @@ -1587,6 +1618,14 @@ func (m *Termination) Size() (n int) { if m.Status != nil { n += 1 + sovContainerizer(uint64(*m.Status)) } + if m.State != nil { + n += 1 + sovContainerizer(uint64(*m.State)) + } + if len(m.Reasons) > 0 { + for _, e := range m.Reasons { + n += 1 + sovContainerizer(uint64(e)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -1689,9 +1728,10 @@ func (this *Termination) String() string { return "nil" } s := strings.Join([]string{`&Termination{`, - `Killed:` + valueToStringContainerizer(this.Killed) + `,`, `Message:` + valueToStringContainerizer(this.Message) + `,`, `Status:` + valueToStringContainerizer(this.Status) + `,`, + `State:` + valueToStringContainerizer(this.State) + `,`, + `Reasons:` + fmt.Sprintf("%v", this.Reasons) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -1721,8 +1761,12 @@ func (m *Launch) 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 ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1735,6 +1779,12 @@ func (m *Launch) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Launch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Launch: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1742,6 +1792,9 @@ func (m *Launch) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1773,6 +1826,9 @@ func (m *Launch) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1803,6 +1859,9 @@ func (m *Launch) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1833,6 +1892,9 @@ func (m *Launch) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1860,6 +1922,9 @@ func (m *Launch) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1887,6 +1952,9 @@ func (m *Launch) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1917,6 +1985,9 @@ func (m *Launch) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1944,6 +2015,9 @@ func (m *Launch) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1957,15 +2031,7 @@ func (m *Launch) Unmarshal(data []byte) error { b := bool(v != 0) m.Checkpoint = &b default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipContainerizer(data[iNdEx:]) if err != nil { return err @@ -1984,6 +2050,9 @@ func (m *Launch) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Update) Unmarshal(data []byte) error { @@ -1991,8 +2060,12 @@ func (m *Update) 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 ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2005,6 +2078,12 @@ func (m *Update) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Update: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Update: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -2012,6 +2091,9 @@ func (m *Update) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2043,6 +2125,9 @@ func (m *Update) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2066,15 +2151,7 @@ func (m *Update) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipContainerizer(data[iNdEx:]) if err != nil { return err @@ -2093,6 +2170,9 @@ func (m *Update) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Wait) Unmarshal(data []byte) error { @@ -2100,8 +2180,12 @@ func (m *Wait) 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 ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2114,6 +2198,12 @@ func (m *Wait) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Wait: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wait: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -2121,6 +2211,9 @@ func (m *Wait) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2147,15 +2240,7 @@ func (m *Wait) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipContainerizer(data[iNdEx:]) if err != nil { return err @@ -2174,6 +2259,9 @@ func (m *Wait) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Destroy) Unmarshal(data []byte) error { @@ -2181,8 +2269,12 @@ func (m *Destroy) 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 ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2195,6 +2287,12 @@ func (m *Destroy) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Destroy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Destroy: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -2202,6 +2300,9 @@ func (m *Destroy) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2228,15 +2329,7 @@ func (m *Destroy) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipContainerizer(data[iNdEx:]) if err != nil { return err @@ -2255,6 +2348,9 @@ func (m *Destroy) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Usage) Unmarshal(data []byte) error { @@ -2262,8 +2358,12 @@ func (m *Usage) 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 ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2276,6 +2376,12 @@ func (m *Usage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Usage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Usage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -2283,6 +2389,9 @@ func (m *Usage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2309,15 +2418,7 @@ func (m *Usage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipContainerizer(data[iNdEx:]) if err != nil { return err @@ -2336,15 +2437,21 @@ func (m *Usage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Termination) Unmarshal(data []byte) error { - var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { + preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2357,32 +2464,22 @@ func (m *Termination) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Termination: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Termination: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Killed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Killed = &b - hasFields[0] |= uint64(0x00000001) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2404,13 +2501,15 @@ func (m *Termination) Unmarshal(data []byte) error { s := string(data[iNdEx:postIndex]) m.Message = &s iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var v int32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2422,16 +2521,48 @@ func (m *Termination) Unmarshal(data []byte) error { } } m.Status = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var v TaskState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TaskState(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + m.State = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reasons", wireType) + } + var v TaskStatus_Reason + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TaskStatus_Reason(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Reasons = append(m.Reasons, v) + default: + iNdEx = preIndex skippy, err := skipContainerizer(data[iNdEx:]) if err != nil { return err @@ -2446,21 +2577,22 @@ func (m *Termination) Unmarshal(data []byte) error { iNdEx += skippy } } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("killed") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") - } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Containers) 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 ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2473,6 +2605,12 @@ func (m *Containers) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Containers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Containers: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -2480,6 +2618,9 @@ func (m *Containers) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainerizer + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -2503,15 +2644,7 @@ func (m *Containers) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipContainerizer(data[iNdEx:]) if err != nil { return err @@ -2527,6 +2660,9 @@ func (m *Containers) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipContainerizer(data []byte) (n int, err error) { @@ -2535,6 +2671,9 @@ func skipContainerizer(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowContainerizer + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -2548,7 +2687,10 @@ func skipContainerizer(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowContainerizer + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -2564,6 +2706,9 @@ func skipContainerizer(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowContainerizer + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -2584,6 +2729,9 @@ func skipContainerizer(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowContainerizer + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -2619,4 +2767,5 @@ func skipContainerizer(data []byte) (n int, err error) { var ( ErrInvalidLengthContainerizer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowContainerizer = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/containerizer.proto b/mesosproto/containerizer.proto index 8b3dc721..c30e5f61 100644 --- a/mesosproto/containerizer.proto +++ b/mesosproto/containerizer.proto @@ -91,15 +91,14 @@ message Usage { * containerizer to the slave. */ message Termination { - // A container may be killed if it exceeds its resources; this will - // be indicated by killed=true and described by the message string. - // TODO(jaybuff): As part of MESOS-2035 we should remove killed and - // replace it with a TaskStatus::Reason. - required bool killed = 1; - required string message = 2; - // Exit status of the process. optional int32 status = 3; + + // The 'state', 'reasons' and 'message' of a status update for + // non-terminal tasks when the executor is terminated. + optional TaskState state = 4; + repeated TaskStatus.Reason reasons = 5; + optional string message = 2; } diff --git a/mesosproto/containerizerpb_test.go b/mesosproto/containerizerpb_test.go index 6da017de..b77d991b 100644 --- a/mesosproto/containerizerpb_test.go +++ b/mesosproto/containerizerpb_test.go @@ -1120,200 +1120,67 @@ func TestContainersProtoCompactText(t *testing.T) { } } -func TestLaunchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLaunch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Launch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUpdateVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUpdate(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Update{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWaitVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWait(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wait{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDestroyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDestroy(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Destroy{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUsageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUsage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Usage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTerminationVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTermination(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Termination{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainersVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainers(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Containers{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLaunchGoString(t *testing.T) { +func TestLaunchStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLaunch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestUpdateGoString(t *testing.T) { +func TestUpdateStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUpdate(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestWaitGoString(t *testing.T) { +func TestWaitStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWait(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestDestroyGoString(t *testing.T) { +func TestDestroyStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedDestroy(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestUsageGoString(t *testing.T) { +func TestUsageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUsage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestTerminationGoString(t *testing.T) { +func TestTerminationStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTermination(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainersGoString(t *testing.T) { +func TestContainersStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainers(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } func TestLaunchSize(t *testing.T) { @@ -1568,67 +1435,200 @@ func BenchmarkContainersSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestLaunchStringer(t *testing.T) { +func TestLaunchGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLaunch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestUpdateStringer(t *testing.T) { +func TestUpdateGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUpdate(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestWaitStringer(t *testing.T) { +func TestWaitGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWait(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestDestroyStringer(t *testing.T) { +func TestDestroyGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedDestroy(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestUsageStringer(t *testing.T) { +func TestUsageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUsage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestTerminationStringer(t *testing.T) { +func TestTerminationGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTermination(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestContainersStringer(t *testing.T) { +func TestContainersGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainers(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLaunchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLaunch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Launch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUpdateVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUpdate(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Update{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWaitVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWait(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wait{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDestroyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDestroy(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Destroy{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUsageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUsage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Usage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTerminationVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTermination(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Termination{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainers(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Containers{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } diff --git a/mesosproto/log.pb.go b/mesosproto/log.pb.go index 2b62f81d..68c5493d 100644 --- a/mesosproto/log.pb.go +++ b/mesosproto/log.pb.go @@ -136,6 +136,78 @@ func (x *Record_Type) UnmarshalJSON(data []byte) error { return nil } +type PromiseResponse_Type int32 + +const ( + PromiseResponse_ACCEPT PromiseResponse_Type = 1 + PromiseResponse_REJECT PromiseResponse_Type = 2 + PromiseResponse_IGNORE PromiseResponse_Type = 3 +) + +var PromiseResponse_Type_name = map[int32]string{ + 1: "ACCEPT", + 2: "REJECT", + 3: "IGNORE", +} +var PromiseResponse_Type_value = map[string]int32{ + "ACCEPT": 1, + "REJECT": 2, + "IGNORE": 3, +} + +func (x PromiseResponse_Type) Enum() *PromiseResponse_Type { + p := new(PromiseResponse_Type) + *p = x + return p +} +func (x PromiseResponse_Type) String() string { + return proto.EnumName(PromiseResponse_Type_name, int32(x)) +} +func (x *PromiseResponse_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(PromiseResponse_Type_value, data, "PromiseResponse_Type") + if err != nil { + return err + } + *x = PromiseResponse_Type(value) + return nil +} + +type WriteResponse_Type int32 + +const ( + WriteResponse_ACCEPT WriteResponse_Type = 1 + WriteResponse_REJECT WriteResponse_Type = 2 + WriteResponse_IGNORE WriteResponse_Type = 3 +) + +var WriteResponse_Type_name = map[int32]string{ + 1: "ACCEPT", + 2: "REJECT", + 3: "IGNORE", +} +var WriteResponse_Type_value = map[string]int32{ + "ACCEPT": 1, + "REJECT": 2, + "IGNORE": 3, +} + +func (x WriteResponse_Type) Enum() *WriteResponse_Type { + p := new(WriteResponse_Type) + *p = x + return p +} +func (x WriteResponse_Type) String() string { + return proto.EnumName(WriteResponse_Type_name, int32(x)) +} +func (x *WriteResponse_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(WriteResponse_Type_value, data, "WriteResponse_Type") + if err != nil { + return err + } + *x = WriteResponse_Type(value) + return nil +} + // Represents a "promise" that a replica has made. A promise is // *implicitly* valid for _all_ future actions that get performed on // the replicated log (provided the action comes from the same @@ -390,21 +462,36 @@ func (m *PromiseRequest) GetPosition() uint64 { return 0 } -// Represents a "promise" response from a replica back to a proposer. -// A replica represents a NACK (because it has promised a proposer -// with a higher proposal number) by setting the okay field to false. +// Represents a promise response corresponding to a promise request. +// The kind of the response is given by the "type" field: +// +// 1. IGNORE: The recipient of the promise request was not in VOTING +// state, so it ignored the request. +// 2. REJECT: The recipient of the proposal has already promised a +// proposer with a higher proposal number. This is called a +// "NACK" in the code. +// 3. ACCEPT: The promise request was accepted. +// +// Before 0.26, we only sent responses for cases 2 and 3, so the +// 'okay' field was used to distinguish these responses. For backward +// compatibility, we continue setting 'okay' to false for both cases 1 +// and 2; this means old masters will treat IGNORE as a NACK: this +// might result in demoting the current coordinator, but that should +// be tolerable. TODO(neilc): Remove 'okay' in 0.27. +// // The 'proposal' is either the aforementioned higher proposal number -// when the response is a NACK, or the corresponding request's -// proposal number if it is an ACK. The replica either sends back the -// highest position it has recorded in the log (using the 'position' -// field) or the specific action (if any) it has at the position -// requested in PromiseRequest (using the 'action' field). +// (for case 2), or the corresponding request's proposal number (for +// cases 1 and 3). The replica either sends back the highest position +// it has recorded in the log (using the 'position' field) or the +// specific action (if any) it has at the position requested in +// PromiseRequest (using the 'action' field). type PromiseResponse struct { - Okay *bool `protobuf:"varint,1,req,name=okay" json:"okay,omitempty"` - Proposal *uint64 `protobuf:"varint,2,req,name=proposal" json:"proposal,omitempty"` - Position *uint64 `protobuf:"varint,4,opt,name=position" json:"position,omitempty"` - Action *Action `protobuf:"bytes,3,opt,name=action" json:"action,omitempty"` - XXX_unrecognized []byte `json:"-"` + Okay *bool `protobuf:"varint,1,req,name=okay" json:"okay,omitempty"` + Type *PromiseResponse_Type `protobuf:"varint,5,opt,name=type,enum=mesosproto.PromiseResponse_Type" json:"type,omitempty"` + Proposal *uint64 `protobuf:"varint,2,req,name=proposal" json:"proposal,omitempty"` + Position *uint64 `protobuf:"varint,4,opt,name=position" json:"position,omitempty"` + Action *Action `protobuf:"bytes,3,opt,name=action" json:"action,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *PromiseResponse) Reset() { *m = PromiseResponse{} } @@ -417,6 +504,13 @@ func (m *PromiseResponse) GetOkay() bool { return false } +func (m *PromiseResponse) GetType() PromiseResponse_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return PromiseResponse_ACCEPT +} + func (m *PromiseResponse) GetProposal() uint64 { if m != nil && m.Proposal != nil { return *m.Proposal @@ -505,19 +599,33 @@ func (m *WriteRequest) GetTruncate() *Action_Truncate { return nil } -// Represents a write response corresponding to a write request. A -// replica represents a NACK (because it has promised a proposer with -// a higher proposal number) by setting the okay field to false. If -// the proposer is a coordinator, then it has been demoted. The -// 'position' should always correspond to the position set in the +// Represents a write response corresponding to a write request. The +// kind of the response is given by the "type" field: +// +// 1. IGNORE: The recipient of the write request was not in VOTING +// state, so it ignored the request. +// 2. REJECT: The recipient of the proposal has already promised a +// proposer with a higher proposal number. This is called a +// "NACK" in the code. +// 3. ACCEPT: The promise request was accepted. +// +// Before 0.26, we only sent responses for cases 2 and 3, so the +// 'okay' field was used to distinguish these responses. For backward +// compatibility, we continue setting 'okay' to false for both cases 1 +// and 2; this means old masters will treat IGNORE as a NACK: this +// might result in demoting the current coordinator, but that should +// be tolerable. TODO(neilc): Remove 'okay' in 0.27. +// +// The 'position' should always correspond to the position set in the // request. The 'proposal' is either the same proposal number set in -// the request in the case of an ACK, or the higher proposal number -// this position has been promised to in the case of a NACK. +// the request (cases 1 and 3), or the higher proposal number +// this position has been promised to (case 2). type WriteResponse struct { - Okay *bool `protobuf:"varint,1,req,name=okay" json:"okay,omitempty"` - Proposal *uint64 `protobuf:"varint,2,req,name=proposal" json:"proposal,omitempty"` - Position *uint64 `protobuf:"varint,3,req,name=position" json:"position,omitempty"` - XXX_unrecognized []byte `json:"-"` + Okay *bool `protobuf:"varint,1,req,name=okay" json:"okay,omitempty"` + Type *WriteResponse_Type `protobuf:"varint,4,opt,name=type,enum=mesosproto.WriteResponse_Type" json:"type,omitempty"` + Proposal *uint64 `protobuf:"varint,2,req,name=proposal" json:"proposal,omitempty"` + Position *uint64 `protobuf:"varint,3,req,name=position" json:"position,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *WriteResponse) Reset() { *m = WriteResponse{} } @@ -530,6 +638,13 @@ func (m *WriteResponse) GetOkay() bool { return false } +func (m *WriteResponse) GetType() WriteResponse_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return WriteResponse_ACCEPT +} + func (m *WriteResponse) GetProposal() uint64 { if m != nil && m.Proposal != nil { return *m.Proposal @@ -607,6 +722,8 @@ func init() { proto.RegisterEnum("mesosproto.Action_Type", Action_Type_name, Action_Type_value) proto.RegisterEnum("mesosproto.Metadata_Status", Metadata_Status_name, Metadata_Status_value) proto.RegisterEnum("mesosproto.Record_Type", Record_Type_name, Record_Type_value) + proto.RegisterEnum("mesosproto.PromiseResponse_Type", PromiseResponse_Type_name, PromiseResponse_Type_value) + proto.RegisterEnum("mesosproto.WriteResponse_Type", WriteResponse_Type_name, WriteResponse_Type_value) } func (this *Promise) VerboseEqual(that interface{}) error { if that == nil { @@ -1301,6 +1418,15 @@ func (this *PromiseResponse) VerboseEqual(that interface{}) error { } else if that1.Okay != nil { return fmt.Errorf("Okay this(%v) Not Equal that(%v)", this.Okay, that1.Okay) } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } if this.Proposal != nil && that1.Proposal != nil { if *this.Proposal != *that1.Proposal { return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) @@ -1356,6 +1482,15 @@ func (this *PromiseResponse) Equal(that interface{}) bool { } else if that1.Okay != nil { return false } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } if this.Proposal != nil && that1.Proposal != nil { if *this.Proposal != *that1.Proposal { return false @@ -1551,6 +1686,15 @@ func (this *WriteResponse) VerboseEqual(that interface{}) error { } else if that1.Okay != nil { return fmt.Errorf("Okay this(%v) Not Equal that(%v)", this.Okay, that1.Okay) } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } if this.Proposal != nil && that1.Proposal != nil { if *this.Proposal != *that1.Proposal { return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) @@ -1603,6 +1747,15 @@ func (this *WriteResponse) Equal(that interface{}) bool { } else if that1.Okay != nil { return false } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } if this.Proposal != nil && that1.Proposal != nil { if *this.Proposal != *that1.Proposal { return false @@ -1996,11 +2149,14 @@ func (this *PromiseResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 9) s = append(s, "&mesosproto.PromiseResponse{") if this.Okay != nil { s = append(s, "Okay: "+valueToGoStringLog(this.Okay, "bool")+",\n") } + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringLog(this.Type, "mesosproto.PromiseResponse_Type")+",\n") + } if this.Proposal != nil { s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") } @@ -2053,11 +2209,14 @@ func (this *WriteResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&mesosproto.WriteResponse{") if this.Okay != nil { s = append(s, "Okay: "+valueToGoStringLog(this.Okay, "bool")+",\n") } + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringLog(this.Type, "mesosproto.WriteResponse_Type")+",\n") + } if this.Proposal != nil { s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") } @@ -2515,6 +2674,11 @@ func (m *PromiseResponse) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintLog(data, i, uint64(*m.Position)) } + if m.Type != nil { + data[i] = 0x28 + i++ + i = encodeVarintLog(data, i, uint64(*m.Type)) + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } @@ -2644,6 +2808,11 @@ func (m *WriteResponse) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintLog(data, i, uint64(*m.Position)) } + if m.Type != nil { + data[i] = 0x20 + i++ + i = encodeVarintLog(data, i, uint64(*m.Type)) + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } @@ -2908,24 +3077,28 @@ func NewPopulatedPromiseResponse(r randyLog, easy bool) *PromiseResponse { v17 := uint64(uint64(r.Uint32())) this.Position = &v17 } + if r.Intn(10) != 0 { + v18 := PromiseResponse_Type([]int32{1, 2, 3}[r.Intn(3)]) + this.Type = &v18 + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 5) + this.XXX_unrecognized = randUnrecognizedLog(r, 6) } return this } func NewPopulatedWriteRequest(r randyLog, easy bool) *WriteRequest { this := &WriteRequest{} - v18 := uint64(uint64(r.Uint32())) - this.Proposal = &v18 v19 := uint64(uint64(r.Uint32())) - this.Position = &v19 + this.Proposal = &v19 + v20 := uint64(uint64(r.Uint32())) + this.Position = &v20 if r.Intn(10) != 0 { - v20 := bool(bool(r.Intn(2) == 0)) - this.Learned = &v20 + v21 := bool(bool(r.Intn(2) == 0)) + this.Learned = &v21 } - v21 := Action_Type([]int32{1, 2, 3}[r.Intn(3)]) - this.Type = &v21 + v22 := Action_Type([]int32{1, 2, 3}[r.Intn(3)]) + this.Type = &v22 if r.Intn(10) != 0 { this.Nop = NewPopulatedAction_Nop(r, easy) } @@ -2943,14 +3116,18 @@ func NewPopulatedWriteRequest(r randyLog, easy bool) *WriteRequest { func NewPopulatedWriteResponse(r randyLog, easy bool) *WriteResponse { this := &WriteResponse{} - v22 := bool(bool(r.Intn(2) == 0)) - this.Okay = &v22 - v23 := uint64(uint64(r.Uint32())) - this.Proposal = &v23 + v23 := bool(bool(r.Intn(2) == 0)) + this.Okay = &v23 v24 := uint64(uint64(r.Uint32())) - this.Position = &v24 + this.Proposal = &v24 + v25 := uint64(uint64(r.Uint32())) + this.Position = &v25 + if r.Intn(10) != 0 { + v26 := WriteResponse_Type([]int32{1, 2, 3}[r.Intn(3)]) + this.Type = &v26 + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 4) + this.XXX_unrecognized = randUnrecognizedLog(r, 5) } return this } @@ -2974,15 +3151,15 @@ func NewPopulatedRecoverRequest(r randyLog, easy bool) *RecoverRequest { func NewPopulatedRecoverResponse(r randyLog, easy bool) *RecoverResponse { this := &RecoverResponse{} - v25 := Metadata_Status([]int32{1, 2, 3, 4}[r.Intn(4)]) - this.Status = &v25 + v27 := Metadata_Status([]int32{1, 2, 3, 4}[r.Intn(4)]) + this.Status = &v27 if r.Intn(10) != 0 { - v26 := uint64(uint64(r.Uint32())) - this.Begin = &v26 + v28 := uint64(uint64(r.Uint32())) + this.Begin = &v28 } if r.Intn(10) != 0 { - v27 := uint64(uint64(r.Uint32())) - this.End = &v27 + v29 := uint64(uint64(r.Uint32())) + this.End = &v29 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedLog(r, 4) @@ -3009,9 +3186,9 @@ func randUTF8RuneLog(r randyLog) rune { return rune(ru + 61) } func randStringLog(r randyLog) string { - v28 := r.Intn(100) - tmps := make([]rune, v28) - for i := 0; i < v28; i++ { + v30 := r.Intn(100) + tmps := make([]rune, v30) + for i := 0; i < v30; i++ { tmps[i] = randUTF8RuneLog(r) } return string(tmps) @@ -3033,11 +3210,11 @@ func randFieldLog(data []byte, r randyLog, fieldNumber int, wire int) []byte { switch wire { case 0: data = encodeVarintPopulateLog(data, uint64(key)) - v29 := r.Int63() + v31 := r.Int63() if r.Intn(2) == 0 { - v29 *= -1 + v31 *= -1 } - data = encodeVarintPopulateLog(data, uint64(v29)) + data = encodeVarintPopulateLog(data, uint64(v31)) case 1: data = encodeVarintPopulateLog(data, uint64(key)) data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -3218,6 +3395,9 @@ func (m *PromiseResponse) Size() (n int) { if m.Position != nil { n += 1 + sovLog(uint64(*m.Position)) } + if m.Type != nil { + n += 1 + sovLog(uint64(*m.Type)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3269,6 +3449,9 @@ func (m *WriteResponse) Size() (n int) { if m.Position != nil { n += 1 + sovLog(uint64(*m.Position)) } + if m.Type != nil { + n += 1 + sovLog(uint64(*m.Type)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3437,6 +3620,7 @@ func (this *PromiseResponse) String() string { `Proposal:` + valueToStringLog(this.Proposal) + `,`, `Action:` + strings.Replace(fmt.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, `Position:` + valueToStringLog(this.Position) + `,`, + `Type:` + valueToStringLog(this.Type) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3467,6 +3651,7 @@ func (this *WriteResponse) String() string { `Okay:` + valueToStringLog(this.Okay) + `,`, `Proposal:` + valueToStringLog(this.Proposal) + `,`, `Position:` + valueToStringLog(this.Position) + `,`, + `Type:` + valueToStringLog(this.Type) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3519,8 +3704,12 @@ func (m *Promise) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3533,6 +3722,12 @@ func (m *Promise) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Promise: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Promise: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -3540,6 +3735,9 @@ func (m *Promise) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3553,15 +3751,7 @@ func (m *Promise) Unmarshal(data []byte) error { m.Proposal = &v hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -3580,6 +3770,9 @@ func (m *Promise) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Action) Unmarshal(data []byte) error { @@ -3587,8 +3780,12 @@ func (m *Action) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3601,6 +3798,12 @@ func (m *Action) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Action: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Action: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -3608,6 +3811,9 @@ func (m *Action) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3626,6 +3832,9 @@ func (m *Action) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3644,6 +3853,9 @@ func (m *Action) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3661,6 +3873,9 @@ func (m *Action) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3679,6 +3894,9 @@ func (m *Action) Unmarshal(data []byte) error { } var v Action_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3696,6 +3914,9 @@ func (m *Action) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3726,6 +3947,9 @@ func (m *Action) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3756,6 +3980,9 @@ func (m *Action) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3781,15 +4008,7 @@ func (m *Action) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -3811,14 +4030,21 @@ func (m *Action) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Action_Nop) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3830,17 +4056,16 @@ func (m *Action_Nop) Unmarshal(data []byte) error { } } fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Nop: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nop: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -3856,6 +4081,9 @@ func (m *Action_Nop) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Action_Append) Unmarshal(data []byte) error { @@ -3863,8 +4091,12 @@ func (m *Action_Append) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3877,6 +4109,12 @@ func (m *Action_Append) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Append: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Append: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -3884,6 +4122,9 @@ func (m *Action_Append) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3910,6 +4151,9 @@ func (m *Action_Append) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3930,15 +4174,7 @@ func (m *Action_Append) Unmarshal(data []byte) error { m.Cksum = append([]byte{}, data[iNdEx:postIndex]...) iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -3957,6 +4193,9 @@ func (m *Action_Append) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("bytes") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Action_Truncate) Unmarshal(data []byte) error { @@ -3964,8 +4203,12 @@ func (m *Action_Truncate) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3978,6 +4221,12 @@ func (m *Action_Truncate) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Truncate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Truncate: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -3985,6 +4234,9 @@ func (m *Action_Truncate) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -3998,15 +4250,7 @@ func (m *Action_Truncate) Unmarshal(data []byte) error { m.To = &v hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4025,6 +4269,9 @@ func (m *Action_Truncate) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("to") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Metadata) Unmarshal(data []byte) error { @@ -4032,8 +4279,12 @@ func (m *Metadata) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4046,6 +4297,12 @@ func (m *Metadata) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Metadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -4053,6 +4310,9 @@ func (m *Metadata) Unmarshal(data []byte) error { } var v Metadata_Status for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4071,6 +4331,9 @@ func (m *Metadata) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4084,15 +4347,7 @@ func (m *Metadata) Unmarshal(data []byte) error { m.Promised = &v hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4114,6 +4369,9 @@ func (m *Metadata) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Record) Unmarshal(data []byte) error { @@ -4121,8 +4379,12 @@ func (m *Record) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4135,6 +4397,12 @@ func (m *Record) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Record: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -4142,6 +4410,9 @@ func (m *Record) Unmarshal(data []byte) error { } var v Record_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4160,6 +4431,9 @@ func (m *Record) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4190,6 +4464,9 @@ func (m *Record) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4220,6 +4497,9 @@ func (m *Record) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4245,15 +4525,7 @@ func (m *Record) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4272,6 +4544,9 @@ func (m *Record) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *PromiseRequest) Unmarshal(data []byte) error { @@ -4279,8 +4554,12 @@ func (m *PromiseRequest) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4293,6 +4572,12 @@ func (m *PromiseRequest) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PromiseRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PromiseRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -4300,6 +4585,9 @@ func (m *PromiseRequest) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4318,6 +4606,9 @@ func (m *PromiseRequest) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4330,15 +4621,7 @@ func (m *PromiseRequest) Unmarshal(data []byte) error { } m.Position = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4357,6 +4640,9 @@ func (m *PromiseRequest) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *PromiseResponse) Unmarshal(data []byte) error { @@ -4364,8 +4650,12 @@ func (m *PromiseResponse) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4378,6 +4668,12 @@ func (m *PromiseResponse) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PromiseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PromiseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -4385,6 +4681,9 @@ func (m *PromiseResponse) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4404,6 +4703,9 @@ func (m *PromiseResponse) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4422,6 +4724,9 @@ func (m *PromiseResponse) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4452,6 +4757,9 @@ func (m *PromiseResponse) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4463,16 +4771,28 @@ func (m *PromiseResponse) Unmarshal(data []byte) error { } } m.Position = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v PromiseResponse_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (PromiseResponse_Type(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + m.Type = &v + default: + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4494,6 +4814,9 @@ func (m *PromiseResponse) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *WriteRequest) Unmarshal(data []byte) error { @@ -4501,8 +4824,12 @@ func (m *WriteRequest) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4515,6 +4842,12 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WriteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WriteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -4522,6 +4855,9 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4540,6 +4876,9 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4558,6 +4897,9 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4576,6 +4918,9 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } var v Action_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4594,6 +4939,9 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4624,6 +4972,9 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4654,6 +5005,9 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4679,15 +5033,7 @@ func (m *WriteRequest) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4712,6 +5058,9 @@ func (m *WriteRequest) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *WriteResponse) Unmarshal(data []byte) error { @@ -4719,8 +5068,12 @@ func (m *WriteResponse) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4733,6 +5086,12 @@ func (m *WriteResponse) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WriteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WriteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -4740,6 +5099,9 @@ func (m *WriteResponse) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4759,6 +5121,9 @@ func (m *WriteResponse) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4777,6 +5142,9 @@ func (m *WriteResponse) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4789,16 +5157,28 @@ func (m *WriteResponse) Unmarshal(data []byte) error { } m.Position = &v hasFields[0] |= uint64(0x00000004) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v WriteResponse_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (WriteResponse_Type(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + m.Type = &v + default: + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4823,6 +5203,9 @@ func (m *WriteResponse) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *LearnedMessage) Unmarshal(data []byte) error { @@ -4830,8 +5213,12 @@ func (m *LearnedMessage) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4844,6 +5231,12 @@ func (m *LearnedMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LearnedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LearnedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -4851,6 +5244,9 @@ func (m *LearnedMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4877,15 +5273,7 @@ func (m *LearnedMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4904,14 +5292,21 @@ func (m *LearnedMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("action") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RecoverRequest) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4923,17 +5318,16 @@ func (m *RecoverRequest) Unmarshal(data []byte) error { } } fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RecoverRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RecoverRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -4949,6 +5343,9 @@ func (m *RecoverRequest) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RecoverResponse) Unmarshal(data []byte) error { @@ -4956,8 +5353,12 @@ func (m *RecoverResponse) 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 ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4970,6 +5371,12 @@ func (m *RecoverResponse) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RecoverResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RecoverResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -4977,6 +5384,9 @@ func (m *RecoverResponse) Unmarshal(data []byte) error { } var v Metadata_Status for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4995,6 +5405,9 @@ func (m *RecoverResponse) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5012,6 +5425,9 @@ func (m *RecoverResponse) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5024,15 +5440,7 @@ func (m *RecoverResponse) Unmarshal(data []byte) error { } m.End = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipLog(data[iNdEx:]) if err != nil { return err @@ -5051,6 +5459,9 @@ func (m *RecoverResponse) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipLog(data []byte) (n int, err error) { @@ -5059,6 +5470,9 @@ func skipLog(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLog + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -5072,7 +5486,10 @@ func skipLog(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLog + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -5088,6 +5505,9 @@ func skipLog(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLog + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -5108,6 +5528,9 @@ func skipLog(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLog + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -5143,4 +5566,5 @@ func skipLog(data []byte) (n int, err error) { var ( ErrInvalidLengthLog = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLog = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/log.proto b/mesosproto/log.proto index 841d9300..4799179a 100644 --- a/mesosproto/log.proto +++ b/mesosproto/log.proto @@ -32,7 +32,6 @@ option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; - // Represents a "promise" that a replica has made. A promise is // *implicitly* valid for _all_ future actions that get performed on // the replicated log (provided the action comes from the same @@ -140,18 +139,38 @@ message PromiseRequest { optional uint64 position = 2; } - -// Represents a "promise" response from a replica back to a proposer. -// A replica represents a NACK (because it has promised a proposer -// with a higher proposal number) by setting the okay field to false. +// Represents a promise response corresponding to a promise request. +// The kind of the response is given by the "type" field: +// +// 1. IGNORE: The recipient of the promise request was not in VOTING +// state, so it ignored the request. +// 2. REJECT: The recipient of the proposal has already promised a +// proposer with a higher proposal number. This is called a +// "NACK" in the code. +// 3. ACCEPT: The promise request was accepted. +// +// Before 0.26, we only sent responses for cases 2 and 3, so the +// 'okay' field was used to distinguish these responses. For backward +// compatibility, we continue setting 'okay' to false for both cases 1 +// and 2; this means old masters will treat IGNORE as a NACK: this +// might result in demoting the current coordinator, but that should +// be tolerable. TODO(neilc): Remove 'okay' in 0.27. +// // The 'proposal' is either the aforementioned higher proposal number -// when the response is a NACK, or the corresponding request's -// proposal number if it is an ACK. The replica either sends back the -// highest position it has recorded in the log (using the 'position' -// field) or the specific action (if any) it has at the position -// requested in PromiseRequest (using the 'action' field). +// (for case 2), or the corresponding request's proposal number (for +// cases 1 and 3). The replica either sends back the highest position +// it has recorded in the log (using the 'position' field) or the +// specific action (if any) it has at the position requested in +// PromiseRequest (using the 'action' field). message PromiseResponse { - required bool okay = 1; + enum Type { + ACCEPT = 1; + REJECT = 2; + IGNORE = 3; + } + + required bool okay = 1; // DEPRECATED + optional Type type = 5; required uint64 proposal = 2; optional uint64 position = 4; optional Action action = 3; @@ -173,16 +192,36 @@ message WriteRequest { } -// Represents a write response corresponding to a write request. A -// replica represents a NACK (because it has promised a proposer with -// a higher proposal number) by setting the okay field to false. If -// the proposer is a coordinator, then it has been demoted. The -// 'position' should always correspond to the position set in the +// Represents a write response corresponding to a write request. The +// kind of the response is given by the "type" field: +// +// 1. IGNORE: The recipient of the write request was not in VOTING +// state, so it ignored the request. +// 2. REJECT: The recipient of the proposal has already promised a +// proposer with a higher proposal number. This is called a +// "NACK" in the code. +// 3. ACCEPT: The promise request was accepted. +// +// Before 0.26, we only sent responses for cases 2 and 3, so the +// 'okay' field was used to distinguish these responses. For backward +// compatibility, we continue setting 'okay' to false for both cases 1 +// and 2; this means old masters will treat IGNORE as a NACK: this +// might result in demoting the current coordinator, but that should +// be tolerable. TODO(neilc): Remove 'okay' in 0.27. +// +// The 'position' should always correspond to the position set in the // request. The 'proposal' is either the same proposal number set in -// the request in the case of an ACK, or the higher proposal number -// this position has been promised to in the case of a NACK. +// the request (cases 1 and 3), or the higher proposal number +// this position has been promised to (case 2). message WriteResponse { - required bool okay = 1; + enum Type { + ACCEPT = 1; + REJECT = 2; + IGNORE = 3; + } + + required bool okay = 1; // DEPRECATED + optional Type type = 4; required uint64 proposal = 2; required uint64 position = 3; } diff --git a/mesosproto/logpb_test.go b/mesosproto/logpb_test.go index 20e6005e..3a2af52e 100644 --- a/mesosproto/logpb_test.go +++ b/mesosproto/logpb_test.go @@ -2219,417 +2219,151 @@ func TestRecoverResponseProtoCompactText(t *testing.T) { } } -func TestPromiseVerboseEqual(t *testing.T) { +func TestPromiseStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromise(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Promise{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestActionVerboseEqual(t *testing.T) { +func TestActionStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Action{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAction_NopVerboseEqual(t *testing.T) { +func TestAction_NopStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Nop(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Action_Nop{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAction_AppendVerboseEqual(t *testing.T) { +func TestAction_AppendStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Append(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Action_Append{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAction_TruncateVerboseEqual(t *testing.T) { +func TestAction_TruncateStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Truncate(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Action_Truncate{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestMetadataVerboseEqual(t *testing.T) { +func TestMetadataStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMetadata(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Metadata{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRecordVerboseEqual(t *testing.T) { +func TestRecordStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecord(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Record{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPromiseRequestVerboseEqual(t *testing.T) { +func TestPromiseRequestStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromiseRequest(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PromiseRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPromiseResponseVerboseEqual(t *testing.T) { +func TestPromiseResponseStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromiseResponse(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PromiseResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestWriteRequestVerboseEqual(t *testing.T) { +func TestWriteRequestStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWriteRequest(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &WriteRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestWriteResponseVerboseEqual(t *testing.T) { +func TestWriteResponseStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWriteResponse(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &WriteResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestLearnedMessageVerboseEqual(t *testing.T) { +func TestLearnedMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLearnedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &LearnedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRecoverRequestVerboseEqual(t *testing.T) { +func TestRecoverRequestStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecoverRequest(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RecoverRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRecoverResponseVerboseEqual(t *testing.T) { +func TestRecoverResponseStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecoverResponse(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestPromiseSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPromise(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } - msg := &RecoverResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestPromiseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPromise(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestActionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAction(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAction_NopGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAction_Nop(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAction_AppendGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAction_Append(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAction_TruncateGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAction_Truncate(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMetadataGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMetadata(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestRecordGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRecord(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestPromiseRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPromiseRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestPromiseResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPromiseResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWriteRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWriteRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWriteResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWriteResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLearnedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLearnedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestRecoverRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRecoverRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestRecoverResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRecoverResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestPromiseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPromise(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } @@ -3115,130 +2849,396 @@ func BenchmarkRecoverResponseSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestPromiseStringer(t *testing.T) { +func TestPromiseGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromise(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestActionStringer(t *testing.T) { +func TestActionGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAction_NopStringer(t *testing.T) { +func TestAction_NopGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Nop(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAction_AppendStringer(t *testing.T) { +func TestAction_AppendGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Append(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestAction_TruncateStringer(t *testing.T) { +func TestAction_TruncateGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Truncate(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestMetadataStringer(t *testing.T) { +func TestMetadataGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMetadata(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestRecordStringer(t *testing.T) { +func TestRecordGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecord(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestPromiseRequestStringer(t *testing.T) { +func TestPromiseRequestGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromiseRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestPromiseResponseStringer(t *testing.T) { +func TestPromiseResponseGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromiseResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestWriteRequestStringer(t *testing.T) { +func TestWriteRequestGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWriteRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestWriteResponseStringer(t *testing.T) { +func TestWriteResponseGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWriteResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestLearnedMessageStringer(t *testing.T) { +func TestLearnedMessageGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLearnedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestRecoverRequestStringer(t *testing.T) { +func TestRecoverRequestGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecoverRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestRecoverResponseStringer(t *testing.T) { +func TestRecoverResponseGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecoverResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPromiseVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPromise(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Promise{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestActionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAction(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Action{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAction_NopVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAction_Nop(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Action_Nop{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAction_AppendVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAction_Append(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Action_Append{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAction_TruncateVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAction_Truncate(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Action_Truncate{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMetadataVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMetadata(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Metadata{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRecordVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRecord(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Record{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestPromiseRequestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPromiseRequest(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &PromiseRequest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestPromiseResponseVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPromiseResponse(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &PromiseResponse{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWriteRequestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWriteRequest(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &WriteRequest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWriteResponseVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWriteResponse(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &WriteResponse{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLearnedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLearnedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &LearnedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRecoverRequestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRecoverRequest(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RecoverRequest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRecoverResponseVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRecoverResponse(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RecoverResponse{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } diff --git a/mesosproto/maintenance.pb.go b/mesosproto/maintenance.pb.go new file mode 100644 index 00000000..9fac5442 --- /dev/null +++ b/mesosproto/maintenance.pb.go @@ -0,0 +1,1527 @@ +// Code generated by protoc-gen-gogo. +// source: maintenance.proto +// DO NOT EDIT! + +package mesosproto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// * +// A set of machines scheduled to go into maintenance +// in the same `unavailability`. +type Window struct { + // Machines affected by this maintenance window. + MachineIds []*MachineID `protobuf:"bytes,1,rep,name=machine_ids" json:"machine_ids,omitempty"` + // Interval during which this set of machines is expected to be down. + Unavailability *Unavailability `protobuf:"bytes,2,req,name=unavailability" json:"unavailability,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Window) Reset() { *m = Window{} } +func (*Window) ProtoMessage() {} + +func (m *Window) GetMachineIds() []*MachineID { + if m != nil { + return m.MachineIds + } + return nil +} + +func (m *Window) GetUnavailability() *Unavailability { + if m != nil { + return m.Unavailability + } + return nil +} + +// * +// A list of maintenance windows. +// For example, this may represent a rolling restart of agents. +type Schedule struct { + Windows []*Window `protobuf:"bytes,1,rep,name=windows" json:"windows,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Schedule) Reset() { *m = Schedule{} } +func (*Schedule) ProtoMessage() {} + +func (m *Schedule) GetWindows() []*Window { + if m != nil { + return m.Windows + } + return nil +} + +// * +// Represents the maintenance status of each machine in the cluster. +// The lists correspond to the `MachineInfo.Mode` enumeration. +type ClusterStatus struct { + DrainingMachines []*ClusterStatus_DrainingMachine `protobuf:"bytes,1,rep,name=draining_machines" json:"draining_machines,omitempty"` + DownMachines []*MachineID `protobuf:"bytes,2,rep,name=down_machines" json:"down_machines,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ClusterStatus) Reset() { *m = ClusterStatus{} } +func (*ClusterStatus) ProtoMessage() {} + +func (m *ClusterStatus) GetDrainingMachines() []*ClusterStatus_DrainingMachine { + if m != nil { + return m.DrainingMachines + } + return nil +} + +func (m *ClusterStatus) GetDownMachines() []*MachineID { + if m != nil { + return m.DownMachines + } + return nil +} + +type ClusterStatus_DrainingMachine struct { + Id *MachineID `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` + // A list of the most recent responses to inverse offers from frameworks + // running on this draining machine. + Statuses []*InverseOfferStatus `protobuf:"bytes,2,rep,name=statuses" json:"statuses,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ClusterStatus_DrainingMachine) Reset() { *m = ClusterStatus_DrainingMachine{} } +func (*ClusterStatus_DrainingMachine) ProtoMessage() {} + +func (m *ClusterStatus_DrainingMachine) GetId() *MachineID { + if m != nil { + return m.Id + } + return nil +} + +func (m *ClusterStatus_DrainingMachine) GetStatuses() []*InverseOfferStatus { + if m != nil { + return m.Statuses + } + return nil +} + +func (this *Window) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Window) + if !ok { + return fmt.Errorf("that is not of type *Window") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Window but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Windowbut is not nil && this == nil") + } + if len(this.MachineIds) != len(that1.MachineIds) { + return fmt.Errorf("MachineIds this(%v) Not Equal that(%v)", len(this.MachineIds), len(that1.MachineIds)) + } + for i := range this.MachineIds { + if !this.MachineIds[i].Equal(that1.MachineIds[i]) { + return fmt.Errorf("MachineIds this[%v](%v) Not Equal that[%v](%v)", i, this.MachineIds[i], i, that1.MachineIds[i]) + } + } + if !this.Unavailability.Equal(that1.Unavailability) { + return fmt.Errorf("Unavailability this(%v) Not Equal that(%v)", this.Unavailability, that1.Unavailability) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Window) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Window) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.MachineIds) != len(that1.MachineIds) { + return false + } + for i := range this.MachineIds { + if !this.MachineIds[i].Equal(that1.MachineIds[i]) { + return false + } + } + if !this.Unavailability.Equal(that1.Unavailability) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Schedule) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Schedule) + if !ok { + return fmt.Errorf("that is not of type *Schedule") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Schedule but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Schedulebut is not nil && this == nil") + } + if len(this.Windows) != len(that1.Windows) { + return fmt.Errorf("Windows this(%v) Not Equal that(%v)", len(this.Windows), len(that1.Windows)) + } + for i := range this.Windows { + if !this.Windows[i].Equal(that1.Windows[i]) { + return fmt.Errorf("Windows this[%v](%v) Not Equal that[%v](%v)", i, this.Windows[i], i, that1.Windows[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Schedule) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Schedule) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Windows) != len(that1.Windows) { + return false + } + for i := range this.Windows { + if !this.Windows[i].Equal(that1.Windows[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ClusterStatus) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ClusterStatus) + if !ok { + return fmt.Errorf("that is not of type *ClusterStatus") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ClusterStatus but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ClusterStatusbut is not nil && this == nil") + } + if len(this.DrainingMachines) != len(that1.DrainingMachines) { + return fmt.Errorf("DrainingMachines this(%v) Not Equal that(%v)", len(this.DrainingMachines), len(that1.DrainingMachines)) + } + for i := range this.DrainingMachines { + if !this.DrainingMachines[i].Equal(that1.DrainingMachines[i]) { + return fmt.Errorf("DrainingMachines this[%v](%v) Not Equal that[%v](%v)", i, this.DrainingMachines[i], i, that1.DrainingMachines[i]) + } + } + if len(this.DownMachines) != len(that1.DownMachines) { + return fmt.Errorf("DownMachines this(%v) Not Equal that(%v)", len(this.DownMachines), len(that1.DownMachines)) + } + for i := range this.DownMachines { + if !this.DownMachines[i].Equal(that1.DownMachines[i]) { + return fmt.Errorf("DownMachines this[%v](%v) Not Equal that[%v](%v)", i, this.DownMachines[i], i, that1.DownMachines[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ClusterStatus) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ClusterStatus) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.DrainingMachines) != len(that1.DrainingMachines) { + return false + } + for i := range this.DrainingMachines { + if !this.DrainingMachines[i].Equal(that1.DrainingMachines[i]) { + return false + } + } + if len(this.DownMachines) != len(that1.DownMachines) { + return false + } + for i := range this.DownMachines { + if !this.DownMachines[i].Equal(that1.DownMachines[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ClusterStatus_DrainingMachine) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ClusterStatus_DrainingMachine) + if !ok { + return fmt.Errorf("that is not of type *ClusterStatus_DrainingMachine") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ClusterStatus_DrainingMachine but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ClusterStatus_DrainingMachinebut is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if len(this.Statuses) != len(that1.Statuses) { + return fmt.Errorf("Statuses this(%v) Not Equal that(%v)", len(this.Statuses), len(that1.Statuses)) + } + for i := range this.Statuses { + if !this.Statuses[i].Equal(that1.Statuses[i]) { + return fmt.Errorf("Statuses this[%v](%v) Not Equal that[%v](%v)", i, this.Statuses[i], i, that1.Statuses[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ClusterStatus_DrainingMachine) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ClusterStatus_DrainingMachine) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if len(this.Statuses) != len(that1.Statuses) { + return false + } + for i := range this.Statuses { + if !this.Statuses[i].Equal(that1.Statuses[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Window) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Window{") + if this.MachineIds != nil { + s = append(s, "MachineIds: "+fmt.Sprintf("%#v", this.MachineIds)+",\n") + } + if this.Unavailability != nil { + s = append(s, "Unavailability: "+fmt.Sprintf("%#v", this.Unavailability)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Schedule) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Schedule{") + if this.Windows != nil { + s = append(s, "Windows: "+fmt.Sprintf("%#v", this.Windows)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ClusterStatus) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesosproto.ClusterStatus{") + if this.DrainingMachines != nil { + s = append(s, "DrainingMachines: "+fmt.Sprintf("%#v", this.DrainingMachines)+",\n") + } + if this.DownMachines != nil { + s = append(s, "DownMachines: "+fmt.Sprintf("%#v", this.DownMachines)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ClusterStatus_DrainingMachine) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesosproto.ClusterStatus_DrainingMachine{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Statuses != nil { + s = append(s, "Statuses: "+fmt.Sprintf("%#v", this.Statuses)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMaintenance(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringMaintenance(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "}" + return s +} +func (m *Window) 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 *Window) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.MachineIds) > 0 { + for _, msg := range m.MachineIds { + data[i] = 0xa + i++ + i = encodeVarintMaintenance(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Unavailability == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("unavailability") + } else { + data[i] = 0x12 + i++ + i = encodeVarintMaintenance(data, i, uint64(m.Unavailability.Size())) + n1, err := m.Unavailability.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Schedule) 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 *Schedule) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Windows) > 0 { + for _, msg := range m.Windows { + data[i] = 0xa + i++ + i = encodeVarintMaintenance(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ClusterStatus) 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 *ClusterStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DrainingMachines) > 0 { + for _, msg := range m.DrainingMachines { + data[i] = 0xa + i++ + i = encodeVarintMaintenance(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.DownMachines) > 0 { + for _, msg := range m.DownMachines { + data[i] = 0x12 + i++ + i = encodeVarintMaintenance(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ClusterStatus_DrainingMachine) 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 *ClusterStatus_DrainingMachine) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } else { + data[i] = 0xa + i++ + i = encodeVarintMaintenance(data, i, uint64(m.Id.Size())) + n2, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if len(m.Statuses) > 0 { + for _, msg := range m.Statuses { + data[i] = 0x12 + i++ + i = encodeVarintMaintenance(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Maintenance(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Maintenance(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintMaintenance(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func NewPopulatedWindow(r randyMaintenance, easy bool) *Window { + this := &Window{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.MachineIds = make([]*MachineID, v1) + for i := 0; i < v1; i++ { + this.MachineIds[i] = NewPopulatedMachineID(r, easy) + } + } + this.Unavailability = NewPopulatedUnavailability(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMaintenance(r, 3) + } + return this +} + +func NewPopulatedSchedule(r randyMaintenance, easy bool) *Schedule { + this := &Schedule{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Windows = make([]*Window, v2) + for i := 0; i < v2; i++ { + this.Windows[i] = NewPopulatedWindow(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMaintenance(r, 2) + } + return this +} + +func NewPopulatedClusterStatus(r randyMaintenance, easy bool) *ClusterStatus { + this := &ClusterStatus{} + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.DrainingMachines = make([]*ClusterStatus_DrainingMachine, v3) + for i := 0; i < v3; i++ { + this.DrainingMachines[i] = NewPopulatedClusterStatus_DrainingMachine(r, easy) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.DownMachines = make([]*MachineID, v4) + for i := 0; i < v4; i++ { + this.DownMachines[i] = NewPopulatedMachineID(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMaintenance(r, 3) + } + return this +} + +func NewPopulatedClusterStatus_DrainingMachine(r randyMaintenance, easy bool) *ClusterStatus_DrainingMachine { + this := &ClusterStatus_DrainingMachine{} + this.Id = NewPopulatedMachineID(r, easy) + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Statuses = make([]*InverseOfferStatus, v5) + for i := 0; i < v5; i++ { + this.Statuses[i] = NewPopulatedInverseOfferStatus(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMaintenance(r, 3) + } + return this +} + +type randyMaintenance interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMaintenance(r randyMaintenance) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMaintenance(r randyMaintenance) string { + v6 := r.Intn(100) + tmps := make([]rune, v6) + for i := 0; i < v6; i++ { + tmps[i] = randUTF8RuneMaintenance(r) + } + return string(tmps) +} +func randUnrecognizedMaintenance(r randyMaintenance, maxFieldNumber int) (data []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + data = randFieldMaintenance(data, r, fieldNumber, wire) + } + return data +} +func randFieldMaintenance(data []byte, r randyMaintenance, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMaintenance(data, uint64(key)) + v7 := r.Int63() + if r.Intn(2) == 0 { + v7 *= -1 + } + data = encodeVarintPopulateMaintenance(data, uint64(v7)) + case 1: + data = encodeVarintPopulateMaintenance(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + data = encodeVarintPopulateMaintenance(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMaintenance(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMaintenance(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return data +} +func encodeVarintPopulateMaintenance(data []byte, v uint64) []byte { + for v >= 1<<7 { + data = append(data, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + data = append(data, uint8(v)) + return data +} +func (m *Window) Size() (n int) { + var l int + _ = l + if len(m.MachineIds) > 0 { + for _, e := range m.MachineIds { + l = e.Size() + n += 1 + l + sovMaintenance(uint64(l)) + } + } + if m.Unavailability != nil { + l = m.Unavailability.Size() + n += 1 + l + sovMaintenance(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Schedule) Size() (n int) { + var l int + _ = l + if len(m.Windows) > 0 { + for _, e := range m.Windows { + l = e.Size() + n += 1 + l + sovMaintenance(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ClusterStatus) Size() (n int) { + var l int + _ = l + if len(m.DrainingMachines) > 0 { + for _, e := range m.DrainingMachines { + l = e.Size() + n += 1 + l + sovMaintenance(uint64(l)) + } + } + if len(m.DownMachines) > 0 { + for _, e := range m.DownMachines { + l = e.Size() + n += 1 + l + sovMaintenance(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ClusterStatus_DrainingMachine) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovMaintenance(uint64(l)) + } + if len(m.Statuses) > 0 { + for _, e := range m.Statuses { + l = e.Size() + n += 1 + l + sovMaintenance(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMaintenance(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMaintenance(x uint64) (n int) { + return sovMaintenance(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Window) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Window{`, + `MachineIds:` + strings.Replace(fmt.Sprintf("%v", this.MachineIds), "MachineID", "MachineID", 1) + `,`, + `Unavailability:` + strings.Replace(fmt.Sprintf("%v", this.Unavailability), "Unavailability", "Unavailability", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Schedule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Schedule{`, + `Windows:` + strings.Replace(fmt.Sprintf("%v", this.Windows), "Window", "Window", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterStatus{`, + `DrainingMachines:` + strings.Replace(fmt.Sprintf("%v", this.DrainingMachines), "ClusterStatus_DrainingMachine", "ClusterStatus_DrainingMachine", 1) + `,`, + `DownMachines:` + strings.Replace(fmt.Sprintf("%v", this.DownMachines), "MachineID", "MachineID", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterStatus_DrainingMachine) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterStatus_DrainingMachine{`, + `Id:` + strings.Replace(fmt.Sprintf("%v", this.Id), "MachineID", "MachineID", 1) + `,`, + `Statuses:` + strings.Replace(fmt.Sprintf("%v", this.Statuses), "InverseOfferStatus", "InverseOfferStatus", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMaintenance(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Window) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + 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: Window: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Window: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MachineIds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMaintenance + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MachineIds = append(m.MachineIds, &MachineID{}) + if err := m.MachineIds[len(m.MachineIds)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unavailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMaintenance + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Unavailability == nil { + m.Unavailability = &Unavailability{} + } + if err := m.Unavailability.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMaintenance(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMaintenance + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("unavailability") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Schedule) 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 ErrIntOverflowMaintenance + } + 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: Schedule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Schedule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Windows", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMaintenance + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Windows = append(m.Windows, &Window{}) + if err := m.Windows[len(m.Windows)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMaintenance(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMaintenance + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterStatus) 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 ErrIntOverflowMaintenance + } + 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: ClusterStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DrainingMachines", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMaintenance + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DrainingMachines = append(m.DrainingMachines, &ClusterStatus_DrainingMachine{}) + if err := m.DrainingMachines[len(m.DrainingMachines)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DownMachines", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMaintenance + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DownMachines = append(m.DownMachines, &MachineID{}) + if err := m.DownMachines[len(m.DownMachines)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMaintenance(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMaintenance + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterStatus_DrainingMachine) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + 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: DrainingMachine: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DrainingMachine: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMaintenance + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Id == nil { + m.Id = &MachineID{} + } + if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMaintenance + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMaintenance + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Statuses = append(m.Statuses, &InverseOfferStatus{}) + if err := m.Statuses[len(m.Statuses)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMaintenance(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMaintenance + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMaintenance(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMaintenance + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMaintenance + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMaintenance + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthMaintenance + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMaintenance + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipMaintenance(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthMaintenance = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMaintenance = fmt.Errorf("proto: integer overflow") +) diff --git a/mesosproto/maintenance.proto b/mesosproto/maintenance.proto new file mode 100644 index 00000000..becc6ce3 --- /dev/null +++ b/mesosproto/maintenance.proto @@ -0,0 +1,96 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package mesosproto; + +import "mesos.proto"; +import "allocator.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; + +// This is an illustration of a maintenance `Schedule`: +// +// This is a `Window`. +// Machine ^ | +// ... | v +// 12 | +----------------+ +// 11 | | | +// 10 | +----------------+ +// 9 | +----------------+ +// 8 | | | +// 7 | +----------------+ +// 6 | +----------------+ +// 5 | | | +// 4 | +----------------+ +// 3 | +-----------+ +// 2 | | | +// 1 | +-----------+ +// | +// +-----------------------------------------------------~~~~-> +// Downtime for maintenance + + +/** + * A set of machines scheduled to go into maintenance + * in the same `unavailability`. + */ +message Window { + // Machines affected by this maintenance window. + repeated MachineID machine_ids = 1; + + // Interval during which this set of machines is expected to be down. + required Unavailability unavailability = 2; +} + + +/** + * A list of maintenance windows. + * For example, this may represent a rolling restart of agents. + */ +message Schedule { + repeated Window windows = 1; +} + + +/** + * Represents the maintenance status of each machine in the cluster. + * The lists correspond to the `MachineInfo.Mode` enumeration. + */ +message ClusterStatus { + message DrainingMachine { + required MachineID id = 1; + + // A list of the most recent responses to inverse offers from frameworks + // running on this draining machine. + repeated InverseOfferStatus statuses = 2; + } + + repeated DrainingMachine draining_machines = 1; + repeated MachineID down_machines = 2; +} diff --git a/mesosproto/maintenancepb_test.go b/mesosproto/maintenancepb_test.go new file mode 100644 index 00000000..320cee54 --- /dev/null +++ b/mesosproto/maintenancepb_test.go @@ -0,0 +1,945 @@ +// Code generated by protoc-gen-gogo. +// source: maintenance.proto +// DO NOT EDIT! + +package mesosproto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" + +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestWindowProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWindow(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Window{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWindowMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWindow(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Window{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWindowProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Window, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWindow(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWindowProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWindow(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Window{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestScheduleProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSchedule(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Schedule{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestScheduleMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSchedule(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Schedule{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkScheduleProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Schedule, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedSchedule(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkScheduleProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSchedule(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Schedule{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestClusterStatusProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ClusterStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestClusterStatusMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ClusterStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkClusterStatusProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ClusterStatus, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedClusterStatus(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkClusterStatusProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedClusterStatus(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ClusterStatus{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestClusterStatus_DrainingMachineProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus_DrainingMachine(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ClusterStatus_DrainingMachine{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestClusterStatus_DrainingMachineMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus_DrainingMachine(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ClusterStatus_DrainingMachine{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkClusterStatus_DrainingMachineProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ClusterStatus_DrainingMachine, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedClusterStatus_DrainingMachine(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkClusterStatus_DrainingMachineProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedClusterStatus_DrainingMachine(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ClusterStatus_DrainingMachine{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWindowJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWindow(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Window{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestScheduleJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSchedule(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Schedule{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestClusterStatusJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ClusterStatus{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestClusterStatus_DrainingMachineJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus_DrainingMachine(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ClusterStatus_DrainingMachine{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWindowProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWindow(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Window{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWindowProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWindow(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Window{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestScheduleProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSchedule(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Schedule{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestScheduleProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSchedule(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Schedule{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestClusterStatusProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ClusterStatus{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestClusterStatusProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ClusterStatus{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestClusterStatus_DrainingMachineProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus_DrainingMachine(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ClusterStatus_DrainingMachine{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestClusterStatus_DrainingMachineProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus_DrainingMachine(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ClusterStatus_DrainingMachine{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWindowStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWindow(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestScheduleStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSchedule(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestClusterStatusStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedClusterStatus(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestClusterStatus_DrainingMachineStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedClusterStatus_DrainingMachine(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWindowSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWindow(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWindowSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Window, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWindow(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestScheduleSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSchedule(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkScheduleSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Schedule, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedSchedule(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestClusterStatusSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkClusterStatusSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ClusterStatus, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedClusterStatus(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestClusterStatus_DrainingMachineSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedClusterStatus_DrainingMachine(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkClusterStatus_DrainingMachineSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ClusterStatus_DrainingMachine, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedClusterStatus_DrainingMachine(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWindowGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWindow(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestScheduleGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSchedule(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestClusterStatusGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedClusterStatus(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestClusterStatus_DrainingMachineGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedClusterStatus_DrainingMachine(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWindowVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWindow(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Window{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestScheduleVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSchedule(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Schedule{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestClusterStatusVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedClusterStatus(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ClusterStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestClusterStatus_DrainingMachineVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedClusterStatus_DrainingMachine(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ClusterStatus_DrainingMachine{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/mesosproto/mesos.pb.go b/mesosproto/mesos.pb.go index 0165ccaf..5f62c951 100644 --- a/mesosproto/mesos.pb.go +++ b/mesosproto/mesos.pb.go @@ -124,6 +124,54 @@ func (x *TaskState) UnmarshalJSON(data []byte) error { return nil } +// Describes the several states that a machine can be in. A `Mode` +// applies to a machine and to all associated slaves on the machine. +type MachineInfo_Mode int32 + +const ( + // In this mode, a machine is behaving normally; + // offering resources, executing tasks, etc. + MachineInfo_UP MachineInfo_Mode = 1 + // In this mode, all slaves on the machine are expected to cooperate with + // frameworks to drain resources. In general, draining is done ahead of + // a pending `unavailability`. The resources should be drained so as to + // maximize utilization prior to the maintenance but without knowingly + // violating the frameworks' requirements. + MachineInfo_DRAINING MachineInfo_Mode = 2 + // In this mode, a machine is not running any tasks and will not offer + // any of its resources. Slaves on the machine will not be allowed to + // register with the master. + MachineInfo_DOWN MachineInfo_Mode = 3 +) + +var MachineInfo_Mode_name = map[int32]string{ + 1: "UP", + 2: "DRAINING", + 3: "DOWN", +} +var MachineInfo_Mode_value = map[string]int32{ + "UP": 1, + "DRAINING": 2, + "DOWN": 3, +} + +func (x MachineInfo_Mode) Enum() *MachineInfo_Mode { + p := new(MachineInfo_Mode) + *p = x + return p +} +func (x MachineInfo_Mode) String() string { + return proto.EnumName(MachineInfo_Mode_name, int32(x)) +} +func (x *MachineInfo_Mode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MachineInfo_Mode_value, data, "MachineInfo_Mode") + if err != nil { + return err + } + *x = MachineInfo_Mode(value) + return nil +} + type FrameworkInfo_Capability_Type int32 const ( @@ -282,30 +330,46 @@ func (x *TaskStatus_Source) UnmarshalJSON(data []byte) error { type TaskStatus_Reason int32 const ( - TaskStatus_REASON_COMMAND_EXECUTOR_FAILED TaskStatus_Reason = 0 - TaskStatus_REASON_EXECUTOR_PREEMPTED TaskStatus_Reason = 17 - TaskStatus_REASON_EXECUTOR_TERMINATED TaskStatus_Reason = 1 - TaskStatus_REASON_EXECUTOR_UNREGISTERED TaskStatus_Reason = 2 - TaskStatus_REASON_FRAMEWORK_REMOVED TaskStatus_Reason = 3 - TaskStatus_REASON_GC_ERROR TaskStatus_Reason = 4 - TaskStatus_REASON_INVALID_FRAMEWORKID TaskStatus_Reason = 5 - TaskStatus_REASON_INVALID_OFFERS TaskStatus_Reason = 6 - TaskStatus_REASON_MASTER_DISCONNECTED TaskStatus_Reason = 7 - TaskStatus_REASON_MEMORY_LIMIT TaskStatus_Reason = 8 - TaskStatus_REASON_RECONCILIATION TaskStatus_Reason = 9 - TaskStatus_REASON_RESOURCES_UNKNOWN TaskStatus_Reason = 18 - TaskStatus_REASON_SLAVE_DISCONNECTED TaskStatus_Reason = 10 - TaskStatus_REASON_SLAVE_REMOVED TaskStatus_Reason = 11 - TaskStatus_REASON_SLAVE_RESTARTED TaskStatus_Reason = 12 - TaskStatus_REASON_SLAVE_UNKNOWN TaskStatus_Reason = 13 - TaskStatus_REASON_TASK_INVALID TaskStatus_Reason = 14 - TaskStatus_REASON_TASK_UNAUTHORIZED TaskStatus_Reason = 15 - TaskStatus_REASON_TASK_UNKNOWN TaskStatus_Reason = 16 + // TODO(jieyu): The default value when a caller doesn't check for + // presence is 0 and so ideally the 0 reason is not a valid one. + // Since this is not used anywhere, consider removing this reason. + TaskStatus_REASON_COMMAND_EXECUTOR_FAILED TaskStatus_Reason = 0 + TaskStatus_REASON_CONTAINER_LAUNCH_FAILED TaskStatus_Reason = 21 + TaskStatus_REASON_CONTAINER_LIMITATION TaskStatus_Reason = 19 + TaskStatus_REASON_CONTAINER_LIMITATION_DISK TaskStatus_Reason = 20 + TaskStatus_REASON_CONTAINER_LIMITATION_MEMORY TaskStatus_Reason = 8 + TaskStatus_REASON_CONTAINER_PREEMPTED TaskStatus_Reason = 17 + TaskStatus_REASON_CONTAINER_UPDATE_FAILED TaskStatus_Reason = 22 + TaskStatus_REASON_EXECUTOR_REGISTRATION_TIMEOUT TaskStatus_Reason = 23 + TaskStatus_REASON_EXECUTOR_REREGISTRATION_TIMEOUT TaskStatus_Reason = 24 + TaskStatus_REASON_EXECUTOR_TERMINATED TaskStatus_Reason = 1 + TaskStatus_REASON_EXECUTOR_UNREGISTERED TaskStatus_Reason = 2 + TaskStatus_REASON_FRAMEWORK_REMOVED TaskStatus_Reason = 3 + TaskStatus_REASON_GC_ERROR TaskStatus_Reason = 4 + TaskStatus_REASON_INVALID_FRAMEWORKID TaskStatus_Reason = 5 + TaskStatus_REASON_INVALID_OFFERS TaskStatus_Reason = 6 + TaskStatus_REASON_MASTER_DISCONNECTED TaskStatus_Reason = 7 + TaskStatus_REASON_RECONCILIATION TaskStatus_Reason = 9 + TaskStatus_REASON_RESOURCES_UNKNOWN TaskStatus_Reason = 18 + TaskStatus_REASON_SLAVE_DISCONNECTED TaskStatus_Reason = 10 + TaskStatus_REASON_SLAVE_REMOVED TaskStatus_Reason = 11 + TaskStatus_REASON_SLAVE_RESTARTED TaskStatus_Reason = 12 + TaskStatus_REASON_SLAVE_UNKNOWN TaskStatus_Reason = 13 + TaskStatus_REASON_TASK_INVALID TaskStatus_Reason = 14 + TaskStatus_REASON_TASK_UNAUTHORIZED TaskStatus_Reason = 15 + TaskStatus_REASON_TASK_UNKNOWN TaskStatus_Reason = 16 ) var TaskStatus_Reason_name = map[int32]string{ 0: "REASON_COMMAND_EXECUTOR_FAILED", - 17: "REASON_EXECUTOR_PREEMPTED", + 21: "REASON_CONTAINER_LAUNCH_FAILED", + 19: "REASON_CONTAINER_LIMITATION", + 20: "REASON_CONTAINER_LIMITATION_DISK", + 8: "REASON_CONTAINER_LIMITATION_MEMORY", + 17: "REASON_CONTAINER_PREEMPTED", + 22: "REASON_CONTAINER_UPDATE_FAILED", + 23: "REASON_EXECUTOR_REGISTRATION_TIMEOUT", + 24: "REASON_EXECUTOR_REREGISTRATION_TIMEOUT", 1: "REASON_EXECUTOR_TERMINATED", 2: "REASON_EXECUTOR_UNREGISTERED", 3: "REASON_FRAMEWORK_REMOVED", @@ -313,7 +377,6 @@ var TaskStatus_Reason_name = map[int32]string{ 5: "REASON_INVALID_FRAMEWORKID", 6: "REASON_INVALID_OFFERS", 7: "REASON_MASTER_DISCONNECTED", - 8: "REASON_MEMORY_LIMIT", 9: "REASON_RECONCILIATION", 18: "REASON_RESOURCES_UNKNOWN", 10: "REASON_SLAVE_DISCONNECTED", @@ -325,25 +388,31 @@ var TaskStatus_Reason_name = map[int32]string{ 16: "REASON_TASK_UNKNOWN", } var TaskStatus_Reason_value = map[string]int32{ - "REASON_COMMAND_EXECUTOR_FAILED": 0, - "REASON_EXECUTOR_PREEMPTED": 17, - "REASON_EXECUTOR_TERMINATED": 1, - "REASON_EXECUTOR_UNREGISTERED": 2, - "REASON_FRAMEWORK_REMOVED": 3, - "REASON_GC_ERROR": 4, - "REASON_INVALID_FRAMEWORKID": 5, - "REASON_INVALID_OFFERS": 6, - "REASON_MASTER_DISCONNECTED": 7, - "REASON_MEMORY_LIMIT": 8, - "REASON_RECONCILIATION": 9, - "REASON_RESOURCES_UNKNOWN": 18, - "REASON_SLAVE_DISCONNECTED": 10, - "REASON_SLAVE_REMOVED": 11, - "REASON_SLAVE_RESTARTED": 12, - "REASON_SLAVE_UNKNOWN": 13, - "REASON_TASK_INVALID": 14, - "REASON_TASK_UNAUTHORIZED": 15, - "REASON_TASK_UNKNOWN": 16, + "REASON_COMMAND_EXECUTOR_FAILED": 0, + "REASON_CONTAINER_LAUNCH_FAILED": 21, + "REASON_CONTAINER_LIMITATION": 19, + "REASON_CONTAINER_LIMITATION_DISK": 20, + "REASON_CONTAINER_LIMITATION_MEMORY": 8, + "REASON_CONTAINER_PREEMPTED": 17, + "REASON_CONTAINER_UPDATE_FAILED": 22, + "REASON_EXECUTOR_REGISTRATION_TIMEOUT": 23, + "REASON_EXECUTOR_REREGISTRATION_TIMEOUT": 24, + "REASON_EXECUTOR_TERMINATED": 1, + "REASON_EXECUTOR_UNREGISTERED": 2, + "REASON_FRAMEWORK_REMOVED": 3, + "REASON_GC_ERROR": 4, + "REASON_INVALID_FRAMEWORKID": 5, + "REASON_INVALID_OFFERS": 6, + "REASON_MASTER_DISCONNECTED": 7, + "REASON_RECONCILIATION": 9, + "REASON_RESOURCES_UNKNOWN": 18, + "REASON_SLAVE_DISCONNECTED": 10, + "REASON_SLAVE_REMOVED": 11, + "REASON_SLAVE_RESTARTED": 12, + "REASON_SLAVE_UNKNOWN": 13, + "REASON_TASK_INVALID": 14, + "REASON_TASK_UNAUTHORIZED": 15, + "REASON_TASK_UNKNOWN": 16, } func (x TaskStatus_Reason) Enum() *TaskStatus_Reason { @@ -429,6 +498,39 @@ func (x *Volume_Mode) UnmarshalJSON(data []byte) error { return nil } +type NetworkInfo_Protocol int32 + +const ( + NetworkInfo_IPv4 NetworkInfo_Protocol = 1 + NetworkInfo_IPv6 NetworkInfo_Protocol = 2 +) + +var NetworkInfo_Protocol_name = map[int32]string{ + 1: "IPv4", + 2: "IPv6", +} +var NetworkInfo_Protocol_value = map[string]int32{ + "IPv4": 1, + "IPv6": 2, +} + +func (x NetworkInfo_Protocol) Enum() *NetworkInfo_Protocol { + p := new(NetworkInfo_Protocol) + *p = x + return p +} +func (x NetworkInfo_Protocol) String() string { + return proto.EnumName(NetworkInfo_Protocol_name, int32(x)) +} +func (x *NetworkInfo_Protocol) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NetworkInfo_Protocol_value, data, "NetworkInfo_Protocol") + if err != nil { + return err + } + *x = NetworkInfo_Protocol(value) + return nil +} + // All container implementation types. type ContainerInfo_Type int32 @@ -649,6 +751,40 @@ func (m *ContainerID) GetValue() string { return "" } +// * +// Represents time since the epoch, in nanoseconds. +type TimeInfo struct { + Nanoseconds *int64 `protobuf:"varint,1,req,name=nanoseconds" json:"nanoseconds,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TimeInfo) Reset() { *m = TimeInfo{} } +func (*TimeInfo) ProtoMessage() {} + +func (m *TimeInfo) GetNanoseconds() int64 { + if m != nil && m.Nanoseconds != nil { + return *m.Nanoseconds + } + return 0 +} + +// * +// Represents duration in nanoseconds. +type DurationInfo struct { + Nanoseconds *int64 `protobuf:"varint,1,req,name=nanoseconds" json:"nanoseconds,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DurationInfo) Reset() { *m = DurationInfo{} } +func (*DurationInfo) ProtoMessage() {} + +func (m *DurationInfo) GetNanoseconds() int64 { + if m != nil && m.Nanoseconds != nil { + return *m.Nanoseconds + } + return 0 +} + // * // A network address. // @@ -734,6 +870,101 @@ func (m *URL) GetFragment() string { return "" } +// * +// Represents an interval, from a given start time over a given duration. +// This interval pertains to an unavailability event, such as maintenance, +// and is not a generic interval. +type Unavailability struct { + Start *TimeInfo `protobuf:"bytes,1,req,name=start" json:"start,omitempty"` + // When added to `start`, this represents the end of the interval. + // If unspecified, the duration is assumed to be infinite. + Duration *DurationInfo `protobuf:"bytes,2,opt,name=duration" json:"duration,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Unavailability) Reset() { *m = Unavailability{} } +func (*Unavailability) ProtoMessage() {} + +func (m *Unavailability) GetStart() *TimeInfo { + if m != nil { + return m.Start + } + return nil +} + +func (m *Unavailability) GetDuration() *DurationInfo { + if m != nil { + return m.Duration + } + return nil +} + +// * +// Represents a single machine, which may hold one or more slaves. +// +// NOTE: In order to match a slave to a machine, both the `hostname` and +// `ip` must match the values advertised by the slave to the master. +// Hostname is not case-sensitive. +type MachineID struct { + Hostname *string `protobuf:"bytes,1,opt,name=hostname" json:"hostname,omitempty"` + Ip *string `protobuf:"bytes,2,opt,name=ip" json:"ip,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MachineID) Reset() { *m = MachineID{} } +func (*MachineID) ProtoMessage() {} + +func (m *MachineID) GetHostname() string { + if m != nil && m.Hostname != nil { + return *m.Hostname + } + return "" +} + +func (m *MachineID) GetIp() string { + if m != nil && m.Ip != nil { + return *m.Ip + } + return "" +} + +// * +// Holds information about a single machine, its `mode`, and any other +// relevant information which may affect the behavior of the machine. +type MachineInfo struct { + Id *MachineID `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` + Mode *MachineInfo_Mode `protobuf:"varint,2,opt,name=mode,enum=mesosproto.MachineInfo_Mode" json:"mode,omitempty"` + // Signifies that the machine may be unavailable during the given interval. + // See comments in `Unavailability` and for the `unavailability` fields + // in `Offer` and `InverseOffer` for more information. + Unavailability *Unavailability `protobuf:"bytes,3,opt,name=unavailability" json:"unavailability,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MachineInfo) Reset() { *m = MachineInfo{} } +func (*MachineInfo) ProtoMessage() {} + +func (m *MachineInfo) GetId() *MachineID { + if m != nil { + return m.Id + } + return nil +} + +func (m *MachineInfo) GetMode() MachineInfo_Mode { + if m != nil && m.Mode != nil { + return *m.Mode + } + return MachineInfo_UP +} + +func (m *MachineInfo) GetUnavailability() *Unavailability { + if m != nil { + return m.Unavailability + } + return nil +} + // * // Describes a framework. type FrameworkInfo struct { @@ -2326,8 +2557,10 @@ type ResourceUsage_Executor struct { Allocated []*Resource `protobuf:"bytes,2,rep,name=allocated" json:"allocated,omitempty"` // Current resource usage. If absent, the containerizer // cannot provide resource usage. - Statistics *ResourceStatistics `protobuf:"bytes,3,opt,name=statistics" json:"statistics,omitempty"` - XXX_unrecognized []byte `json:"-"` + Statistics *ResourceStatistics `protobuf:"bytes,3,opt,name=statistics" json:"statistics,omitempty"` + // The container id for the executor specified in the executor_info field. + ContainerId *ContainerID `protobuf:"bytes,4,req,name=container_id" json:"container_id,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *ResourceUsage_Executor) Reset() { *m = ResourceUsage_Executor{} } @@ -2354,6 +2587,13 @@ func (m *ResourceUsage_Executor) GetStatistics() *ResourceStatistics { return nil } +func (m *ResourceUsage_Executor) GetContainerId() *ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + // * // Describes a sample of events from "perf stat". Only available on // Linux. @@ -2836,11 +3076,22 @@ type Offer struct { SlaveId *SlaveID `protobuf:"bytes,3,req,name=slave_id" json:"slave_id,omitempty"` Hostname *string `protobuf:"bytes,4,req,name=hostname" json:"hostname,omitempty"` // URL for reaching the slave running on the host. - Url *URL `protobuf:"bytes,8,opt,name=url" json:"url,omitempty"` - Resources []*Resource `protobuf:"bytes,5,rep,name=resources" json:"resources,omitempty"` - Attributes []*Attribute `protobuf:"bytes,7,rep,name=attributes" json:"attributes,omitempty"` - ExecutorIds []*ExecutorID `protobuf:"bytes,6,rep,name=executor_ids" json:"executor_ids,omitempty"` - XXX_unrecognized []byte `json:"-"` + Url *URL `protobuf:"bytes,8,opt,name=url" json:"url,omitempty"` + Resources []*Resource `protobuf:"bytes,5,rep,name=resources" json:"resources,omitempty"` + Attributes []*Attribute `protobuf:"bytes,7,rep,name=attributes" json:"attributes,omitempty"` + ExecutorIds []*ExecutorID `protobuf:"bytes,6,rep,name=executor_ids" json:"executor_ids,omitempty"` + // Signifies that the resources in this Offer may be unavailable during + // the given interval. Any tasks launched using these resources may be + // killed when the interval arrives. For example, these resources may be + // part of a planned maintenance schedule. + // + // This field only provides information about a planned unavailability. + // The unavailability interval may not necessarily start at exactly this + // interval, nor last for exactly the duration of this interval. + // The unavailability may also be forever! See comments in + // `Unavailability` for more details. + Unavailability *Unavailability `protobuf:"bytes,9,opt,name=unavailability" json:"unavailability,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Offer) Reset() { *m = Offer{} } @@ -2902,6 +3153,13 @@ func (m *Offer) GetExecutorIds() []*ExecutorID { return nil } +func (m *Offer) GetUnavailability() *Unavailability { + if m != nil { + return m.Unavailability + } + return nil +} + // Defines an operation that can be performed against offers. type Offer_Operation struct { Type *Offer_Operation_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Offer_Operation_Type" json:"type,omitempty"` @@ -3033,6 +3291,93 @@ func (m *Offer_Operation_Destroy) GetVolumes() []*Resource { return nil } +// * +// A request to return some resources occupied by a framework. +type InverseOffer struct { + // This is the same OfferID as found in normal offers, which allows + // re-use of some of the OfferID-only messages. + Id *OfferID `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` + // URL for reaching the slave running on the host. This enables some + // optimizations as described in MESOS-3012, such as allowing the + // scheduler driver to bypass the master and talk directly with a slave. + Url *URL `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` + // The framework that should release its resources. + // If no specifics are provided (i.e. which slave), all the framework's + // resources are requested back. + FrameworkId *FrameworkID `protobuf:"bytes,3,req,name=framework_id" json:"framework_id,omitempty"` + // Specified if the resources need to be released from a particular slave. + // All the framework's resources on this slave are requested back, + // unless further qualified by the `resources` field. + SlaveId *SlaveID `protobuf:"bytes,4,opt,name=slave_id" json:"slave_id,omitempty"` + // This InverseOffer represents a planned unavailability event in the + // specified interval. Any tasks running on the given framework or slave + // may be killed when the interval arrives. Therefore, frameworks should + // aim to gracefully terminate tasks prior to the arrival of the interval. + // + // For reserved resources, the resources are expected to be returned to the + // framework after the unavailability interval. This is an expectation, + // not a guarantee. For example, if the unavailability duration is not set, + // the resources may be removed permanently. + // + // For other resources, there is no guarantee that requested resources will + // be returned after the unavailability interval. The allocator has no + // obligation to re-offer these resources to the prior framework after + // the unavailability. + Unavailability *Unavailability `protobuf:"bytes,5,req,name=unavailability" json:"unavailability,omitempty"` + // A list of resources being requested back from the framework, + // on the slave identified by `slave_id`. If no resources are specified + // then all resources are being requested back. For the purpose of + // maintenance, this field is always empty (maintenance always requests + // all resources back). + Resources []*Resource `protobuf:"bytes,6,rep,name=resources" json:"resources,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *InverseOffer) Reset() { *m = InverseOffer{} } +func (*InverseOffer) ProtoMessage() {} + +func (m *InverseOffer) GetId() *OfferID { + if m != nil { + return m.Id + } + return nil +} + +func (m *InverseOffer) GetUrl() *URL { + if m != nil { + return m.Url + } + return nil +} + +func (m *InverseOffer) GetFrameworkId() *FrameworkID { + if m != nil { + return m.FrameworkId + } + return nil +} + +func (m *InverseOffer) GetSlaveId() *SlaveID { + if m != nil { + return m.SlaveId + } + return nil +} + +func (m *InverseOffer) GetUnavailability() *Unavailability { + if m != nil { + return m.Unavailability + } + return nil +} + +func (m *InverseOffer) GetResources() []*Resource { + if m != nil { + return m.Resources + } + return nil +} + // * // Describes a task. Passed from the scheduler all the way to an // executor (see SchedulerDriver::launchTasks and @@ -3179,8 +3524,11 @@ type TaskStatus struct { // will be kept in memory on master and slave processes. Therefore, // labels should be used to tag TaskStatus message with light-weight // meta-data. - Labels *Labels `protobuf:"bytes,12,opt,name=labels" json:"labels,omitempty"` - XXX_unrecognized []byte `json:"-"` + Labels *Labels `protobuf:"bytes,12,opt,name=labels" json:"labels,omitempty"` + // Container related information that is resolved dynamically such as + // network address. + ContainerStatus *ContainerStatus `protobuf:"bytes,13,opt,name=container_status" json:"container_status,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *TaskStatus) Reset() { *m = TaskStatus{} } @@ -3270,6 +3618,13 @@ func (m *TaskStatus) GetLabels() *Labels { return nil } +func (m *TaskStatus) GetContainerStatus() *ContainerStatus { + if m != nil { + return m.ContainerStatus + } + return nil +} + // * // Describes possible filters that can be applied to unused resources // (see SchedulerDriver::launchTasks) to influence the allocator. @@ -3390,7 +3745,7 @@ func (m *Parameters) GetParameter() []*Parameter { // framework's executors/tasks are run. type Credential struct { Principal *string `protobuf:"bytes,1,req,name=principal" json:"principal,omitempty"` - Secret []byte `protobuf:"bytes,2,opt,name=secret" json:"secret,omitempty"` + Secret *string `protobuf:"bytes,2,opt,name=secret" json:"secret,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -3404,11 +3759,11 @@ func (m *Credential) GetPrincipal() string { return "" } -func (m *Credential) GetSecret() []byte { - if m != nil { - return m.Secret +func (m *Credential) GetSecret() string { + if m != nil && m.Secret != nil { + return *m.Secret } - return nil + return "" } // * @@ -3439,7 +3794,7 @@ type RateLimit struct { // which also implies unlimited capacity. Qps *float64 `protobuf:"fixed64,1,opt,name=qps" json:"qps,omitempty"` // Principal of framework(s) to be throttled. Should match - // FrameworkInfo.princpal and Credential.principal (if using authentication). + // FrameworkInfo.principal and Credential.principal (if using authentication). Principal *string `protobuf:"bytes,2,req,name=principal" json:"principal,omitempty"` // Max number of outstanding messages from frameworks of this principal // allowed by master before the next message is dropped and an error is sent @@ -3525,7 +3880,7 @@ type Image struct { Type *Image_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Image_Type" json:"type,omitempty"` // Only one of the following image messages should be set to match // the type. - Appc *Image_AppC `protobuf:"bytes,2,opt,name=appc" json:"appc,omitempty"` + Appc *Image_Appc `protobuf:"bytes,2,opt,name=appc" json:"appc,omitempty"` Docker *Image_Docker `protobuf:"bytes,3,opt,name=docker" json:"docker,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -3540,7 +3895,7 @@ func (m *Image) GetType() Image_Type { return Image_APPC } -func (m *Image) GetAppc() *Image_AppC { +func (m *Image) GetAppc() *Image_Appc { if m != nil { return m.Appc } @@ -3556,7 +3911,7 @@ func (m *Image) GetDocker() *Image_Docker { // Protobuf for specifying an Appc container image. See: // https://github.com/appc/spec/blob/master/spec/aci.md -type Image_AppC struct { +type Image_Appc struct { // The name of the image. Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` // An image ID is a string of the format "hash-value", where @@ -3569,24 +3924,24 @@ type Image_AppC struct { XXX_unrecognized []byte `json:"-"` } -func (m *Image_AppC) Reset() { *m = Image_AppC{} } -func (*Image_AppC) ProtoMessage() {} +func (m *Image_Appc) Reset() { *m = Image_Appc{} } +func (*Image_Appc) ProtoMessage() {} -func (m *Image_AppC) GetName() string { +func (m *Image_Appc) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } -func (m *Image_AppC) GetId() string { +func (m *Image_Appc) GetId() string { if m != nil && m.Id != nil { return *m.Id } return "" } -func (m *Image_AppC) GetLabels() *Labels { +func (m *Image_Appc) GetLabels() *Labels { if m != nil { return m.Labels } @@ -3594,7 +3949,10 @@ func (m *Image_AppC) GetLabels() *Labels { } type Image_Docker struct { - // The name of the image. Expected in format repository[:tag]. + // The name of the image. Expected format: + // [REGISTRY_HOST[:REGISTRY_PORT]/]REPOSITORY[:TAG|@TYPE:DIGEST] + // + // See: https://docs.docker.com/reference/commandline/pull/ Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -3659,6 +4017,135 @@ func (m *Volume) GetImage() *Image { return nil } +// * +// Describes a network request from a framework as well as network resolution +// provided by Mesos. +// +// A Framework may request the network isolator on the Agent to isolate the +// container in a network namespace and create a virtual network interface. +// The `NetworkInfo` message describes the properties of that virtual +// interface, including the IP addresses and network isolation policy +// (network group membership). +// +// The NetworkInfo message is not interpreted by the Master or Agent and is +// intended to be used by Agent and Master modules implementing network +// isolation. If the modules are missing, the message is simply ignored. In +// future, the task launch will fail if there is no module providing the +// network isolation capabilities (MESOS-3390). +// +// An executor, Agent, or an Agent module may append NetworkInfos inside +// TaskStatus::container_status to provide information such as the container IP +// address and isolation groups. +type NetworkInfo struct { + // When included in a ContainerInfo, each of these represent a + // request for an IP address. Each request can specify an explicit address + // or the IP protocol to use. + // + // When included in a TaskStatus message, these inform the framework + // scheduler about the IP addresses that are bound to the container + // interface. When there are no custom network isolator modules installed, + // this field is filled in automatically with the Agent IP address. + IpAddresses []*NetworkInfo_IPAddress `protobuf:"bytes,5,rep,name=ip_addresses" json:"ip_addresses,omitempty"` + // Specify IP address requirement. Set protocol to the desired value to + // request the network isolator on the Agent to assign an IP address to the + // container being launched. If a specific IP address is specified in + // ip_address, this field should not be set. + Protocol *NetworkInfo_Protocol `protobuf:"varint,1,opt,name=protocol,enum=mesosproto.NetworkInfo_Protocol" json:"protocol,omitempty"` + // Statically assigned IP provided by the Framework. This IP will be assigned + // to the container by the network isolator module on the Agent. This field + // should not be used with the protocol field above. + // NOTE: It is up to the networking 'provider' (IPAM/Isolator) to interpret + // this either as a hint of as a requirement for assigning the IP. + IpAddress *string `protobuf:"bytes,2,opt,name=ip_address" json:"ip_address,omitempty"` + // A group is the name given to a set of logically-related interfaces that + // are allowed to communicate among themselves. Network traffic is allowed + // between two container interfaces that share at least one network group. + // For example, one might want to create separate groups for isolating dev, + // testing, qa and prod deployment environments. + Groups []string `protobuf:"bytes,3,rep,name=groups" json:"groups,omitempty"` + // To tag certain metadata to be used by Isolator/IPAM, e.g., rack, etc. + Labels *Labels `protobuf:"bytes,4,opt,name=labels" json:"labels,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NetworkInfo) Reset() { *m = NetworkInfo{} } +func (*NetworkInfo) ProtoMessage() {} + +func (m *NetworkInfo) GetIpAddresses() []*NetworkInfo_IPAddress { + if m != nil { + return m.IpAddresses + } + return nil +} + +func (m *NetworkInfo) GetProtocol() NetworkInfo_Protocol { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return NetworkInfo_IPv4 +} + +func (m *NetworkInfo) GetIpAddress() string { + if m != nil && m.IpAddress != nil { + return *m.IpAddress + } + return "" +} + +func (m *NetworkInfo) GetGroups() []string { + if m != nil { + return m.Groups + } + return nil +} + +func (m *NetworkInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +// Specifies a request for an IP address, or reports the assigned container +// IP address. +// +// Users can request an automatically assigned IP (for example, via an +// IPAM service) or a specific IP by adding a NetworkInfo to the +// ContainerInfo for a task. On a request, specifying neither `protocol` +// nor `ip_address` means that any available address may be assigned. +type NetworkInfo_IPAddress struct { + // Specify IP address requirement. Set protocol to the desired value to + // request the network isolator on the Agent to assign an IP address to the + // container being launched. If a specific IP address is specified in + // ip_address, this field should not be set. + Protocol *NetworkInfo_Protocol `protobuf:"varint,1,opt,name=protocol,enum=mesosproto.NetworkInfo_Protocol" json:"protocol,omitempty"` + // Statically assigned IP provided by the Framework. This IP will be + // assigned to the container by the network isolator module on the Agent. + // This field should not be used with the protocol field above. + // + // If an explicit address is requested but is unavailable, the network + // isolator should fail the task. + IpAddress *string `protobuf:"bytes,2,opt,name=ip_address" json:"ip_address,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NetworkInfo_IPAddress) Reset() { *m = NetworkInfo_IPAddress{} } +func (*NetworkInfo_IPAddress) ProtoMessage() {} + +func (m *NetworkInfo_IPAddress) GetProtocol() NetworkInfo_Protocol { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return NetworkInfo_IPv4 +} + +func (m *NetworkInfo_IPAddress) GetIpAddress() string { + if m != nil && m.IpAddress != nil { + return *m.IpAddress + } + return "" +} + // * // Describes a container configuration and allows extensible // configurations for different container implementations. @@ -3668,9 +4155,12 @@ type ContainerInfo struct { Hostname *string `protobuf:"bytes,4,opt,name=hostname" json:"hostname,omitempty"` // Only one of the following *Info messages should be set to match // the type. - Docker *ContainerInfo_DockerInfo `protobuf:"bytes,3,opt,name=docker" json:"docker,omitempty"` - Mesos *ContainerInfo_MesosInfo `protobuf:"bytes,5,opt,name=mesos" json:"mesos,omitempty"` - XXX_unrecognized []byte `json:"-"` + Docker *ContainerInfo_DockerInfo `protobuf:"bytes,3,opt,name=docker" json:"docker,omitempty"` + Mesos *ContainerInfo_MesosInfo `protobuf:"bytes,5,opt,name=mesos" json:"mesos,omitempty"` + // A list of network requests. A framework can request multiple IP addresses + // for the container. + NetworkInfos []*NetworkInfo `protobuf:"bytes,7,rep,name=network_infos" json:"network_infos,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *ContainerInfo) Reset() { *m = ContainerInfo{} } @@ -3711,6 +4201,13 @@ func (m *ContainerInfo) GetMesos() *ContainerInfo_MesosInfo { return nil } +func (m *ContainerInfo) GetNetworkInfos() []*NetworkInfo { + if m != nil { + return m.NetworkInfos + } + return nil +} + type ContainerInfo_DockerInfo struct { // The docker image that is going to be passed to the registry. Image *string `protobuf:"bytes,1,req,name=image" json:"image,omitempty"` @@ -3824,6 +4321,25 @@ func (m *ContainerInfo_MesosInfo) GetImage() *Image { return nil } +// * +// Container related information that is resolved during container setup. The +// information is sent back to the framework as part of the TaskStatus message. +type ContainerStatus struct { + // This field can be reliably used to identify the container IP address. + NetworkInfos []*NetworkInfo `protobuf:"bytes,1,rep,name=network_infos" json:"network_infos,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } +func (*ContainerStatus) ProtoMessage() {} + +func (m *ContainerStatus) GetNetworkInfos() []*NetworkInfo { + if m != nil { + return m.NetworkInfos + } + return nil +} + // * // Collection of labels. type Labels struct { @@ -3869,10 +4385,11 @@ func (m *Label) GetValue() string { // * // Named port used for service discovery. type Port struct { - Number *uint32 `protobuf:"varint,1,req,name=number" json:"number,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` - XXX_unrecognized []byte `json:"-"` + Number *uint32 `protobuf:"varint,1,req,name=number" json:"number,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` + Visibility *DiscoveryInfo_Visibility `protobuf:"varint,4,opt,name=visibility,enum=mesosproto.DiscoveryInfo_Visibility" json:"visibility,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Port) Reset() { *m = Port{} } @@ -3899,6 +4416,13 @@ func (m *Port) GetProtocol() string { return "" } +func (m *Port) GetVisibility() DiscoveryInfo_Visibility { + if m != nil && m.Visibility != nil { + return *m.Visibility + } + return DiscoveryInfo_FRAMEWORK +} + // * // Collection of ports. type Ports struct { @@ -3918,15 +4442,16 @@ func (m *Ports) GetPorts() []*Port { // * // Service discovery information. -// The visibility field restricts discovery within a framework -// (FRAMEWORK), within a Mesos cluster (CLUSTER), or places no -// restrictions (EXTERNAL). -// The environment, location, and version fields provide first class -// support for common attributes used to differentiate between -// similar services. The environment may receive values such as -// PROD/QA/DEV, the location field may receive values like -// EAST-US/WEST-US/EUROPE/AMEA, and the version field may receive -// values like v2.0/v0.9. The exact use of these fields is up to each +// The visibility field restricts discovery within a framework (FRAMEWORK), +// within a Mesos cluster (CLUSTER), or places no restrictions (EXTERNAL). +// Each port in the ports field also has an optional visibility field. +// If visibility is specified for a port, it overrides the default service-wide +// DiscoveryInfo.visibility for that port. +// The environment, location, and version fields provide first class support for +// common attributes used to differentiate between similar services. The +// environment may receive values such as PROD/QA/DEV, the location field may +// receive values like EAST-US/WEST-US/EUROPE/AMEA, and the version field may +// receive values like v2.0/v0.9. The exact use of these fields is up to each // service discovery system. type DiscoveryInfo struct { Visibility *DiscoveryInfo_Visibility `protobuf:"varint,1,req,name=visibility,enum=mesosproto.DiscoveryInfo_Visibility" json:"visibility,omitempty"` @@ -4098,6 +4623,7 @@ func (m *AppcImageManifest_Annotation) GetValue() string { func init() { proto.RegisterEnum("mesosproto.Status", Status_name, Status_value) proto.RegisterEnum("mesosproto.TaskState", TaskState_name, TaskState_value) + proto.RegisterEnum("mesosproto.MachineInfo_Mode", MachineInfo_Mode_name, MachineInfo_Mode_value) proto.RegisterEnum("mesosproto.FrameworkInfo_Capability_Type", FrameworkInfo_Capability_Type_name, FrameworkInfo_Capability_Type_value) proto.RegisterEnum("mesosproto.Value_Type", Value_Type_name, Value_Type_value) proto.RegisterEnum("mesosproto.Offer_Operation_Type", Offer_Operation_Type_name, Offer_Operation_Type_value) @@ -4105,6 +4631,7 @@ func init() { proto.RegisterEnum("mesosproto.TaskStatus_Reason", TaskStatus_Reason_name, TaskStatus_Reason_value) proto.RegisterEnum("mesosproto.Image_Type", Image_Type_name, Image_Type_value) proto.RegisterEnum("mesosproto.Volume_Mode", Volume_Mode_name, Volume_Mode_value) + proto.RegisterEnum("mesosproto.NetworkInfo_Protocol", NetworkInfo_Protocol_name, NetworkInfo_Protocol_value) proto.RegisterEnum("mesosproto.ContainerInfo_Type", ContainerInfo_Type_name, ContainerInfo_Type_value) proto.RegisterEnum("mesosproto.ContainerInfo_DockerInfo_Network", ContainerInfo_DockerInfo_Network_name, ContainerInfo_DockerInfo_Network_value) proto.RegisterEnum("mesosproto.DiscoveryInfo_Visibility", DiscoveryInfo_Visibility_name, DiscoveryInfo_Visibility_value) @@ -4517,6 +5044,142 @@ func (this *ContainerID) Equal(that interface{}) bool { } return true } +func (this *TimeInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TimeInfo) + if !ok { + return fmt.Errorf("that is not of type *TimeInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TimeInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TimeInfobut is not nil && this == nil") + } + if this.Nanoseconds != nil && that1.Nanoseconds != nil { + if *this.Nanoseconds != *that1.Nanoseconds { + return fmt.Errorf("Nanoseconds this(%v) Not Equal that(%v)", *this.Nanoseconds, *that1.Nanoseconds) + } + } else if this.Nanoseconds != nil { + return fmt.Errorf("this.Nanoseconds == nil && that.Nanoseconds != nil") + } else if that1.Nanoseconds != nil { + return fmt.Errorf("Nanoseconds this(%v) Not Equal that(%v)", this.Nanoseconds, that1.Nanoseconds) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TimeInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TimeInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Nanoseconds != nil && that1.Nanoseconds != nil { + if *this.Nanoseconds != *that1.Nanoseconds { + return false + } + } else if this.Nanoseconds != nil { + return false + } else if that1.Nanoseconds != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DurationInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DurationInfo) + if !ok { + return fmt.Errorf("that is not of type *DurationInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DurationInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DurationInfobut is not nil && this == nil") + } + if this.Nanoseconds != nil && that1.Nanoseconds != nil { + if *this.Nanoseconds != *that1.Nanoseconds { + return fmt.Errorf("Nanoseconds this(%v) Not Equal that(%v)", *this.Nanoseconds, *that1.Nanoseconds) + } + } else if this.Nanoseconds != nil { + return fmt.Errorf("this.Nanoseconds == nil && that.Nanoseconds != nil") + } else if that1.Nanoseconds != nil { + return fmt.Errorf("Nanoseconds this(%v) Not Equal that(%v)", this.Nanoseconds, that1.Nanoseconds) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DurationInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DurationInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Nanoseconds != nil && that1.Nanoseconds != nil { + if *this.Nanoseconds != *that1.Nanoseconds { + return false + } + } else if this.Nanoseconds != nil { + return false + } else if that1.Nanoseconds != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *Address) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -4747,6 +5410,234 @@ func (this *URL) Equal(that interface{}) bool { } return true } +func (this *Unavailability) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unavailability) + if !ok { + return fmt.Errorf("that is not of type *Unavailability") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unavailability but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unavailabilitybut is not nil && this == nil") + } + if !this.Start.Equal(that1.Start) { + return fmt.Errorf("Start this(%v) Not Equal that(%v)", this.Start, that1.Start) + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Unavailability) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unavailability) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Start.Equal(that1.Start) { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MachineID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MachineID) + if !ok { + return fmt.Errorf("that is not of type *MachineID") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MachineID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MachineIDbut is not nil && this == nil") + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.Ip != nil && that1.Ip != nil { + if *this.Ip != *that1.Ip { + return fmt.Errorf("Ip this(%v) Not Equal that(%v)", *this.Ip, *that1.Ip) + } + } else if this.Ip != nil { + return fmt.Errorf("this.Ip == nil && that.Ip != nil") + } else if that1.Ip != nil { + return fmt.Errorf("Ip this(%v) Not Equal that(%v)", this.Ip, that1.Ip) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MachineID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MachineID) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if this.Ip != nil && that1.Ip != nil { + if *this.Ip != *that1.Ip { + return false + } + } else if this.Ip != nil { + return false + } else if that1.Ip != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MachineInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MachineInfo) + if !ok { + return fmt.Errorf("that is not of type *MachineInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MachineInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MachineInfobut is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", *this.Mode, *that1.Mode) + } + } else if this.Mode != nil { + return fmt.Errorf("this.Mode == nil && that.Mode != nil") + } else if that1.Mode != nil { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", this.Mode, that1.Mode) + } + if !this.Unavailability.Equal(that1.Unavailability) { + return fmt.Errorf("Unavailability this(%v) Not Equal that(%v)", this.Unavailability, that1.Unavailability) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MachineInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MachineInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return false + } + } else if this.Mode != nil { + return false + } else if that1.Mode != nil { + return false + } + if !this.Unavailability.Equal(that1.Unavailability) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *FrameworkInfo) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -8153,6 +9044,9 @@ func (this *ResourceUsage_Executor) VerboseEqual(that interface{}) error { if !this.Statistics.Equal(that1.Statistics) { return fmt.Errorf("Statistics this(%v) Not Equal that(%v)", this.Statistics, that1.Statistics) } + if !this.ContainerId.Equal(that1.ContainerId) { + return fmt.Errorf("ContainerId this(%v) Not Equal that(%v)", this.ContainerId, that1.ContainerId) + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -8192,6 +9086,9 @@ func (this *ResourceUsage_Executor) Equal(that interface{}) bool { if !this.Statistics.Equal(that1.Statistics) { return false } + if !this.ContainerId.Equal(that1.ContainerId) { + return false + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -9338,6 +10235,9 @@ func (this *Offer) VerboseEqual(that interface{}) error { return fmt.Errorf("ExecutorIds this[%v](%v) Not Equal that[%v](%v)", i, this.ExecutorIds[i], i, that1.ExecutorIds[i]) } } + if !this.Unavailability.Equal(that1.Unavailability) { + return fmt.Errorf("Unavailability this(%v) Not Equal that(%v)", this.Unavailability, that1.Unavailability) + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -9408,6 +10308,9 @@ func (this *Offer) Equal(that interface{}) bool { return false } } + if !this.Unavailability.Equal(that1.Unavailability) { + return false + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -9841,6 +10744,102 @@ func (this *Offer_Operation_Destroy) Equal(that interface{}) bool { } return true } +func (this *InverseOffer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*InverseOffer) + if !ok { + return fmt.Errorf("that is not of type *InverseOffer") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *InverseOffer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *InverseOfferbut is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Url.Equal(that1.Url) { + return fmt.Errorf("Url this(%v) Not Equal that(%v)", this.Url, that1.Url) + } + if !this.FrameworkId.Equal(that1.FrameworkId) { + return fmt.Errorf("FrameworkId this(%v) Not Equal that(%v)", this.FrameworkId, that1.FrameworkId) + } + if !this.SlaveId.Equal(that1.SlaveId) { + return fmt.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) + } + if !this.Unavailability.Equal(that1.Unavailability) { + return fmt.Errorf("Unavailability this(%v) Not Equal that(%v)", this.Unavailability, that1.Unavailability) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *InverseOffer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*InverseOffer) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Url.Equal(that1.Url) { + return false + } + if !this.FrameworkId.Equal(that1.FrameworkId) { + return false + } + if !this.SlaveId.Equal(that1.SlaveId) { + return false + } + if !this.Unavailability.Equal(that1.Unavailability) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *TaskInfo) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -10071,6 +11070,9 @@ func (this *TaskStatus) VerboseEqual(that interface{}) error { if !this.Labels.Equal(that1.Labels) { return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) } + if !this.ContainerStatus.Equal(that1.ContainerStatus) { + return fmt.Errorf("ContainerStatus this(%v) Not Equal that(%v)", this.ContainerStatus, that1.ContainerStatus) + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -10168,6 +11170,9 @@ func (this *TaskStatus) Equal(that interface{}) bool { if !this.Labels.Equal(that1.Labels) { return false } + if !this.ContainerStatus.Equal(that1.ContainerStatus) { + return false + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -10574,7 +11579,13 @@ func (this *Credential) VerboseEqual(that interface{}) error { } else if that1.Principal != nil { return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) } - if !bytes.Equal(this.Secret, that1.Secret) { + if this.Secret != nil && that1.Secret != nil { + if *this.Secret != *that1.Secret { + return fmt.Errorf("Secret this(%v) Not Equal that(%v)", *this.Secret, *that1.Secret) + } + } else if this.Secret != nil { + return fmt.Errorf("this.Secret == nil && that.Secret != nil") + } else if that1.Secret != nil { return fmt.Errorf("Secret this(%v) Not Equal that(%v)", this.Secret, that1.Secret) } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { @@ -10611,7 +11622,13 @@ func (this *Credential) Equal(that interface{}) bool { } else if that1.Principal != nil { return false } - if !bytes.Equal(this.Secret, that1.Secret) { + if this.Secret != nil && that1.Secret != nil { + if *this.Secret != *that1.Secret { + return false + } + } else if this.Secret != nil { + return false + } else if that1.Secret != nil { return false } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { @@ -10971,7 +11988,7 @@ func (this *Image) Equal(that interface{}) bool { } return true } -func (this *Image_AppC) VerboseEqual(that interface{}) error { +func (this *Image_Appc) VerboseEqual(that interface{}) error { if that == nil { if this == nil { return nil @@ -10979,17 +11996,17 @@ func (this *Image_AppC) VerboseEqual(that interface{}) error { return fmt.Errorf("that == nil && this != nil") } - that1, ok := that.(*Image_AppC) + that1, ok := that.(*Image_Appc) if !ok { - return fmt.Errorf("that is not of type *Image_AppC") + return fmt.Errorf("that is not of type *Image_Appc") } if that1 == nil { if this == nil { return nil } - return fmt.Errorf("that is type *Image_AppC but is nil && this != nil") + return fmt.Errorf("that is type *Image_Appc but is nil && this != nil") } else if this == nil { - return fmt.Errorf("that is type *Image_AppCbut is not nil && this == nil") + return fmt.Errorf("that is type *Image_Appcbut is not nil && this == nil") } if this.Name != nil && that1.Name != nil { if *this.Name != *that1.Name { @@ -11017,7 +12034,7 @@ func (this *Image_AppC) VerboseEqual(that interface{}) error { } return nil } -func (this *Image_AppC) Equal(that interface{}) bool { +func (this *Image_Appc) Equal(that interface{}) bool { if that == nil { if this == nil { return true @@ -11025,7 +12042,7 @@ func (this *Image_AppC) Equal(that interface{}) bool { return false } - that1, ok := that.(*Image_AppC) + that1, ok := that.(*Image_Appc) if !ok { return false } @@ -11241,6 +12258,216 @@ func (this *Volume) Equal(that interface{}) bool { } return true } +func (this *NetworkInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NetworkInfo) + if !ok { + return fmt.Errorf("that is not of type *NetworkInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NetworkInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NetworkInfobut is not nil && this == nil") + } + if len(this.IpAddresses) != len(that1.IpAddresses) { + return fmt.Errorf("IpAddresses this(%v) Not Equal that(%v)", len(this.IpAddresses), len(that1.IpAddresses)) + } + for i := range this.IpAddresses { + if !this.IpAddresses[i].Equal(that1.IpAddresses[i]) { + return fmt.Errorf("IpAddresses this[%v](%v) Not Equal that[%v](%v)", i, this.IpAddresses[i], i, that1.IpAddresses[i]) + } + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + if this.IpAddress != nil && that1.IpAddress != nil { + if *this.IpAddress != *that1.IpAddress { + return fmt.Errorf("IpAddress this(%v) Not Equal that(%v)", *this.IpAddress, *that1.IpAddress) + } + } else if this.IpAddress != nil { + return fmt.Errorf("this.IpAddress == nil && that.IpAddress != nil") + } else if that1.IpAddress != nil { + return fmt.Errorf("IpAddress this(%v) Not Equal that(%v)", this.IpAddress, that1.IpAddress) + } + if len(this.Groups) != len(that1.Groups) { + return fmt.Errorf("Groups this(%v) Not Equal that(%v)", len(this.Groups), len(that1.Groups)) + } + for i := range this.Groups { + if this.Groups[i] != that1.Groups[i] { + return fmt.Errorf("Groups this[%v](%v) Not Equal that[%v](%v)", i, this.Groups[i], i, that1.Groups[i]) + } + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NetworkInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NetworkInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.IpAddresses) != len(that1.IpAddresses) { + return false + } + for i := range this.IpAddresses { + if !this.IpAddresses[i].Equal(that1.IpAddresses[i]) { + return false + } + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + if this.IpAddress != nil && that1.IpAddress != nil { + if *this.IpAddress != *that1.IpAddress { + return false + } + } else if this.IpAddress != nil { + return false + } else if that1.IpAddress != nil { + return false + } + if len(this.Groups) != len(that1.Groups) { + return false + } + for i := range this.Groups { + if this.Groups[i] != that1.Groups[i] { + return false + } + } + if !this.Labels.Equal(that1.Labels) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NetworkInfo_IPAddress) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NetworkInfo_IPAddress) + if !ok { + return fmt.Errorf("that is not of type *NetworkInfo_IPAddress") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NetworkInfo_IPAddress but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NetworkInfo_IPAddressbut is not nil && this == nil") + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + if this.IpAddress != nil && that1.IpAddress != nil { + if *this.IpAddress != *that1.IpAddress { + return fmt.Errorf("IpAddress this(%v) Not Equal that(%v)", *this.IpAddress, *that1.IpAddress) + } + } else if this.IpAddress != nil { + return fmt.Errorf("this.IpAddress == nil && that.IpAddress != nil") + } else if that1.IpAddress != nil { + return fmt.Errorf("IpAddress this(%v) Not Equal that(%v)", this.IpAddress, that1.IpAddress) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NetworkInfo_IPAddress) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NetworkInfo_IPAddress) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + if this.IpAddress != nil && that1.IpAddress != nil { + if *this.IpAddress != *that1.IpAddress { + return false + } + } else if this.IpAddress != nil { + return false + } else if that1.IpAddress != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *ContainerInfo) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -11293,6 +12520,14 @@ func (this *ContainerInfo) VerboseEqual(that interface{}) error { if !this.Mesos.Equal(that1.Mesos) { return fmt.Errorf("Mesos this(%v) Not Equal that(%v)", this.Mesos, that1.Mesos) } + if len(this.NetworkInfos) != len(that1.NetworkInfos) { + return fmt.Errorf("NetworkInfos this(%v) Not Equal that(%v)", len(this.NetworkInfos), len(that1.NetworkInfos)) + } + for i := range this.NetworkInfos { + if !this.NetworkInfos[i].Equal(that1.NetworkInfos[i]) { + return fmt.Errorf("NetworkInfos this[%v](%v) Not Equal that[%v](%v)", i, this.NetworkInfos[i], i, that1.NetworkInfos[i]) + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -11350,6 +12585,14 @@ func (this *ContainerInfo) Equal(that interface{}) bool { if !this.Mesos.Equal(that1.Mesos) { return false } + if len(this.NetworkInfos) != len(that1.NetworkInfos) { + return false + } + for i := range this.NetworkInfos { + if !this.NetworkInfos[i].Equal(that1.NetworkInfos[i]) { + return false + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -11669,6 +12912,72 @@ func (this *ContainerInfo_MesosInfo) Equal(that interface{}) bool { } return true } +func (this *ContainerStatus) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerStatus) + if !ok { + return fmt.Errorf("that is not of type *ContainerStatus") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerStatus but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerStatusbut is not nil && this == nil") + } + if len(this.NetworkInfos) != len(that1.NetworkInfos) { + return fmt.Errorf("NetworkInfos this(%v) Not Equal that(%v)", len(this.NetworkInfos), len(that1.NetworkInfos)) + } + for i := range this.NetworkInfos { + if !this.NetworkInfos[i].Equal(that1.NetworkInfos[i]) { + return fmt.Errorf("NetworkInfos this[%v](%v) Not Equal that[%v](%v)", i, this.NetworkInfos[i], i, that1.NetworkInfos[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainerStatus) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainerStatus) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.NetworkInfos) != len(that1.NetworkInfos) { + return false + } + for i := range this.NetworkInfos { + if !this.NetworkInfos[i].Equal(that1.NetworkInfos[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *Labels) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -11868,6 +13177,15 @@ func (this *Port) VerboseEqual(that interface{}) error { } else if that1.Protocol != nil { return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) } + if this.Visibility != nil && that1.Visibility != nil { + if *this.Visibility != *that1.Visibility { + return fmt.Errorf("Visibility this(%v) Not Equal that(%v)", *this.Visibility, *that1.Visibility) + } + } else if this.Visibility != nil { + return fmt.Errorf("this.Visibility == nil && that.Visibility != nil") + } else if that1.Visibility != nil { + return fmt.Errorf("Visibility this(%v) Not Equal that(%v)", this.Visibility, that1.Visibility) + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -11920,6 +13238,15 @@ func (this *Port) Equal(that interface{}) bool { } else if that1.Protocol != nil { return false } + if this.Visibility != nil && that1.Visibility != nil { + if *this.Visibility != *that1.Visibility { + return false + } + } else if this.Visibility != nil { + return false + } else if that1.Visibility != nil { + return false + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -12541,6 +13868,36 @@ func (this *ContainerID) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *TimeInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.TimeInfo{") + if this.Nanoseconds != nil { + s = append(s, "Nanoseconds: "+valueToGoStringMesos(this.Nanoseconds, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DurationInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.DurationInfo{") + if this.Nanoseconds != nil { + s = append(s, "Nanoseconds: "+valueToGoStringMesos(this.Nanoseconds, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *Address) GoString() string { if this == nil { return "nil" @@ -12589,6 +13946,63 @@ func (this *URL) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *Unavailability) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Unavailability{") + if this.Start != nil { + s = append(s, "Start: "+fmt.Sprintf("%#v", this.Start)+",\n") + } + if this.Duration != nil { + s = append(s, "Duration: "+fmt.Sprintf("%#v", this.Duration)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MachineID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesosproto.MachineID{") + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.Ip != nil { + s = append(s, "Ip: "+valueToGoStringMesos(this.Ip, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MachineInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesosproto.MachineInfo{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Mode != nil { + s = append(s, "Mode: "+valueToGoStringMesos(this.Mode, "mesosproto.MachineInfo_Mode")+",\n") + } + if this.Unavailability != nil { + s = append(s, "Unavailability: "+fmt.Sprintf("%#v", this.Unavailability)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *FrameworkInfo) GoString() string { if this == nil { return "nil" @@ -13313,7 +14727,7 @@ func (this *ResourceUsage_Executor) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&mesosproto.ResourceUsage_Executor{") if this.ExecutorInfo != nil { s = append(s, "ExecutorInfo: "+fmt.Sprintf("%#v", this.ExecutorInfo)+",\n") @@ -13324,6 +14738,9 @@ func (this *ResourceUsage_Executor) GoString() string { if this.Statistics != nil { s = append(s, "Statistics: "+fmt.Sprintf("%#v", this.Statistics)+",\n") } + if this.ContainerId != nil { + s = append(s, "ContainerId: "+fmt.Sprintf("%#v", this.ContainerId)+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -13523,7 +14940,7 @@ func (this *Offer) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 12) + s := make([]string, 0, 13) s = append(s, "&mesosproto.Offer{") if this.Id != nil { s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") @@ -13549,6 +14966,9 @@ func (this *Offer) GoString() string { if this.ExecutorIds != nil { s = append(s, "ExecutorIds: "+fmt.Sprintf("%#v", this.ExecutorIds)+",\n") } + if this.Unavailability != nil { + s = append(s, "Unavailability: "+fmt.Sprintf("%#v", this.Unavailability)+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -13660,6 +15080,36 @@ func (this *Offer_Operation_Destroy) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *InverseOffer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesosproto.InverseOffer{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Url != nil { + s = append(s, "Url: "+fmt.Sprintf("%#v", this.Url)+",\n") + } + if this.FrameworkId != nil { + s = append(s, "FrameworkId: "+fmt.Sprintf("%#v", this.FrameworkId)+",\n") + } + if this.SlaveId != nil { + s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") + } + if this.Unavailability != nil { + s = append(s, "Unavailability: "+fmt.Sprintf("%#v", this.Unavailability)+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *TaskInfo) GoString() string { if this == nil { return "nil" @@ -13709,7 +15159,7 @@ func (this *TaskStatus) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 16) + s := make([]string, 0, 17) s = append(s, "&mesosproto.TaskStatus{") if this.TaskId != nil { s = append(s, "TaskId: "+fmt.Sprintf("%#v", this.TaskId)+",\n") @@ -13747,6 +15197,9 @@ func (this *TaskStatus) GoString() string { if this.Labels != nil { s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") } + if this.ContainerStatus != nil { + s = append(s, "ContainerStatus: "+fmt.Sprintf("%#v", this.ContainerStatus)+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -13844,7 +15297,7 @@ func (this *Credential) GoString() string { s = append(s, "Principal: "+valueToGoStringMesos(this.Principal, "string")+",\n") } if this.Secret != nil { - s = append(s, "Secret: "+valueToGoStringMesos(this.Secret, "byte")+",\n") + s = append(s, "Secret: "+valueToGoStringMesos(this.Secret, "string")+",\n") } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") @@ -13930,12 +15383,12 @@ func (this *Image) GoString() string { s = append(s, "}") return strings.Join(s, "") } -func (this *Image_AppC) GoString() string { +func (this *Image_Appc) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 7) - s = append(s, "&mesosproto.Image_AppC{") + s = append(s, "&mesosproto.Image_Appc{") if this.Name != nil { s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") } @@ -13990,11 +15443,56 @@ func (this *Volume) GoString() string { s = append(s, "}") return strings.Join(s, "") } -func (this *ContainerInfo) GoString() string { +func (this *NetworkInfo) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 9) + s = append(s, "&mesosproto.NetworkInfo{") + if this.IpAddresses != nil { + s = append(s, "IpAddresses: "+fmt.Sprintf("%#v", this.IpAddresses)+",\n") + } + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "mesosproto.NetworkInfo_Protocol")+",\n") + } + if this.IpAddress != nil { + s = append(s, "IpAddress: "+valueToGoStringMesos(this.IpAddress, "string")+",\n") + } + if this.Groups != nil { + s = append(s, "Groups: "+fmt.Sprintf("%#v", this.Groups)+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NetworkInfo_IPAddress) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesosproto.NetworkInfo_IPAddress{") + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "mesosproto.NetworkInfo_Protocol")+",\n") + } + if this.IpAddress != nil { + s = append(s, "IpAddress: "+valueToGoStringMesos(this.IpAddress, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) s = append(s, "&mesosproto.ContainerInfo{") if this.Type != nil { s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesosproto.ContainerInfo_Type")+",\n") @@ -14011,6 +15509,9 @@ func (this *ContainerInfo) GoString() string { if this.Mesos != nil { s = append(s, "Mesos: "+fmt.Sprintf("%#v", this.Mesos)+",\n") } + if this.NetworkInfos != nil { + s = append(s, "NetworkInfos: "+fmt.Sprintf("%#v", this.NetworkInfos)+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -14083,6 +15584,21 @@ func (this *ContainerInfo_MesosInfo) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *ContainerStatus) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.ContainerStatus{") + if this.NetworkInfos != nil { + s = append(s, "NetworkInfos: "+fmt.Sprintf("%#v", this.NetworkInfos)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *Labels) GoString() string { if this == nil { return "nil" @@ -14120,7 +15636,7 @@ func (this *Port) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&mesosproto.Port{") if this.Number != nil { s = append(s, "Number: "+valueToGoStringMesos(this.Number, "uint32")+",\n") @@ -14131,6 +15647,9 @@ func (this *Port) GoString() string { if this.Protocol != nil { s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "string")+",\n") } + if this.Visibility != nil { + s = append(s, "Visibility: "+valueToGoStringMesos(this.Visibility, "mesosproto.DiscoveryInfo_Visibility")+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -14447,6 +15966,62 @@ func (m *ContainerID) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *TimeInfo) 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 *TimeInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Nanoseconds == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("nanoseconds") + } else { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Nanoseconds)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DurationInfo) 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 *DurationInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Nanoseconds == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("nanoseconds") + } else { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Nanoseconds)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + func (m *Address) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -14552,6 +16127,130 @@ func (m *URL) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *Unavailability) 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 *Unavailability) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Start == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("start") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.Start.Size())) + n2, err := m.Start.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Duration != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(m.Duration.Size())) + n3, err := m.Duration.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MachineID) 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 *MachineID) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Hostname != nil { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) + i += copy(data[i:], *m.Hostname) + } + if m.Ip != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Ip))) + i += copy(data[i:], *m.Ip) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MachineInfo) 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 *MachineInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.Id.Size())) + n4, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.Mode != nil { + data[i] = 0x10 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Mode)) + } + if m.Unavailability != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.Unavailability.Size())) + n5, err := m.Unavailability.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + func (m *FrameworkInfo) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -14587,11 +16286,11 @@ func (m *FrameworkInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Id.Size())) - n2, err := m.Id.MarshalTo(data[i:]) + n6, err := m.Id.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n2 + i += n6 } if m.FailoverTimeout != nil { data[i] = 0x21 @@ -14648,11 +16347,11 @@ func (m *FrameworkInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x5a i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n3, err := m.Labels.MarshalTo(data[i:]) + n7, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n3 + i += n7 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14707,11 +16406,11 @@ func (m *HealthCheck) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.Http.Size())) - n4, err := m.Http.MarshalTo(data[i:]) + n8, err := m.Http.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n4 + i += n8 } if m.DelaySeconds != nil { data[i] = 0x11 @@ -14742,11 +16441,11 @@ func (m *HealthCheck) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n5, err := m.Command.MarshalTo(data[i:]) + n9, err := m.Command.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n5 + i += n9 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14826,11 +16525,11 @@ func (m *CommandInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Environment.Size())) - n6, err := m.Environment.MarshalTo(data[i:]) + n10, err := m.Environment.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n6 + i += n10 } if m.Value != nil { data[i] = 0x1a @@ -14842,11 +16541,11 @@ func (m *CommandInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n7, err := m.Container.MarshalTo(data[i:]) + n11, err := m.Container.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n7 + i += n11 } if m.User != nil { data[i] = 0x2a @@ -15009,11 +16708,11 @@ func (m *ExecutorInfo) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.ExecutorId.Size())) - n8, err := m.ExecutorId.MarshalTo(data[i:]) + n12, err := m.ExecutorId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n8 + i += n12 } if m.Data != nil { data[i] = 0x22 @@ -15039,21 +16738,21 @@ func (m *ExecutorInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n9, err := m.Command.MarshalTo(data[i:]) + n13, err := m.Command.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n9 + i += n13 } if m.FrameworkId != nil { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.FrameworkId.Size())) - n10, err := m.FrameworkId.MarshalTo(data[i:]) + n14, err := m.FrameworkId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n10 + i += n14 } if m.Name != nil { data[i] = 0x4a @@ -15071,21 +16770,21 @@ func (m *ExecutorInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x5a i++ i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n11, err := m.Container.MarshalTo(data[i:]) + n15, err := m.Container.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n11 + i += n15 } if m.Discovery != nil { data[i] = 0x62 i++ i = encodeVarintMesos(data, i, uint64(m.Discovery.Size())) - n12, err := m.Discovery.MarshalTo(data[i:]) + n16, err := m.Discovery.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n12 + i += n16 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -15152,11 +16851,11 @@ func (m *MasterInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Address.Size())) - n13, err := m.Address.MarshalTo(data[i:]) + n17, err := m.Address.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n13 + i += n17 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -15215,11 +16914,11 @@ func (m *SlaveInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x32 i++ i = encodeVarintMesos(data, i, uint64(m.Id.Size())) - n14, err := m.Id.MarshalTo(data[i:]) + n18, err := m.Id.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n14 + i += n18 } if m.Checkpoint != nil { data[i] = 0x38 @@ -15268,41 +16967,41 @@ func (m *Value) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n15, err := m.Scalar.MarshalTo(data[i:]) + n19, err := m.Scalar.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n15 + i += n19 } if m.Ranges != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n16, err := m.Ranges.MarshalTo(data[i:]) + n20, err := m.Ranges.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n16 + i += n20 } if m.Set != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n17, err := m.Set.MarshalTo(data[i:]) + n21, err := m.Set.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n17 + i += n21 } if m.Text != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Text.Size())) - n18, err := m.Text.MarshalTo(data[i:]) + n22, err := m.Text.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n18 + i += n22 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -15505,41 +17204,41 @@ func (m *Attribute) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n19, err := m.Scalar.MarshalTo(data[i:]) + n23, err := m.Scalar.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n19 + i += n23 } if m.Ranges != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n20, err := m.Ranges.MarshalTo(data[i:]) + n24, err := m.Ranges.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n20 + i += n24 } if m.Text != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Text.Size())) - n21, err := m.Text.MarshalTo(data[i:]) + n25, err := m.Text.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n21 + i += n25 } if m.Set != nil { data[i] = 0x32 i++ i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n22, err := m.Set.MarshalTo(data[i:]) + n26, err := m.Set.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n22 + i += n26 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -15581,31 +17280,31 @@ func (m *Resource) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n23, err := m.Scalar.MarshalTo(data[i:]) + n27, err := m.Scalar.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n23 + i += n27 } if m.Ranges != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n24, err := m.Ranges.MarshalTo(data[i:]) + n28, err := m.Ranges.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n24 + i += n28 } if m.Set != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n25, err := m.Set.MarshalTo(data[i:]) + n29, err := m.Set.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n25 + i += n29 } if m.Role != nil { data[i] = 0x32 @@ -15617,31 +17316,31 @@ func (m *Resource) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Disk.Size())) - n26, err := m.Disk.MarshalTo(data[i:]) + n30, err := m.Disk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n26 + i += n30 } if m.Reservation != nil { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.Reservation.Size())) - n27, err := m.Reservation.MarshalTo(data[i:]) + n31, err := m.Reservation.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n27 + i += n31 } if m.Revocable != nil { data[i] = 0x4a i++ i = encodeVarintMesos(data, i, uint64(m.Revocable.Size())) - n28, err := m.Revocable.MarshalTo(data[i:]) + n32, err := m.Revocable.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n28 + i += n32 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -15697,21 +17396,21 @@ func (m *Resource_DiskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.Persistence.Size())) - n29, err := m.Persistence.MarshalTo(data[i:]) + n33, err := m.Persistence.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n29 + i += n33 } if m.Volume != nil { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Volume.Size())) - n30, err := m.Volume.MarshalTo(data[i:]) + n34, err := m.Volume.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n30 + i += n34 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -15924,11 +17623,11 @@ func (m *ResourceStatistics) MarshalTo(data []byte) (int, error) { data[i] = 0x6a i++ i = encodeVarintMesos(data, i, uint64(m.Perf.Size())) - n31, err := m.Perf.MarshalTo(data[i:]) + n35, err := m.Perf.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n31 + i += n35 } if m.NetRxPackets != nil { data[i] = 0x70 @@ -16201,11 +17900,11 @@ func (m *ResourceUsage_Executor) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.ExecutorInfo.Size())) - n32, err := m.ExecutorInfo.MarshalTo(data[i:]) + n36, err := m.ExecutorInfo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n32 + i += n36 } if len(m.Allocated) > 0 { for _, msg := range m.Allocated { @@ -16223,11 +17922,23 @@ func (m *ResourceUsage_Executor) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Statistics.Size())) - n33, err := m.Statistics.MarshalTo(data[i:]) + n37, err := m.Statistics.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n33 + i += n37 + } + if m.ContainerId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } else { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(m.ContainerId.Size())) + n38, err := m.ContainerId.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n38 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -16620,11 +18331,11 @@ func (m *Request) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n34, err := m.SlaveId.MarshalTo(data[i:]) + n39, err := m.SlaveId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n34 + i += n39 } if len(m.Resources) > 0 { for _, msg := range m.Resources { @@ -16665,11 +18376,11 @@ func (m *Offer) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.Id.Size())) - n35, err := m.Id.MarshalTo(data[i:]) + n40, err := m.Id.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n35 + i += n40 } if m.FrameworkId == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") @@ -16677,11 +18388,11 @@ func (m *Offer) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.FrameworkId.Size())) - n36, err := m.FrameworkId.MarshalTo(data[i:]) + n41, err := m.FrameworkId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n36 + i += n41 } if m.SlaveId == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") @@ -16689,11 +18400,11 @@ func (m *Offer) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n37, err := m.SlaveId.MarshalTo(data[i:]) + n42, err := m.SlaveId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n37 + i += n42 } if m.Hostname == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") @@ -16743,11 +18454,21 @@ func (m *Offer) MarshalTo(data []byte) (int, error) { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.Url.Size())) - n38, err := m.Url.MarshalTo(data[i:]) + n43, err := m.Url.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n38 + i += n43 + } + if m.Unavailability != nil { + data[i] = 0x4a + i++ + i = encodeVarintMesos(data, i, uint64(m.Unavailability.Size())) + n44, err := m.Unavailability.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -16781,51 +18502,51 @@ func (m *Offer_Operation) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Launch.Size())) - n39, err := m.Launch.MarshalTo(data[i:]) + n45, err := m.Launch.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n39 + i += n45 } if m.Reserve != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Reserve.Size())) - n40, err := m.Reserve.MarshalTo(data[i:]) + n46, err := m.Reserve.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n40 + i += n46 } if m.Unreserve != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Unreserve.Size())) - n41, err := m.Unreserve.MarshalTo(data[i:]) + n47, err := m.Unreserve.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n41 + i += n47 } if m.Create != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Create.Size())) - n42, err := m.Create.MarshalTo(data[i:]) + n48, err := m.Create.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n42 + i += n48 } if m.Destroy != nil { data[i] = 0x32 i++ i = encodeVarintMesos(data, i, uint64(m.Destroy.Size())) - n43, err := m.Destroy.MarshalTo(data[i:]) + n49, err := m.Destroy.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n43 + i += n49 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -16998,6 +18719,95 @@ func (m *Offer_Operation_Destroy) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *InverseOffer) 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 *InverseOffer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.Id.Size())) + n50, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n50 + } + if m.Url != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(m.Url.Size())) + n51, err := m.Url.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n51 + } + if m.FrameworkId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } else { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.FrameworkId.Size())) + n52, err := m.FrameworkId.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n52 + } + if m.SlaveId != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) + n53, err := m.SlaveId.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n53 + } + if m.Unavailability == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("unavailability") + } else { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(m.Unavailability.Size())) + n54, err := m.Unavailability.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n54 + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + data[i] = 0x32 + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + func (m *TaskInfo) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -17027,11 +18837,11 @@ func (m *TaskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.TaskId.Size())) - n44, err := m.TaskId.MarshalTo(data[i:]) + n55, err := m.TaskId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n44 + i += n55 } if m.SlaveId == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") @@ -17039,11 +18849,11 @@ func (m *TaskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n45, err := m.SlaveId.MarshalTo(data[i:]) + n56, err := m.SlaveId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n45 + i += n56 } if len(m.Resources) > 0 { for _, msg := range m.Resources { @@ -17061,11 +18871,11 @@ func (m *TaskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Executor.Size())) - n46, err := m.Executor.MarshalTo(data[i:]) + n57, err := m.Executor.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n46 + i += n57 } if m.Data != nil { data[i] = 0x32 @@ -17077,51 +18887,51 @@ func (m *TaskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n47, err := m.Command.MarshalTo(data[i:]) + n58, err := m.Command.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n47 + i += n58 } if m.HealthCheck != nil { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.HealthCheck.Size())) - n48, err := m.HealthCheck.MarshalTo(data[i:]) + n59, err := m.HealthCheck.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n48 + i += n59 } if m.Container != nil { data[i] = 0x4a i++ i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n49, err := m.Container.MarshalTo(data[i:]) + n60, err := m.Container.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n49 + i += n60 } if m.Labels != nil { data[i] = 0x52 i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n50, err := m.Labels.MarshalTo(data[i:]) + n61, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n50 + i += n61 } if m.Discovery != nil { data[i] = 0x5a i++ i = encodeVarintMesos(data, i, uint64(m.Discovery.Size())) - n51, err := m.Discovery.MarshalTo(data[i:]) + n62, err := m.Discovery.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n51 + i += n62 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -17150,11 +18960,11 @@ func (m *TaskStatus) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.TaskId.Size())) - n52, err := m.TaskId.MarshalTo(data[i:]) + n63, err := m.TaskId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n52 + i += n63 } if m.State == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") @@ -17179,11 +18989,11 @@ func (m *TaskStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n53, err := m.SlaveId.MarshalTo(data[i:]) + n64, err := m.SlaveId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n53 + i += n64 } if m.Timestamp != nil { data[i] = 0x31 @@ -17194,11 +19004,11 @@ func (m *TaskStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.ExecutorId.Size())) - n54, err := m.ExecutorId.MarshalTo(data[i:]) + n65, err := m.ExecutorId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n54 + i += n65 } if m.Healthy != nil { data[i] = 0x40 @@ -17230,11 +19040,21 @@ func (m *TaskStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x62 i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n55, err := m.Labels.MarshalTo(data[i:]) + n66, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n55 + i += n66 + } + if m.ContainerStatus != nil { + data[i] = 0x6a + i++ + i = encodeVarintMesos(data, i, uint64(m.ContainerStatus.Size())) + n67, err := m.ContainerStatus.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n67 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -17434,8 +19254,8 @@ func (m *Credential) MarshalTo(data []byte) (int, error) { if m.Secret != nil { data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(len(m.Secret))) - i += copy(data[i:], m.Secret) + i = encodeVarintMesos(data, i, uint64(len(*m.Secret))) + i += copy(data[i:], *m.Secret) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -17584,21 +19404,21 @@ func (m *Image) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Appc.Size())) - n56, err := m.Appc.MarshalTo(data[i:]) + n68, err := m.Appc.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n56 + i += n68 } if m.Docker != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Docker.Size())) - n57, err := m.Docker.MarshalTo(data[i:]) + n69, err := m.Docker.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n57 + i += n69 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -17606,7 +19426,7 @@ func (m *Image) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *Image_AppC) Marshal() (data []byte, err error) { +func (m *Image_Appc) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -17616,7 +19436,7 @@ func (m *Image_AppC) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Image_AppC) MarshalTo(data []byte) (int, error) { +func (m *Image_Appc) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -17639,11 +19459,11 @@ func (m *Image_AppC) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n58, err := m.Labels.MarshalTo(data[i:]) + n70, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n58 + i += n70 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -17720,11 +19540,112 @@ func (m *Volume) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Image.Size())) - n59, err := m.Image.MarshalTo(data[i:]) + n71, err := m.Image.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n59 + i += n71 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NetworkInfo) 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 *NetworkInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Protocol != nil { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Protocol)) + } + if m.IpAddress != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.IpAddress))) + i += copy(data[i:], *m.IpAddress) + } + if len(m.Groups) > 0 { + for _, s := range m.Groups { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if m.Labels != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) + n72, err := m.Labels.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n72 + } + if len(m.IpAddresses) > 0 { + for _, msg := range m.IpAddresses { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NetworkInfo_IPAddress) 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 *NetworkInfo_IPAddress) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Protocol != nil { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Protocol)) + } + if m.IpAddress != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.IpAddress))) + i += copy(data[i:], *m.IpAddress) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -17770,11 +19691,11 @@ func (m *ContainerInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Docker.Size())) - n60, err := m.Docker.MarshalTo(data[i:]) + n73, err := m.Docker.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n60 + i += n73 } if m.Hostname != nil { data[i] = 0x22 @@ -17786,11 +19707,23 @@ func (m *ContainerInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Mesos.Size())) - n61, err := m.Mesos.MarshalTo(data[i:]) + n74, err := m.Mesos.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n61 + i += n74 + } + if len(m.NetworkInfos) > 0 { + for _, msg := range m.NetworkInfos { + data[i] = 0x3a + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -17936,11 +19869,44 @@ func (m *ContainerInfo_MesosInfo) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.Image.Size())) - n62, err := m.Image.MarshalTo(data[i:]) + n75, err := m.Image.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n62 + i += n75 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ContainerStatus) 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 *ContainerStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NetworkInfos) > 0 { + for _, msg := range m.NetworkInfos { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -18050,6 +20016,11 @@ func (m *Port) MarshalTo(data []byte) (int, error) { i = encodeVarintMesos(data, i, uint64(len(*m.Protocol))) i += copy(data[i:], *m.Protocol) } + if m.Visibility != nil { + data[i] = 0x20 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Visibility)) + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } @@ -18139,21 +20110,21 @@ func (m *DiscoveryInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x32 i++ i = encodeVarintMesos(data, i, uint64(m.Ports.Size())) - n63, err := m.Ports.MarshalTo(data[i:]) + n76, err := m.Ports.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n63 + i += n76 } if m.Labels != nil { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n64, err := m.Labels.MarshalTo(data[i:]) + n77, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n64 + i += n77 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -18391,21 +20362,47 @@ func NewPopulatedContainerID(r randyMesos, easy bool) *ContainerID { return this } +func NewPopulatedTimeInfo(r randyMesos, easy bool) *TimeInfo { + this := &TimeInfo{} + v7 := int64(r.Int63()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Nanoseconds = &v7 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedDurationInfo(r randyMesos, easy bool) *DurationInfo { + this := &DurationInfo{} + v8 := int64(r.Int63()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Nanoseconds = &v8 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + func NewPopulatedAddress(r randyMesos, easy bool) *Address { this := &Address{} if r.Intn(10) != 0 { - v7 := randStringMesos(r) - this.Hostname = &v7 + v9 := randStringMesos(r) + this.Hostname = &v9 } if r.Intn(10) != 0 { - v8 := randStringMesos(r) - this.Ip = &v8 + v10 := randStringMesos(r) + this.Ip = &v10 } - v9 := int32(r.Int31()) + v11 := int32(r.Int31()) if r.Intn(2) == 0 { - v9 *= -1 + v11 *= -1 } - this.Port = &v9 + this.Port = &v11 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 4) } @@ -18414,23 +20411,23 @@ func NewPopulatedAddress(r randyMesos, easy bool) *Address { func NewPopulatedURL(r randyMesos, easy bool) *URL { this := &URL{} - v10 := randStringMesos(r) - this.Scheme = &v10 + v12 := randStringMesos(r) + this.Scheme = &v12 this.Address = NewPopulatedAddress(r, easy) if r.Intn(10) != 0 { - v11 := randStringMesos(r) - this.Path = &v11 + v13 := randStringMesos(r) + this.Path = &v13 } if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Query = make([]*Parameter, v12) - for i := 0; i < v12; i++ { + v14 := r.Intn(10) + this.Query = make([]*Parameter, v14) + for i := 0; i < v14; i++ { this.Query[i] = NewPopulatedParameter(r, easy) } } if r.Intn(10) != 0 { - v13 := randStringMesos(r) - this.Fragment = &v13 + v15 := randStringMesos(r) + this.Fragment = &v15 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 6) @@ -18438,46 +20435,90 @@ func NewPopulatedURL(r randyMesos, easy bool) *URL { return this } +func NewPopulatedUnavailability(r randyMesos, easy bool) *Unavailability { + this := &Unavailability{} + this.Start = NewPopulatedTimeInfo(r, easy) + if r.Intn(10) != 0 { + this.Duration = NewPopulatedDurationInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + } + return this +} + +func NewPopulatedMachineID(r randyMesos, easy bool) *MachineID { + this := &MachineID{} + if r.Intn(10) != 0 { + v16 := randStringMesos(r) + this.Hostname = &v16 + } + if r.Intn(10) != 0 { + v17 := randStringMesos(r) + this.Ip = &v17 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + } + return this +} + +func NewPopulatedMachineInfo(r randyMesos, easy bool) *MachineInfo { + this := &MachineInfo{} + this.Id = NewPopulatedMachineID(r, easy) + if r.Intn(10) != 0 { + v18 := MachineInfo_Mode([]int32{1, 2, 3}[r.Intn(3)]) + this.Mode = &v18 + } + if r.Intn(10) != 0 { + this.Unavailability = NewPopulatedUnavailability(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + } + return this +} + func NewPopulatedFrameworkInfo(r randyMesos, easy bool) *FrameworkInfo { this := &FrameworkInfo{} - v14 := randStringMesos(r) - this.User = &v14 - v15 := randStringMesos(r) - this.Name = &v15 + v19 := randStringMesos(r) + this.User = &v19 + v20 := randStringMesos(r) + this.Name = &v20 if r.Intn(10) != 0 { this.Id = NewPopulatedFrameworkID(r, easy) } if r.Intn(10) != 0 { - v16 := float64(r.Float64()) + v21 := float64(r.Float64()) if r.Intn(2) == 0 { - v16 *= -1 + v21 *= -1 } - this.FailoverTimeout = &v16 + this.FailoverTimeout = &v21 } if r.Intn(10) != 0 { - v17 := bool(bool(r.Intn(2) == 0)) - this.Checkpoint = &v17 + v22 := bool(bool(r.Intn(2) == 0)) + this.Checkpoint = &v22 } if r.Intn(10) != 0 { - v18 := randStringMesos(r) - this.Role = &v18 + v23 := randStringMesos(r) + this.Role = &v23 } if r.Intn(10) != 0 { - v19 := randStringMesos(r) - this.Hostname = &v19 + v24 := randStringMesos(r) + this.Hostname = &v24 } if r.Intn(10) != 0 { - v20 := randStringMesos(r) - this.Principal = &v20 + v25 := randStringMesos(r) + this.Principal = &v25 } if r.Intn(10) != 0 { - v21 := randStringMesos(r) - this.WebuiUrl = &v21 + v26 := randStringMesos(r) + this.WebuiUrl = &v26 } if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Capabilities = make([]*FrameworkInfo_Capability, v22) - for i := 0; i < v22; i++ { + v27 := r.Intn(10) + this.Capabilities = make([]*FrameworkInfo_Capability, v27) + for i := 0; i < v27; i++ { this.Capabilities[i] = NewPopulatedFrameworkInfo_Capability(r, easy) } } @@ -18492,8 +20533,8 @@ func NewPopulatedFrameworkInfo(r randyMesos, easy bool) *FrameworkInfo { func NewPopulatedFrameworkInfo_Capability(r randyMesos, easy bool) *FrameworkInfo_Capability { this := &FrameworkInfo_Capability{} - v23 := FrameworkInfo_Capability_Type([]int32{1}[r.Intn(1)]) - this.Type = &v23 + v28 := FrameworkInfo_Capability_Type([]int32{1}[r.Intn(1)]) + this.Type = &v28 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } @@ -18506,36 +20547,36 @@ func NewPopulatedHealthCheck(r randyMesos, easy bool) *HealthCheck { this.Http = NewPopulatedHealthCheck_HTTP(r, easy) } if r.Intn(10) != 0 { - v24 := float64(r.Float64()) + v29 := float64(r.Float64()) if r.Intn(2) == 0 { - v24 *= -1 + v29 *= -1 } - this.DelaySeconds = &v24 + this.DelaySeconds = &v29 } if r.Intn(10) != 0 { - v25 := float64(r.Float64()) + v30 := float64(r.Float64()) if r.Intn(2) == 0 { - v25 *= -1 + v30 *= -1 } - this.IntervalSeconds = &v25 + this.IntervalSeconds = &v30 } if r.Intn(10) != 0 { - v26 := float64(r.Float64()) + v31 := float64(r.Float64()) if r.Intn(2) == 0 { - v26 *= -1 + v31 *= -1 } - this.TimeoutSeconds = &v26 + this.TimeoutSeconds = &v31 } if r.Intn(10) != 0 { - v27 := uint32(r.Uint32()) - this.ConsecutiveFailures = &v27 + v32 := uint32(r.Uint32()) + this.ConsecutiveFailures = &v32 } if r.Intn(10) != 0 { - v28 := float64(r.Float64()) + v33 := float64(r.Float64()) if r.Intn(2) == 0 { - v28 *= -1 + v33 *= -1 } - this.GracePeriodSeconds = &v28 + this.GracePeriodSeconds = &v33 } if r.Intn(10) != 0 { this.Command = NewPopulatedCommandInfo(r, easy) @@ -18548,16 +20589,16 @@ func NewPopulatedHealthCheck(r randyMesos, easy bool) *HealthCheck { func NewPopulatedHealthCheck_HTTP(r randyMesos, easy bool) *HealthCheck_HTTP { this := &HealthCheck_HTTP{} - v29 := uint32(r.Uint32()) - this.Port = &v29 + v34 := uint32(r.Uint32()) + this.Port = &v34 if r.Intn(10) != 0 { - v30 := randStringMesos(r) - this.Path = &v30 + v35 := randStringMesos(r) + this.Path = &v35 } if r.Intn(10) != 0 { - v31 := r.Intn(100) - this.Statuses = make([]uint32, v31) - for i := 0; i < v31; i++ { + v36 := r.Intn(100) + this.Statuses = make([]uint32, v36) + for i := 0; i < v36; i++ { this.Statuses[i] = uint32(r.Uint32()) } } @@ -18570,9 +20611,9 @@ func NewPopulatedHealthCheck_HTTP(r randyMesos, easy bool) *HealthCheck_HTTP { func NewPopulatedCommandInfo(r randyMesos, easy bool) *CommandInfo { this := &CommandInfo{} if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.Uris = make([]*CommandInfo_URI, v32) - for i := 0; i < v32; i++ { + v37 := r.Intn(10) + this.Uris = make([]*CommandInfo_URI, v37) + for i := 0; i < v37; i++ { this.Uris[i] = NewPopulatedCommandInfo_URI(r, easy) } } @@ -18580,24 +20621,24 @@ func NewPopulatedCommandInfo(r randyMesos, easy bool) *CommandInfo { this.Environment = NewPopulatedEnvironment(r, easy) } if r.Intn(10) != 0 { - v33 := randStringMesos(r) - this.Value = &v33 + v38 := randStringMesos(r) + this.Value = &v38 } if r.Intn(10) != 0 { this.Container = NewPopulatedCommandInfo_ContainerInfo(r, easy) } if r.Intn(10) != 0 { - v34 := randStringMesos(r) - this.User = &v34 + v39 := randStringMesos(r) + this.User = &v39 } if r.Intn(10) != 0 { - v35 := bool(bool(r.Intn(2) == 0)) - this.Shell = &v35 + v40 := bool(bool(r.Intn(2) == 0)) + this.Shell = &v40 } if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.Arguments = make([]string, v36) - for i := 0; i < v36; i++ { + v41 := r.Intn(10) + this.Arguments = make([]string, v41) + for i := 0; i < v41; i++ { this.Arguments[i] = randStringMesos(r) } } @@ -18609,19 +20650,19 @@ func NewPopulatedCommandInfo(r randyMesos, easy bool) *CommandInfo { func NewPopulatedCommandInfo_URI(r randyMesos, easy bool) *CommandInfo_URI { this := &CommandInfo_URI{} - v37 := randStringMesos(r) - this.Value = &v37 + v42 := randStringMesos(r) + this.Value = &v42 if r.Intn(10) != 0 { - v38 := bool(bool(r.Intn(2) == 0)) - this.Executable = &v38 + v43 := bool(bool(r.Intn(2) == 0)) + this.Executable = &v43 } if r.Intn(10) != 0 { - v39 := bool(bool(r.Intn(2) == 0)) - this.Extract = &v39 + v44 := bool(bool(r.Intn(2) == 0)) + this.Extract = &v44 } if r.Intn(10) != 0 { - v40 := bool(bool(r.Intn(2) == 0)) - this.Cache = &v40 + v45 := bool(bool(r.Intn(2) == 0)) + this.Cache = &v45 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 5) @@ -18631,12 +20672,12 @@ func NewPopulatedCommandInfo_URI(r randyMesos, easy bool) *CommandInfo_URI { func NewPopulatedCommandInfo_ContainerInfo(r randyMesos, easy bool) *CommandInfo_ContainerInfo { this := &CommandInfo_ContainerInfo{} - v41 := randStringMesos(r) - this.Image = &v41 + v46 := randStringMesos(r) + this.Image = &v46 if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Options = make([]string, v42) - for i := 0; i < v42; i++ { + v47 := r.Intn(10) + this.Options = make([]string, v47) + for i := 0; i < v47; i++ { this.Options[i] = randStringMesos(r) } } @@ -18650,16 +20691,16 @@ func NewPopulatedExecutorInfo(r randyMesos, easy bool) *ExecutorInfo { this := &ExecutorInfo{} this.ExecutorId = NewPopulatedExecutorID(r, easy) if r.Intn(10) != 0 { - v43 := r.Intn(100) - this.Data = make([]byte, v43) - for i := 0; i < v43; i++ { + v48 := r.Intn(100) + this.Data = make([]byte, v48) + for i := 0; i < v48; i++ { this.Data[i] = byte(r.Intn(256)) } } if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Resources = make([]*Resource, v44) - for i := 0; i < v44; i++ { + v49 := r.Intn(10) + this.Resources = make([]*Resource, v49) + for i := 0; i < v49; i++ { this.Resources[i] = NewPopulatedResource(r, easy) } } @@ -18668,12 +20709,12 @@ func NewPopulatedExecutorInfo(r randyMesos, easy bool) *ExecutorInfo { this.FrameworkId = NewPopulatedFrameworkID(r, easy) } if r.Intn(10) != 0 { - v45 := randStringMesos(r) - this.Name = &v45 + v50 := randStringMesos(r) + this.Name = &v50 } if r.Intn(10) != 0 { - v46 := randStringMesos(r) - this.Source = &v46 + v51 := randStringMesos(r) + this.Source = &v51 } if r.Intn(10) != 0 { this.Container = NewPopulatedContainerInfo(r, easy) @@ -18689,23 +20730,23 @@ func NewPopulatedExecutorInfo(r randyMesos, easy bool) *ExecutorInfo { func NewPopulatedMasterInfo(r randyMesos, easy bool) *MasterInfo { this := &MasterInfo{} - v47 := randStringMesos(r) - this.Id = &v47 - v48 := uint32(r.Uint32()) - this.Ip = &v48 - v49 := uint32(r.Uint32()) - this.Port = &v49 + v52 := randStringMesos(r) + this.Id = &v52 + v53 := uint32(r.Uint32()) + this.Ip = &v53 + v54 := uint32(r.Uint32()) + this.Port = &v54 if r.Intn(10) != 0 { - v50 := randStringMesos(r) - this.Pid = &v50 + v55 := randStringMesos(r) + this.Pid = &v55 } if r.Intn(10) != 0 { - v51 := randStringMesos(r) - this.Hostname = &v51 + v56 := randStringMesos(r) + this.Hostname = &v56 } if r.Intn(10) != 0 { - v52 := randStringMesos(r) - this.Version = &v52 + v57 := randStringMesos(r) + this.Version = &v57 } if r.Intn(10) != 0 { this.Address = NewPopulatedAddress(r, easy) @@ -18718,19 +20759,19 @@ func NewPopulatedMasterInfo(r randyMesos, easy bool) *MasterInfo { func NewPopulatedSlaveInfo(r randyMesos, easy bool) *SlaveInfo { this := &SlaveInfo{} - v53 := randStringMesos(r) - this.Hostname = &v53 + v58 := randStringMesos(r) + this.Hostname = &v58 if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Resources = make([]*Resource, v54) - for i := 0; i < v54; i++ { + v59 := r.Intn(10) + this.Resources = make([]*Resource, v59) + for i := 0; i < v59; i++ { this.Resources[i] = NewPopulatedResource(r, easy) } } if r.Intn(10) != 0 { - v55 := r.Intn(10) - this.Attributes = make([]*Attribute, v55) - for i := 0; i < v55; i++ { + v60 := r.Intn(10) + this.Attributes = make([]*Attribute, v60) + for i := 0; i < v60; i++ { this.Attributes[i] = NewPopulatedAttribute(r, easy) } } @@ -18738,15 +20779,15 @@ func NewPopulatedSlaveInfo(r randyMesos, easy bool) *SlaveInfo { this.Id = NewPopulatedSlaveID(r, easy) } if r.Intn(10) != 0 { - v56 := bool(bool(r.Intn(2) == 0)) - this.Checkpoint = &v56 + v61 := bool(bool(r.Intn(2) == 0)) + this.Checkpoint = &v61 } if r.Intn(10) != 0 { - v57 := int32(r.Int31()) + v62 := int32(r.Int31()) if r.Intn(2) == 0 { - v57 *= -1 + v62 *= -1 } - this.Port = &v57 + this.Port = &v62 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 9) @@ -18756,8 +20797,8 @@ func NewPopulatedSlaveInfo(r randyMesos, easy bool) *SlaveInfo { func NewPopulatedValue(r randyMesos, easy bool) *Value { this := &Value{} - v58 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Type = &v58 + v63 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v63 if r.Intn(10) != 0 { this.Scalar = NewPopulatedValue_Scalar(r, easy) } @@ -18778,11 +20819,11 @@ func NewPopulatedValue(r randyMesos, easy bool) *Value { func NewPopulatedValue_Scalar(r randyMesos, easy bool) *Value_Scalar { this := &Value_Scalar{} - v59 := float64(r.Float64()) + v64 := float64(r.Float64()) if r.Intn(2) == 0 { - v59 *= -1 + v64 *= -1 } - this.Value = &v59 + this.Value = &v64 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } @@ -18791,10 +20832,10 @@ func NewPopulatedValue_Scalar(r randyMesos, easy bool) *Value_Scalar { func NewPopulatedValue_Range(r randyMesos, easy bool) *Value_Range { this := &Value_Range{} - v60 := uint64(uint64(r.Uint32())) - this.Begin = &v60 - v61 := uint64(uint64(r.Uint32())) - this.End = &v61 + v65 := uint64(uint64(r.Uint32())) + this.Begin = &v65 + v66 := uint64(uint64(r.Uint32())) + this.End = &v66 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } @@ -18804,9 +20845,9 @@ func NewPopulatedValue_Range(r randyMesos, easy bool) *Value_Range { func NewPopulatedValue_Ranges(r randyMesos, easy bool) *Value_Ranges { this := &Value_Ranges{} if r.Intn(10) != 0 { - v62 := r.Intn(10) - this.Range = make([]*Value_Range, v62) - for i := 0; i < v62; i++ { + v67 := r.Intn(10) + this.Range = make([]*Value_Range, v67) + for i := 0; i < v67; i++ { this.Range[i] = NewPopulatedValue_Range(r, easy) } } @@ -18819,9 +20860,9 @@ func NewPopulatedValue_Ranges(r randyMesos, easy bool) *Value_Ranges { func NewPopulatedValue_Set(r randyMesos, easy bool) *Value_Set { this := &Value_Set{} if r.Intn(10) != 0 { - v63 := r.Intn(10) - this.Item = make([]string, v63) - for i := 0; i < v63; i++ { + v68 := r.Intn(10) + this.Item = make([]string, v68) + for i := 0; i < v68; i++ { this.Item[i] = randStringMesos(r) } } @@ -18833,8 +20874,8 @@ func NewPopulatedValue_Set(r randyMesos, easy bool) *Value_Set { func NewPopulatedValue_Text(r randyMesos, easy bool) *Value_Text { this := &Value_Text{} - v64 := randStringMesos(r) - this.Value = &v64 + v69 := randStringMesos(r) + this.Value = &v69 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } @@ -18843,10 +20884,10 @@ func NewPopulatedValue_Text(r randyMesos, easy bool) *Value_Text { func NewPopulatedAttribute(r randyMesos, easy bool) *Attribute { this := &Attribute{} - v65 := randStringMesos(r) - this.Name = &v65 - v66 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Type = &v66 + v70 := randStringMesos(r) + this.Name = &v70 + v71 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v71 if r.Intn(10) != 0 { this.Scalar = NewPopulatedValue_Scalar(r, easy) } @@ -18867,10 +20908,10 @@ func NewPopulatedAttribute(r randyMesos, easy bool) *Attribute { func NewPopulatedResource(r randyMesos, easy bool) *Resource { this := &Resource{} - v67 := randStringMesos(r) - this.Name = &v67 - v68 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Type = &v68 + v72 := randStringMesos(r) + this.Name = &v72 + v73 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v73 if r.Intn(10) != 0 { this.Scalar = NewPopulatedValue_Scalar(r, easy) } @@ -18881,8 +20922,8 @@ func NewPopulatedResource(r randyMesos, easy bool) *Resource { this.Set = NewPopulatedValue_Set(r, easy) } if r.Intn(10) != 0 { - v69 := randStringMesos(r) - this.Role = &v69 + v74 := randStringMesos(r) + this.Role = &v74 } if r.Intn(10) != 0 { this.Disk = NewPopulatedResource_DiskInfo(r, easy) @@ -18901,8 +20942,8 @@ func NewPopulatedResource(r randyMesos, easy bool) *Resource { func NewPopulatedResource_ReservationInfo(r randyMesos, easy bool) *Resource_ReservationInfo { this := &Resource_ReservationInfo{} - v70 := randStringMesos(r) - this.Principal = &v70 + v75 := randStringMesos(r) + this.Principal = &v75 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } @@ -18925,8 +20966,8 @@ func NewPopulatedResource_DiskInfo(r randyMesos, easy bool) *Resource_DiskInfo { func NewPopulatedResource_DiskInfo_Persistence(r randyMesos, easy bool) *Resource_DiskInfo_Persistence { this := &Resource_DiskInfo_Persistence{} - v71 := randStringMesos(r) - this.Id = &v71 + v76 := randStringMesos(r) + this.Id = &v76 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } @@ -18943,43 +20984,43 @@ func NewPopulatedResource_RevocableInfo(r randyMesos, easy bool) *Resource_Revoc func NewPopulatedTrafficControlStatistics(r randyMesos, easy bool) *TrafficControlStatistics { this := &TrafficControlStatistics{} - v72 := randStringMesos(r) - this.Id = &v72 + v77 := randStringMesos(r) + this.Id = &v77 if r.Intn(10) != 0 { - v73 := uint64(uint64(r.Uint32())) - this.Backlog = &v73 + v78 := uint64(uint64(r.Uint32())) + this.Backlog = &v78 } if r.Intn(10) != 0 { - v74 := uint64(uint64(r.Uint32())) - this.Bytes = &v74 + v79 := uint64(uint64(r.Uint32())) + this.Bytes = &v79 } if r.Intn(10) != 0 { - v75 := uint64(uint64(r.Uint32())) - this.Drops = &v75 + v80 := uint64(uint64(r.Uint32())) + this.Drops = &v80 } if r.Intn(10) != 0 { - v76 := uint64(uint64(r.Uint32())) - this.Overlimits = &v76 + v81 := uint64(uint64(r.Uint32())) + this.Overlimits = &v81 } if r.Intn(10) != 0 { - v77 := uint64(uint64(r.Uint32())) - this.Packets = &v77 + v82 := uint64(uint64(r.Uint32())) + this.Packets = &v82 } if r.Intn(10) != 0 { - v78 := uint64(uint64(r.Uint32())) - this.Qlen = &v78 + v83 := uint64(uint64(r.Uint32())) + this.Qlen = &v83 } if r.Intn(10) != 0 { - v79 := uint64(uint64(r.Uint32())) - this.Ratebps = &v79 + v84 := uint64(uint64(r.Uint32())) + this.Ratebps = &v84 } if r.Intn(10) != 0 { - v80 := uint64(uint64(r.Uint32())) - this.Ratepps = &v80 + v85 := uint64(uint64(r.Uint32())) + this.Ratepps = &v85 } if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Requeues = &v81 + v86 := uint64(uint64(r.Uint32())) + this.Requeues = &v86 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 11) @@ -18989,202 +21030,202 @@ func NewPopulatedTrafficControlStatistics(r randyMesos, easy bool) *TrafficContr func NewPopulatedResourceStatistics(r randyMesos, easy bool) *ResourceStatistics { this := &ResourceStatistics{} - v82 := float64(r.Float64()) + v87 := float64(r.Float64()) if r.Intn(2) == 0 { - v82 *= -1 + v87 *= -1 } - this.Timestamp = &v82 + this.Timestamp = &v87 if r.Intn(10) != 0 { - v83 := float64(r.Float64()) + v88 := float64(r.Float64()) if r.Intn(2) == 0 { - v83 *= -1 + v88 *= -1 } - this.CpusUserTimeSecs = &v83 + this.CpusUserTimeSecs = &v88 } if r.Intn(10) != 0 { - v84 := float64(r.Float64()) + v89 := float64(r.Float64()) if r.Intn(2) == 0 { - v84 *= -1 + v89 *= -1 } - this.CpusSystemTimeSecs = &v84 + this.CpusSystemTimeSecs = &v89 } if r.Intn(10) != 0 { - v85 := float64(r.Float64()) + v90 := float64(r.Float64()) if r.Intn(2) == 0 { - v85 *= -1 + v90 *= -1 } - this.CpusLimit = &v85 + this.CpusLimit = &v90 } if r.Intn(10) != 0 { - v86 := uint64(uint64(r.Uint32())) - this.MemRssBytes = &v86 + v91 := uint64(uint64(r.Uint32())) + this.MemRssBytes = &v91 } if r.Intn(10) != 0 { - v87 := uint64(uint64(r.Uint32())) - this.MemLimitBytes = &v87 + v92 := uint64(uint64(r.Uint32())) + this.MemLimitBytes = &v92 } if r.Intn(10) != 0 { - v88 := uint32(r.Uint32()) - this.CpusNrPeriods = &v88 + v93 := uint32(r.Uint32()) + this.CpusNrPeriods = &v93 } if r.Intn(10) != 0 { - v89 := uint32(r.Uint32()) - this.CpusNrThrottled = &v89 + v94 := uint32(r.Uint32()) + this.CpusNrThrottled = &v94 } if r.Intn(10) != 0 { - v90 := float64(r.Float64()) + v95 := float64(r.Float64()) if r.Intn(2) == 0 { - v90 *= -1 + v95 *= -1 } - this.CpusThrottledTimeSecs = &v90 + this.CpusThrottledTimeSecs = &v95 } if r.Intn(10) != 0 { - v91 := uint64(uint64(r.Uint32())) - this.MemFileBytes = &v91 + v96 := uint64(uint64(r.Uint32())) + this.MemFileBytes = &v96 } if r.Intn(10) != 0 { - v92 := uint64(uint64(r.Uint32())) - this.MemAnonBytes = &v92 + v97 := uint64(uint64(r.Uint32())) + this.MemAnonBytes = &v97 } if r.Intn(10) != 0 { - v93 := uint64(uint64(r.Uint32())) - this.MemMappedFileBytes = &v93 + v98 := uint64(uint64(r.Uint32())) + this.MemMappedFileBytes = &v98 } if r.Intn(10) != 0 { this.Perf = NewPopulatedPerfStatistics(r, easy) } if r.Intn(10) != 0 { - v94 := uint64(uint64(r.Uint32())) - this.NetRxPackets = &v94 + v99 := uint64(uint64(r.Uint32())) + this.NetRxPackets = &v99 } if r.Intn(10) != 0 { - v95 := uint64(uint64(r.Uint32())) - this.NetRxBytes = &v95 + v100 := uint64(uint64(r.Uint32())) + this.NetRxBytes = &v100 } if r.Intn(10) != 0 { - v96 := uint64(uint64(r.Uint32())) - this.NetRxErrors = &v96 + v101 := uint64(uint64(r.Uint32())) + this.NetRxErrors = &v101 } if r.Intn(10) != 0 { - v97 := uint64(uint64(r.Uint32())) - this.NetRxDropped = &v97 + v102 := uint64(uint64(r.Uint32())) + this.NetRxDropped = &v102 } if r.Intn(10) != 0 { - v98 := uint64(uint64(r.Uint32())) - this.NetTxPackets = &v98 + v103 := uint64(uint64(r.Uint32())) + this.NetTxPackets = &v103 } if r.Intn(10) != 0 { - v99 := uint64(uint64(r.Uint32())) - this.NetTxBytes = &v99 + v104 := uint64(uint64(r.Uint32())) + this.NetTxBytes = &v104 } if r.Intn(10) != 0 { - v100 := uint64(uint64(r.Uint32())) - this.NetTxErrors = &v100 + v105 := uint64(uint64(r.Uint32())) + this.NetTxErrors = &v105 } if r.Intn(10) != 0 { - v101 := uint64(uint64(r.Uint32())) - this.NetTxDropped = &v101 + v106 := uint64(uint64(r.Uint32())) + this.NetTxDropped = &v106 } if r.Intn(10) != 0 { - v102 := float64(r.Float64()) + v107 := float64(r.Float64()) if r.Intn(2) == 0 { - v102 *= -1 + v107 *= -1 } - this.NetTcpRttMicrosecsP50 = &v102 + this.NetTcpRttMicrosecsP50 = &v107 } if r.Intn(10) != 0 { - v103 := float64(r.Float64()) + v108 := float64(r.Float64()) if r.Intn(2) == 0 { - v103 *= -1 + v108 *= -1 } - this.NetTcpRttMicrosecsP90 = &v103 + this.NetTcpRttMicrosecsP90 = &v108 } if r.Intn(10) != 0 { - v104 := float64(r.Float64()) + v109 := float64(r.Float64()) if r.Intn(2) == 0 { - v104 *= -1 + v109 *= -1 } - this.NetTcpRttMicrosecsP95 = &v104 + this.NetTcpRttMicrosecsP95 = &v109 } if r.Intn(10) != 0 { - v105 := float64(r.Float64()) + v110 := float64(r.Float64()) if r.Intn(2) == 0 { - v105 *= -1 + v110 *= -1 } - this.NetTcpRttMicrosecsP99 = &v105 + this.NetTcpRttMicrosecsP99 = &v110 } if r.Intn(10) != 0 { - v106 := uint64(uint64(r.Uint32())) - this.DiskLimitBytes = &v106 + v111 := uint64(uint64(r.Uint32())) + this.DiskLimitBytes = &v111 } if r.Intn(10) != 0 { - v107 := uint64(uint64(r.Uint32())) - this.DiskUsedBytes = &v107 + v112 := uint64(uint64(r.Uint32())) + this.DiskUsedBytes = &v112 } if r.Intn(10) != 0 { - v108 := float64(r.Float64()) + v113 := float64(r.Float64()) if r.Intn(2) == 0 { - v108 *= -1 + v113 *= -1 } - this.NetTcpActiveConnections = &v108 + this.NetTcpActiveConnections = &v113 } if r.Intn(10) != 0 { - v109 := float64(r.Float64()) + v114 := float64(r.Float64()) if r.Intn(2) == 0 { - v109 *= -1 + v114 *= -1 } - this.NetTcpTimeWaitConnections = &v109 + this.NetTcpTimeWaitConnections = &v114 } if r.Intn(10) != 0 { - v110 := uint32(r.Uint32()) - this.Processes = &v110 + v115 := uint32(r.Uint32()) + this.Processes = &v115 } if r.Intn(10) != 0 { - v111 := uint32(r.Uint32()) - this.Threads = &v111 + v116 := uint32(r.Uint32()) + this.Threads = &v116 } if r.Intn(10) != 0 { - v112 := uint64(uint64(r.Uint32())) - this.MemLowPressureCounter = &v112 + v117 := uint64(uint64(r.Uint32())) + this.MemLowPressureCounter = &v117 } if r.Intn(10) != 0 { - v113 := uint64(uint64(r.Uint32())) - this.MemMediumPressureCounter = &v113 + v118 := uint64(uint64(r.Uint32())) + this.MemMediumPressureCounter = &v118 } if r.Intn(10) != 0 { - v114 := uint64(uint64(r.Uint32())) - this.MemCriticalPressureCounter = &v114 + v119 := uint64(uint64(r.Uint32())) + this.MemCriticalPressureCounter = &v119 } if r.Intn(10) != 0 { - v115 := r.Intn(10) - this.NetTrafficControlStatistics = make([]*TrafficControlStatistics, v115) - for i := 0; i < v115; i++ { + v120 := r.Intn(10) + this.NetTrafficControlStatistics = make([]*TrafficControlStatistics, v120) + for i := 0; i < v120; i++ { this.NetTrafficControlStatistics[i] = NewPopulatedTrafficControlStatistics(r, easy) } } if r.Intn(10) != 0 { - v116 := uint64(uint64(r.Uint32())) - this.MemTotalBytes = &v116 + v121 := uint64(uint64(r.Uint32())) + this.MemTotalBytes = &v121 } if r.Intn(10) != 0 { - v117 := uint64(uint64(r.Uint32())) - this.MemTotalMemswBytes = &v117 + v122 := uint64(uint64(r.Uint32())) + this.MemTotalMemswBytes = &v122 } if r.Intn(10) != 0 { - v118 := uint64(uint64(r.Uint32())) - this.MemSoftLimitBytes = &v118 + v123 := uint64(uint64(r.Uint32())) + this.MemSoftLimitBytes = &v123 } if r.Intn(10) != 0 { - v119 := uint64(uint64(r.Uint32())) - this.MemCacheBytes = &v119 + v124 := uint64(uint64(r.Uint32())) + this.MemCacheBytes = &v124 } if r.Intn(10) != 0 { - v120 := uint64(uint64(r.Uint32())) - this.MemSwapBytes = &v120 + v125 := uint64(uint64(r.Uint32())) + this.MemSwapBytes = &v125 } if r.Intn(10) != 0 { - v121 := uint64(uint64(r.Uint32())) - this.MemUnevictableBytes = &v121 + v126 := uint64(uint64(r.Uint32())) + this.MemUnevictableBytes = &v126 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 42) @@ -19195,16 +21236,16 @@ func NewPopulatedResourceStatistics(r randyMesos, easy bool) *ResourceStatistics func NewPopulatedResourceUsage(r randyMesos, easy bool) *ResourceUsage { this := &ResourceUsage{} if r.Intn(10) != 0 { - v122 := r.Intn(10) - this.Executors = make([]*ResourceUsage_Executor, v122) - for i := 0; i < v122; i++ { + v127 := r.Intn(10) + this.Executors = make([]*ResourceUsage_Executor, v127) + for i := 0; i < v127; i++ { this.Executors[i] = NewPopulatedResourceUsage_Executor(r, easy) } } if r.Intn(10) != 0 { - v123 := r.Intn(10) - this.Total = make([]*Resource, v123) - for i := 0; i < v123; i++ { + v128 := r.Intn(10) + this.Total = make([]*Resource, v128) + for i := 0; i < v128; i++ { this.Total[i] = NewPopulatedResource(r, easy) } } @@ -19218,242 +21259,243 @@ func NewPopulatedResourceUsage_Executor(r randyMesos, easy bool) *ResourceUsage_ this := &ResourceUsage_Executor{} this.ExecutorInfo = NewPopulatedExecutorInfo(r, easy) if r.Intn(10) != 0 { - v124 := r.Intn(10) - this.Allocated = make([]*Resource, v124) - for i := 0; i < v124; i++ { + v129 := r.Intn(10) + this.Allocated = make([]*Resource, v129) + for i := 0; i < v129; i++ { this.Allocated[i] = NewPopulatedResource(r, easy) } } if r.Intn(10) != 0 { this.Statistics = NewPopulatedResourceStatistics(r, easy) } + this.ContainerId = NewPopulatedContainerID(r, easy) if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + this.XXX_unrecognized = randUnrecognizedMesos(r, 5) } return this } func NewPopulatedPerfStatistics(r randyMesos, easy bool) *PerfStatistics { this := &PerfStatistics{} - v125 := float64(r.Float64()) + v130 := float64(r.Float64()) if r.Intn(2) == 0 { - v125 *= -1 + v130 *= -1 } - this.Timestamp = &v125 - v126 := float64(r.Float64()) + this.Timestamp = &v130 + v131 := float64(r.Float64()) if r.Intn(2) == 0 { - v126 *= -1 - } - this.Duration = &v126 - if r.Intn(10) != 0 { - v127 := uint64(uint64(r.Uint32())) - this.Cycles = &v127 - } - if r.Intn(10) != 0 { - v128 := uint64(uint64(r.Uint32())) - this.StalledCyclesFrontend = &v128 - } - if r.Intn(10) != 0 { - v129 := uint64(uint64(r.Uint32())) - this.StalledCyclesBackend = &v129 - } - if r.Intn(10) != 0 { - v130 := uint64(uint64(r.Uint32())) - this.Instructions = &v130 - } - if r.Intn(10) != 0 { - v131 := uint64(uint64(r.Uint32())) - this.CacheReferences = &v131 + v131 *= -1 } + this.Duration = &v131 if r.Intn(10) != 0 { v132 := uint64(uint64(r.Uint32())) - this.CacheMisses = &v132 + this.Cycles = &v132 } if r.Intn(10) != 0 { v133 := uint64(uint64(r.Uint32())) - this.Branches = &v133 + this.StalledCyclesFrontend = &v133 } if r.Intn(10) != 0 { v134 := uint64(uint64(r.Uint32())) - this.BranchMisses = &v134 + this.StalledCyclesBackend = &v134 } if r.Intn(10) != 0 { v135 := uint64(uint64(r.Uint32())) - this.BusCycles = &v135 + this.Instructions = &v135 } if r.Intn(10) != 0 { v136 := uint64(uint64(r.Uint32())) - this.RefCycles = &v136 + this.CacheReferences = &v136 } if r.Intn(10) != 0 { - v137 := float64(r.Float64()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.CpuClock = &v137 + v137 := uint64(uint64(r.Uint32())) + this.CacheMisses = &v137 } if r.Intn(10) != 0 { - v138 := float64(r.Float64()) - if r.Intn(2) == 0 { - v138 *= -1 - } - this.TaskClock = &v138 + v138 := uint64(uint64(r.Uint32())) + this.Branches = &v138 } if r.Intn(10) != 0 { v139 := uint64(uint64(r.Uint32())) - this.PageFaults = &v139 + this.BranchMisses = &v139 } if r.Intn(10) != 0 { v140 := uint64(uint64(r.Uint32())) - this.MinorFaults = &v140 + this.BusCycles = &v140 } if r.Intn(10) != 0 { v141 := uint64(uint64(r.Uint32())) - this.MajorFaults = &v141 + this.RefCycles = &v141 } if r.Intn(10) != 0 { - v142 := uint64(uint64(r.Uint32())) - this.ContextSwitches = &v142 + v142 := float64(r.Float64()) + if r.Intn(2) == 0 { + v142 *= -1 + } + this.CpuClock = &v142 } if r.Intn(10) != 0 { - v143 := uint64(uint64(r.Uint32())) - this.CpuMigrations = &v143 + v143 := float64(r.Float64()) + if r.Intn(2) == 0 { + v143 *= -1 + } + this.TaskClock = &v143 } if r.Intn(10) != 0 { v144 := uint64(uint64(r.Uint32())) - this.AlignmentFaults = &v144 + this.PageFaults = &v144 } if r.Intn(10) != 0 { v145 := uint64(uint64(r.Uint32())) - this.EmulationFaults = &v145 + this.MinorFaults = &v145 } if r.Intn(10) != 0 { v146 := uint64(uint64(r.Uint32())) - this.L1DcacheLoads = &v146 + this.MajorFaults = &v146 } if r.Intn(10) != 0 { v147 := uint64(uint64(r.Uint32())) - this.L1DcacheLoadMisses = &v147 + this.ContextSwitches = &v147 } if r.Intn(10) != 0 { v148 := uint64(uint64(r.Uint32())) - this.L1DcacheStores = &v148 + this.CpuMigrations = &v148 } if r.Intn(10) != 0 { v149 := uint64(uint64(r.Uint32())) - this.L1DcacheStoreMisses = &v149 + this.AlignmentFaults = &v149 } if r.Intn(10) != 0 { v150 := uint64(uint64(r.Uint32())) - this.L1DcachePrefetches = &v150 + this.EmulationFaults = &v150 } if r.Intn(10) != 0 { v151 := uint64(uint64(r.Uint32())) - this.L1DcachePrefetchMisses = &v151 + this.L1DcacheLoads = &v151 } if r.Intn(10) != 0 { v152 := uint64(uint64(r.Uint32())) - this.L1IcacheLoads = &v152 + this.L1DcacheLoadMisses = &v152 } if r.Intn(10) != 0 { v153 := uint64(uint64(r.Uint32())) - this.L1IcacheLoadMisses = &v153 + this.L1DcacheStores = &v153 } if r.Intn(10) != 0 { v154 := uint64(uint64(r.Uint32())) - this.L1IcachePrefetches = &v154 + this.L1DcacheStoreMisses = &v154 } if r.Intn(10) != 0 { v155 := uint64(uint64(r.Uint32())) - this.L1IcachePrefetchMisses = &v155 + this.L1DcachePrefetches = &v155 } if r.Intn(10) != 0 { v156 := uint64(uint64(r.Uint32())) - this.LlcLoads = &v156 + this.L1DcachePrefetchMisses = &v156 } if r.Intn(10) != 0 { v157 := uint64(uint64(r.Uint32())) - this.LlcLoadMisses = &v157 + this.L1IcacheLoads = &v157 } if r.Intn(10) != 0 { v158 := uint64(uint64(r.Uint32())) - this.LlcStores = &v158 + this.L1IcacheLoadMisses = &v158 } if r.Intn(10) != 0 { v159 := uint64(uint64(r.Uint32())) - this.LlcStoreMisses = &v159 + this.L1IcachePrefetches = &v159 } if r.Intn(10) != 0 { v160 := uint64(uint64(r.Uint32())) - this.LlcPrefetches = &v160 + this.L1IcachePrefetchMisses = &v160 } if r.Intn(10) != 0 { v161 := uint64(uint64(r.Uint32())) - this.LlcPrefetchMisses = &v161 + this.LlcLoads = &v161 } if r.Intn(10) != 0 { v162 := uint64(uint64(r.Uint32())) - this.DtlbLoads = &v162 + this.LlcLoadMisses = &v162 } if r.Intn(10) != 0 { v163 := uint64(uint64(r.Uint32())) - this.DtlbLoadMisses = &v163 + this.LlcStores = &v163 } if r.Intn(10) != 0 { v164 := uint64(uint64(r.Uint32())) - this.DtlbStores = &v164 + this.LlcStoreMisses = &v164 } if r.Intn(10) != 0 { v165 := uint64(uint64(r.Uint32())) - this.DtlbStoreMisses = &v165 + this.LlcPrefetches = &v165 } if r.Intn(10) != 0 { v166 := uint64(uint64(r.Uint32())) - this.DtlbPrefetches = &v166 + this.LlcPrefetchMisses = &v166 } if r.Intn(10) != 0 { v167 := uint64(uint64(r.Uint32())) - this.DtlbPrefetchMisses = &v167 + this.DtlbLoads = &v167 } if r.Intn(10) != 0 { v168 := uint64(uint64(r.Uint32())) - this.ItlbLoads = &v168 + this.DtlbLoadMisses = &v168 } if r.Intn(10) != 0 { v169 := uint64(uint64(r.Uint32())) - this.ItlbLoadMisses = &v169 + this.DtlbStores = &v169 } if r.Intn(10) != 0 { v170 := uint64(uint64(r.Uint32())) - this.BranchLoads = &v170 + this.DtlbStoreMisses = &v170 } if r.Intn(10) != 0 { v171 := uint64(uint64(r.Uint32())) - this.BranchLoadMisses = &v171 + this.DtlbPrefetches = &v171 } if r.Intn(10) != 0 { v172 := uint64(uint64(r.Uint32())) - this.NodeLoads = &v172 + this.DtlbPrefetchMisses = &v172 } if r.Intn(10) != 0 { v173 := uint64(uint64(r.Uint32())) - this.NodeLoadMisses = &v173 + this.ItlbLoads = &v173 } if r.Intn(10) != 0 { v174 := uint64(uint64(r.Uint32())) - this.NodeStores = &v174 + this.ItlbLoadMisses = &v174 } if r.Intn(10) != 0 { v175 := uint64(uint64(r.Uint32())) - this.NodeStoreMisses = &v175 + this.BranchLoads = &v175 } if r.Intn(10) != 0 { v176 := uint64(uint64(r.Uint32())) - this.NodePrefetches = &v176 + this.BranchLoadMisses = &v176 } if r.Intn(10) != 0 { v177 := uint64(uint64(r.Uint32())) - this.NodePrefetchMisses = &v177 + this.NodeLoads = &v177 + } + if r.Intn(10) != 0 { + v178 := uint64(uint64(r.Uint32())) + this.NodeLoadMisses = &v178 + } + if r.Intn(10) != 0 { + v179 := uint64(uint64(r.Uint32())) + this.NodeStores = &v179 + } + if r.Intn(10) != 0 { + v180 := uint64(uint64(r.Uint32())) + this.NodeStoreMisses = &v180 + } + if r.Intn(10) != 0 { + v181 := uint64(uint64(r.Uint32())) + this.NodePrefetches = &v181 + } + if r.Intn(10) != 0 { + v182 := uint64(uint64(r.Uint32())) + this.NodePrefetchMisses = &v182 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 54) @@ -19467,9 +21509,9 @@ func NewPopulatedRequest(r randyMesos, easy bool) *Request { this.SlaveId = NewPopulatedSlaveID(r, easy) } if r.Intn(10) != 0 { - v178 := r.Intn(10) - this.Resources = make([]*Resource, v178) - for i := 0; i < v178; i++ { + v183 := r.Intn(10) + this.Resources = make([]*Resource, v183) + for i := 0; i < v183; i++ { this.Resources[i] = NewPopulatedResource(r, easy) } } @@ -19484,42 +21526,45 @@ func NewPopulatedOffer(r randyMesos, easy bool) *Offer { this.Id = NewPopulatedOfferID(r, easy) this.FrameworkId = NewPopulatedFrameworkID(r, easy) this.SlaveId = NewPopulatedSlaveID(r, easy) - v179 := randStringMesos(r) - this.Hostname = &v179 + v184 := randStringMesos(r) + this.Hostname = &v184 if r.Intn(10) != 0 { - v180 := r.Intn(10) - this.Resources = make([]*Resource, v180) - for i := 0; i < v180; i++ { + v185 := r.Intn(10) + this.Resources = make([]*Resource, v185) + for i := 0; i < v185; i++ { this.Resources[i] = NewPopulatedResource(r, easy) } } if r.Intn(10) != 0 { - v181 := r.Intn(10) - this.ExecutorIds = make([]*ExecutorID, v181) - for i := 0; i < v181; i++ { + v186 := r.Intn(10) + this.ExecutorIds = make([]*ExecutorID, v186) + for i := 0; i < v186; i++ { this.ExecutorIds[i] = NewPopulatedExecutorID(r, easy) } } if r.Intn(10) != 0 { - v182 := r.Intn(10) - this.Attributes = make([]*Attribute, v182) - for i := 0; i < v182; i++ { + v187 := r.Intn(10) + this.Attributes = make([]*Attribute, v187) + for i := 0; i < v187; i++ { this.Attributes[i] = NewPopulatedAttribute(r, easy) } } if r.Intn(10) != 0 { this.Url = NewPopulatedURL(r, easy) } + if r.Intn(10) != 0 { + this.Unavailability = NewPopulatedUnavailability(r, easy) + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 9) + this.XXX_unrecognized = randUnrecognizedMesos(r, 10) } return this } func NewPopulatedOffer_Operation(r randyMesos, easy bool) *Offer_Operation { this := &Offer_Operation{} - v183 := Offer_Operation_Type([]int32{1, 2, 3, 4, 5}[r.Intn(5)]) - this.Type = &v183 + v188 := Offer_Operation_Type([]int32{1, 2, 3, 4, 5}[r.Intn(5)]) + this.Type = &v188 if r.Intn(10) != 0 { this.Launch = NewPopulatedOffer_Operation_Launch(r, easy) } @@ -19544,9 +21589,9 @@ func NewPopulatedOffer_Operation(r randyMesos, easy bool) *Offer_Operation { func NewPopulatedOffer_Operation_Launch(r randyMesos, easy bool) *Offer_Operation_Launch { this := &Offer_Operation_Launch{} if r.Intn(10) != 0 { - v184 := r.Intn(10) - this.TaskInfos = make([]*TaskInfo, v184) - for i := 0; i < v184; i++ { + v189 := r.Intn(10) + this.TaskInfos = make([]*TaskInfo, v189) + for i := 0; i < v189; i++ { this.TaskInfos[i] = NewPopulatedTaskInfo(r, easy) } } @@ -19559,9 +21604,9 @@ func NewPopulatedOffer_Operation_Launch(r randyMesos, easy bool) *Offer_Operatio func NewPopulatedOffer_Operation_Reserve(r randyMesos, easy bool) *Offer_Operation_Reserve { this := &Offer_Operation_Reserve{} if r.Intn(10) != 0 { - v185 := r.Intn(10) - this.Resources = make([]*Resource, v185) - for i := 0; i < v185; i++ { + v190 := r.Intn(10) + this.Resources = make([]*Resource, v190) + for i := 0; i < v190; i++ { this.Resources[i] = NewPopulatedResource(r, easy) } } @@ -19574,9 +21619,9 @@ func NewPopulatedOffer_Operation_Reserve(r randyMesos, easy bool) *Offer_Operati func NewPopulatedOffer_Operation_Unreserve(r randyMesos, easy bool) *Offer_Operation_Unreserve { this := &Offer_Operation_Unreserve{} if r.Intn(10) != 0 { - v186 := r.Intn(10) - this.Resources = make([]*Resource, v186) - for i := 0; i < v186; i++ { + v191 := r.Intn(10) + this.Resources = make([]*Resource, v191) + for i := 0; i < v191; i++ { this.Resources[i] = NewPopulatedResource(r, easy) } } @@ -19589,9 +21634,9 @@ func NewPopulatedOffer_Operation_Unreserve(r randyMesos, easy bool) *Offer_Opera func NewPopulatedOffer_Operation_Create(r randyMesos, easy bool) *Offer_Operation_Create { this := &Offer_Operation_Create{} if r.Intn(10) != 0 { - v187 := r.Intn(10) - this.Volumes = make([]*Resource, v187) - for i := 0; i < v187; i++ { + v192 := r.Intn(10) + this.Volumes = make([]*Resource, v192) + for i := 0; i < v192; i++ { this.Volumes[i] = NewPopulatedResource(r, easy) } } @@ -19604,9 +21649,9 @@ func NewPopulatedOffer_Operation_Create(r randyMesos, easy bool) *Offer_Operatio func NewPopulatedOffer_Operation_Destroy(r randyMesos, easy bool) *Offer_Operation_Destroy { this := &Offer_Operation_Destroy{} if r.Intn(10) != 0 { - v188 := r.Intn(10) - this.Volumes = make([]*Resource, v188) - for i := 0; i < v188; i++ { + v193 := r.Intn(10) + this.Volumes = make([]*Resource, v193) + for i := 0; i < v193; i++ { this.Volumes[i] = NewPopulatedResource(r, easy) } } @@ -19616,16 +21661,40 @@ func NewPopulatedOffer_Operation_Destroy(r randyMesos, easy bool) *Offer_Operati return this } +func NewPopulatedInverseOffer(r randyMesos, easy bool) *InverseOffer { + this := &InverseOffer{} + this.Id = NewPopulatedOfferID(r, easy) + if r.Intn(10) != 0 { + this.Url = NewPopulatedURL(r, easy) + } + this.FrameworkId = NewPopulatedFrameworkID(r, easy) + if r.Intn(10) != 0 { + this.SlaveId = NewPopulatedSlaveID(r, easy) + } + this.Unavailability = NewPopulatedUnavailability(r, easy) + if r.Intn(10) != 0 { + v194 := r.Intn(10) + this.Resources = make([]*Resource, v194) + for i := 0; i < v194; i++ { + this.Resources[i] = NewPopulatedResource(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 7) + } + return this +} + func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { this := &TaskInfo{} - v189 := randStringMesos(r) - this.Name = &v189 + v195 := randStringMesos(r) + this.Name = &v195 this.TaskId = NewPopulatedTaskID(r, easy) this.SlaveId = NewPopulatedSlaveID(r, easy) if r.Intn(10) != 0 { - v190 := r.Intn(10) - this.Resources = make([]*Resource, v190) - for i := 0; i < v190; i++ { + v196 := r.Intn(10) + this.Resources = make([]*Resource, v196) + for i := 0; i < v196; i++ { this.Resources[i] = NewPopulatedResource(r, easy) } } @@ -19633,9 +21702,9 @@ func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { this.Executor = NewPopulatedExecutorInfo(r, easy) } if r.Intn(10) != 0 { - v191 := r.Intn(100) - this.Data = make([]byte, v191) - for i := 0; i < v191; i++ { + v197 := r.Intn(100) + this.Data = make([]byte, v197) + for i := 0; i < v197; i++ { this.Data[i] = byte(r.Intn(256)) } } @@ -19663,56 +21732,59 @@ func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { func NewPopulatedTaskStatus(r randyMesos, easy bool) *TaskStatus { this := &TaskStatus{} this.TaskId = NewPopulatedTaskID(r, easy) - v192 := TaskState([]int32{6, 0, 1, 2, 3, 4, 5, 7}[r.Intn(8)]) - this.State = &v192 + v198 := TaskState([]int32{6, 0, 1, 2, 3, 4, 5, 7}[r.Intn(8)]) + this.State = &v198 if r.Intn(10) != 0 { - v193 := r.Intn(100) - this.Data = make([]byte, v193) - for i := 0; i < v193; i++ { + v199 := r.Intn(100) + this.Data = make([]byte, v199) + for i := 0; i < v199; i++ { this.Data[i] = byte(r.Intn(256)) } } if r.Intn(10) != 0 { - v194 := randStringMesos(r) - this.Message = &v194 + v200 := randStringMesos(r) + this.Message = &v200 } if r.Intn(10) != 0 { this.SlaveId = NewPopulatedSlaveID(r, easy) } if r.Intn(10) != 0 { - v195 := float64(r.Float64()) + v201 := float64(r.Float64()) if r.Intn(2) == 0 { - v195 *= -1 + v201 *= -1 } - this.Timestamp = &v195 + this.Timestamp = &v201 } if r.Intn(10) != 0 { this.ExecutorId = NewPopulatedExecutorID(r, easy) } if r.Intn(10) != 0 { - v196 := bool(bool(r.Intn(2) == 0)) - this.Healthy = &v196 + v202 := bool(bool(r.Intn(2) == 0)) + this.Healthy = &v202 } if r.Intn(10) != 0 { - v197 := TaskStatus_Source([]int32{0, 1, 2}[r.Intn(3)]) - this.Source = &v197 + v203 := TaskStatus_Source([]int32{0, 1, 2}[r.Intn(3)]) + this.Source = &v203 } if r.Intn(10) != 0 { - v198 := TaskStatus_Reason([]int32{0, 17, 1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 10, 11, 12, 13, 14, 15, 16}[r.Intn(19)]) - this.Reason = &v198 + v204 := TaskStatus_Reason([]int32{0, 21, 19, 20, 8, 17, 22, 23, 24, 1, 2, 3, 4, 5, 6, 7, 9, 18, 10, 11, 12, 13, 14, 15, 16}[r.Intn(25)]) + this.Reason = &v204 } if r.Intn(10) != 0 { - v199 := r.Intn(100) - this.Uuid = make([]byte, v199) - for i := 0; i < v199; i++ { + v205 := r.Intn(100) + this.Uuid = make([]byte, v205) + for i := 0; i < v205; i++ { this.Uuid[i] = byte(r.Intn(256)) } } if r.Intn(10) != 0 { this.Labels = NewPopulatedLabels(r, easy) } + if r.Intn(10) != 0 { + this.ContainerStatus = NewPopulatedContainerStatus(r, easy) + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 13) + this.XXX_unrecognized = randUnrecognizedMesos(r, 14) } return this } @@ -19720,11 +21792,11 @@ func NewPopulatedTaskStatus(r randyMesos, easy bool) *TaskStatus { func NewPopulatedFilters(r randyMesos, easy bool) *Filters { this := &Filters{} if r.Intn(10) != 0 { - v200 := float64(r.Float64()) + v206 := float64(r.Float64()) if r.Intn(2) == 0 { - v200 *= -1 + v206 *= -1 } - this.RefuseSeconds = &v200 + this.RefuseSeconds = &v206 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 2) @@ -19735,9 +21807,9 @@ func NewPopulatedFilters(r randyMesos, easy bool) *Filters { func NewPopulatedEnvironment(r randyMesos, easy bool) *Environment { this := &Environment{} if r.Intn(10) != 0 { - v201 := r.Intn(10) - this.Variables = make([]*Environment_Variable, v201) - for i := 0; i < v201; i++ { + v207 := r.Intn(10) + this.Variables = make([]*Environment_Variable, v207) + for i := 0; i < v207; i++ { this.Variables[i] = NewPopulatedEnvironment_Variable(r, easy) } } @@ -19749,10 +21821,10 @@ func NewPopulatedEnvironment(r randyMesos, easy bool) *Environment { func NewPopulatedEnvironment_Variable(r randyMesos, easy bool) *Environment_Variable { this := &Environment_Variable{} - v202 := randStringMesos(r) - this.Name = &v202 - v203 := randStringMesos(r) - this.Value = &v203 + v208 := randStringMesos(r) + this.Name = &v208 + v209 := randStringMesos(r) + this.Value = &v209 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } @@ -19761,10 +21833,10 @@ func NewPopulatedEnvironment_Variable(r randyMesos, easy bool) *Environment_Vari func NewPopulatedParameter(r randyMesos, easy bool) *Parameter { this := &Parameter{} - v204 := randStringMesos(r) - this.Key = &v204 - v205 := randStringMesos(r) - this.Value = &v205 + v210 := randStringMesos(r) + this.Key = &v210 + v211 := randStringMesos(r) + this.Value = &v211 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } @@ -19774,9 +21846,9 @@ func NewPopulatedParameter(r randyMesos, easy bool) *Parameter { func NewPopulatedParameters(r randyMesos, easy bool) *Parameters { this := &Parameters{} if r.Intn(10) != 0 { - v206 := r.Intn(10) - this.Parameter = make([]*Parameter, v206) - for i := 0; i < v206; i++ { + v212 := r.Intn(10) + this.Parameter = make([]*Parameter, v212) + for i := 0; i < v212; i++ { this.Parameter[i] = NewPopulatedParameter(r, easy) } } @@ -19788,14 +21860,11 @@ func NewPopulatedParameters(r randyMesos, easy bool) *Parameters { func NewPopulatedCredential(r randyMesos, easy bool) *Credential { this := &Credential{} - v207 := randStringMesos(r) - this.Principal = &v207 + v213 := randStringMesos(r) + this.Principal = &v213 if r.Intn(10) != 0 { - v208 := r.Intn(100) - this.Secret = make([]byte, v208) - for i := 0; i < v208; i++ { - this.Secret[i] = byte(r.Intn(256)) - } + v214 := randStringMesos(r) + this.Secret = &v214 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 3) @@ -19806,9 +21875,9 @@ func NewPopulatedCredential(r randyMesos, easy bool) *Credential { func NewPopulatedCredentials(r randyMesos, easy bool) *Credentials { this := &Credentials{} if r.Intn(10) != 0 { - v209 := r.Intn(10) - this.Credentials = make([]*Credential, v209) - for i := 0; i < v209; i++ { + v215 := r.Intn(10) + this.Credentials = make([]*Credential, v215) + for i := 0; i < v215; i++ { this.Credentials[i] = NewPopulatedCredential(r, easy) } } @@ -19821,17 +21890,17 @@ func NewPopulatedCredentials(r randyMesos, easy bool) *Credentials { func NewPopulatedRateLimit(r randyMesos, easy bool) *RateLimit { this := &RateLimit{} if r.Intn(10) != 0 { - v210 := float64(r.Float64()) + v216 := float64(r.Float64()) if r.Intn(2) == 0 { - v210 *= -1 + v216 *= -1 } - this.Qps = &v210 + this.Qps = &v216 } - v211 := randStringMesos(r) - this.Principal = &v211 + v217 := randStringMesos(r) + this.Principal = &v217 if r.Intn(10) != 0 { - v212 := uint64(uint64(r.Uint32())) - this.Capacity = &v212 + v218 := uint64(uint64(r.Uint32())) + this.Capacity = &v218 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 4) @@ -19842,22 +21911,22 @@ func NewPopulatedRateLimit(r randyMesos, easy bool) *RateLimit { func NewPopulatedRateLimits(r randyMesos, easy bool) *RateLimits { this := &RateLimits{} if r.Intn(10) != 0 { - v213 := r.Intn(10) - this.Limits = make([]*RateLimit, v213) - for i := 0; i < v213; i++ { + v219 := r.Intn(10) + this.Limits = make([]*RateLimit, v219) + for i := 0; i < v219; i++ { this.Limits[i] = NewPopulatedRateLimit(r, easy) } } if r.Intn(10) != 0 { - v214 := float64(r.Float64()) + v220 := float64(r.Float64()) if r.Intn(2) == 0 { - v214 *= -1 + v220 *= -1 } - this.AggregateDefaultQps = &v214 + this.AggregateDefaultQps = &v220 } if r.Intn(10) != 0 { - v215 := uint64(uint64(r.Uint32())) - this.AggregateDefaultCapacity = &v215 + v221 := uint64(uint64(r.Uint32())) + this.AggregateDefaultCapacity = &v221 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 4) @@ -19867,10 +21936,10 @@ func NewPopulatedRateLimits(r randyMesos, easy bool) *RateLimits { func NewPopulatedImage(r randyMesos, easy bool) *Image { this := &Image{} - v216 := Image_Type([]int32{1, 2}[r.Intn(2)]) - this.Type = &v216 + v222 := Image_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v222 if r.Intn(10) != 0 { - this.Appc = NewPopulatedImage_AppC(r, easy) + this.Appc = NewPopulatedImage_Appc(r, easy) } if r.Intn(10) != 0 { this.Docker = NewPopulatedImage_Docker(r, easy) @@ -19881,13 +21950,13 @@ func NewPopulatedImage(r randyMesos, easy bool) *Image { return this } -func NewPopulatedImage_AppC(r randyMesos, easy bool) *Image_AppC { - this := &Image_AppC{} - v217 := randStringMesos(r) - this.Name = &v217 +func NewPopulatedImage_Appc(r randyMesos, easy bool) *Image_Appc { + this := &Image_Appc{} + v223 := randStringMesos(r) + this.Name = &v223 if r.Intn(10) != 0 { - v218 := randStringMesos(r) - this.Id = &v218 + v224 := randStringMesos(r) + this.Id = &v224 } if r.Intn(10) != 0 { this.Labels = NewPopulatedLabels(r, easy) @@ -19900,8 +21969,8 @@ func NewPopulatedImage_AppC(r randyMesos, easy bool) *Image_AppC { func NewPopulatedImage_Docker(r randyMesos, easy bool) *Image_Docker { this := &Image_Docker{} - v219 := randStringMesos(r) - this.Name = &v219 + v225 := randStringMesos(r) + this.Name = &v225 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } @@ -19910,14 +21979,14 @@ func NewPopulatedImage_Docker(r randyMesos, easy bool) *Image_Docker { func NewPopulatedVolume(r randyMesos, easy bool) *Volume { this := &Volume{} - v220 := randStringMesos(r) - this.ContainerPath = &v220 + v226 := randStringMesos(r) + this.ContainerPath = &v226 if r.Intn(10) != 0 { - v221 := randStringMesos(r) - this.HostPath = &v221 + v227 := randStringMesos(r) + this.HostPath = &v227 } - v222 := Volume_Mode([]int32{1, 2}[r.Intn(2)]) - this.Mode = &v222 + v228 := Volume_Mode([]int32{1, 2}[r.Intn(2)]) + this.Mode = &v228 if r.Intn(10) != 0 { this.Image = NewPopulatedImage(r, easy) } @@ -19927,14 +21996,63 @@ func NewPopulatedVolume(r randyMesos, easy bool) *Volume { return this } +func NewPopulatedNetworkInfo(r randyMesos, easy bool) *NetworkInfo { + this := &NetworkInfo{} + if r.Intn(10) != 0 { + v229 := NetworkInfo_Protocol([]int32{1, 2}[r.Intn(2)]) + this.Protocol = &v229 + } + if r.Intn(10) != 0 { + v230 := randStringMesos(r) + this.IpAddress = &v230 + } + if r.Intn(10) != 0 { + v231 := r.Intn(10) + this.Groups = make([]string, v231) + for i := 0; i < v231; i++ { + this.Groups[i] = randStringMesos(r) + } + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if r.Intn(10) != 0 { + v232 := r.Intn(10) + this.IpAddresses = make([]*NetworkInfo_IPAddress, v232) + for i := 0; i < v232; i++ { + this.IpAddresses[i] = NewPopulatedNetworkInfo_IPAddress(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 6) + } + return this +} + +func NewPopulatedNetworkInfo_IPAddress(r randyMesos, easy bool) *NetworkInfo_IPAddress { + this := &NetworkInfo_IPAddress{} + if r.Intn(10) != 0 { + v233 := NetworkInfo_Protocol([]int32{1, 2}[r.Intn(2)]) + this.Protocol = &v233 + } + if r.Intn(10) != 0 { + v234 := randStringMesos(r) + this.IpAddress = &v234 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + } + return this +} + func NewPopulatedContainerInfo(r randyMesos, easy bool) *ContainerInfo { this := &ContainerInfo{} - v223 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) - this.Type = &v223 + v235 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v235 if r.Intn(10) != 0 { - v224 := r.Intn(10) - this.Volumes = make([]*Volume, v224) - for i := 0; i < v224; i++ { + v236 := r.Intn(10) + this.Volumes = make([]*Volume, v236) + for i := 0; i < v236; i++ { this.Volumes[i] = NewPopulatedVolume(r, easy) } } @@ -19942,47 +22060,54 @@ func NewPopulatedContainerInfo(r randyMesos, easy bool) *ContainerInfo { this.Docker = NewPopulatedContainerInfo_DockerInfo(r, easy) } if r.Intn(10) != 0 { - v225 := randStringMesos(r) - this.Hostname = &v225 + v237 := randStringMesos(r) + this.Hostname = &v237 } if r.Intn(10) != 0 { this.Mesos = NewPopulatedContainerInfo_MesosInfo(r, easy) } + if r.Intn(10) != 0 { + v238 := r.Intn(10) + this.NetworkInfos = make([]*NetworkInfo, v238) + for i := 0; i < v238; i++ { + this.NetworkInfos[i] = NewPopulatedNetworkInfo(r, easy) + } + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 6) + this.XXX_unrecognized = randUnrecognizedMesos(r, 8) } return this } func NewPopulatedContainerInfo_DockerInfo(r randyMesos, easy bool) *ContainerInfo_DockerInfo { this := &ContainerInfo_DockerInfo{} - v226 := randStringMesos(r) - this.Image = &v226 + v239 := randStringMesos(r) + this.Image = &v239 if r.Intn(10) != 0 { - v227 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3}[r.Intn(3)]) - this.Network = &v227 + v240 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3}[r.Intn(3)]) + this.Network = &v240 } if r.Intn(10) != 0 { - v228 := r.Intn(10) - this.PortMappings = make([]*ContainerInfo_DockerInfo_PortMapping, v228) - for i := 0; i < v228; i++ { + v241 := r.Intn(10) + this.PortMappings = make([]*ContainerInfo_DockerInfo_PortMapping, v241) + for i := 0; i < v241; i++ { this.PortMappings[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(r, easy) } } if r.Intn(10) != 0 { - v229 := bool(bool(r.Intn(2) == 0)) - this.Privileged = &v229 + v242 := bool(bool(r.Intn(2) == 0)) + this.Privileged = &v242 } if r.Intn(10) != 0 { - v230 := r.Intn(10) - this.Parameters = make([]*Parameter, v230) - for i := 0; i < v230; i++ { + v243 := r.Intn(10) + this.Parameters = make([]*Parameter, v243) + for i := 0; i < v243; i++ { this.Parameters[i] = NewPopulatedParameter(r, easy) } } if r.Intn(10) != 0 { - v231 := bool(bool(r.Intn(2) == 0)) - this.ForcePullImage = &v231 + v244 := bool(bool(r.Intn(2) == 0)) + this.ForcePullImage = &v244 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 7) @@ -19992,13 +22117,13 @@ func NewPopulatedContainerInfo_DockerInfo(r randyMesos, easy bool) *ContainerInf func NewPopulatedContainerInfo_DockerInfo_PortMapping(r randyMesos, easy bool) *ContainerInfo_DockerInfo_PortMapping { this := &ContainerInfo_DockerInfo_PortMapping{} - v232 := uint32(r.Uint32()) - this.HostPort = &v232 - v233 := uint32(r.Uint32()) - this.ContainerPort = &v233 + v245 := uint32(r.Uint32()) + this.HostPort = &v245 + v246 := uint32(r.Uint32()) + this.ContainerPort = &v246 if r.Intn(10) != 0 { - v234 := randStringMesos(r) - this.Protocol = &v234 + v247 := randStringMesos(r) + this.Protocol = &v247 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 4) @@ -20017,12 +22142,27 @@ func NewPopulatedContainerInfo_MesosInfo(r randyMesos, easy bool) *ContainerInfo return this } +func NewPopulatedContainerStatus(r randyMesos, easy bool) *ContainerStatus { + this := &ContainerStatus{} + if r.Intn(10) != 0 { + v248 := r.Intn(10) + this.NetworkInfos = make([]*NetworkInfo, v248) + for i := 0; i < v248; i++ { + this.NetworkInfos[i] = NewPopulatedNetworkInfo(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + func NewPopulatedLabels(r randyMesos, easy bool) *Labels { this := &Labels{} if r.Intn(10) != 0 { - v235 := r.Intn(10) - this.Labels = make([]*Label, v235) - for i := 0; i < v235; i++ { + v249 := r.Intn(10) + this.Labels = make([]*Label, v249) + for i := 0; i < v249; i++ { this.Labels[i] = NewPopulatedLabel(r, easy) } } @@ -20034,11 +22174,11 @@ func NewPopulatedLabels(r randyMesos, easy bool) *Labels { func NewPopulatedLabel(r randyMesos, easy bool) *Label { this := &Label{} - v236 := randStringMesos(r) - this.Key = &v236 + v250 := randStringMesos(r) + this.Key = &v250 if r.Intn(10) != 0 { - v237 := randStringMesos(r) - this.Value = &v237 + v251 := randStringMesos(r) + this.Value = &v251 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 3) @@ -20048,18 +22188,22 @@ func NewPopulatedLabel(r randyMesos, easy bool) *Label { func NewPopulatedPort(r randyMesos, easy bool) *Port { this := &Port{} - v238 := uint32(r.Uint32()) - this.Number = &v238 + v252 := uint32(r.Uint32()) + this.Number = &v252 + if r.Intn(10) != 0 { + v253 := randStringMesos(r) + this.Name = &v253 + } if r.Intn(10) != 0 { - v239 := randStringMesos(r) - this.Name = &v239 + v254 := randStringMesos(r) + this.Protocol = &v254 } if r.Intn(10) != 0 { - v240 := randStringMesos(r) - this.Protocol = &v240 + v255 := DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) + this.Visibility = &v255 } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + this.XXX_unrecognized = randUnrecognizedMesos(r, 5) } return this } @@ -20067,9 +22211,9 @@ func NewPopulatedPort(r randyMesos, easy bool) *Port { func NewPopulatedPorts(r randyMesos, easy bool) *Ports { this := &Ports{} if r.Intn(10) != 0 { - v241 := r.Intn(10) - this.Ports = make([]*Port, v241) - for i := 0; i < v241; i++ { + v256 := r.Intn(10) + this.Ports = make([]*Port, v256) + for i := 0; i < v256; i++ { this.Ports[i] = NewPopulatedPort(r, easy) } } @@ -20081,23 +22225,23 @@ func NewPopulatedPorts(r randyMesos, easy bool) *Ports { func NewPopulatedDiscoveryInfo(r randyMesos, easy bool) *DiscoveryInfo { this := &DiscoveryInfo{} - v242 := DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) - this.Visibility = &v242 + v257 := DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) + this.Visibility = &v257 if r.Intn(10) != 0 { - v243 := randStringMesos(r) - this.Name = &v243 + v258 := randStringMesos(r) + this.Name = &v258 } if r.Intn(10) != 0 { - v244 := randStringMesos(r) - this.Environment = &v244 + v259 := randStringMesos(r) + this.Environment = &v259 } if r.Intn(10) != 0 { - v245 := randStringMesos(r) - this.Location = &v245 + v260 := randStringMesos(r) + this.Location = &v260 } if r.Intn(10) != 0 { - v246 := randStringMesos(r) - this.Version = &v246 + v261 := randStringMesos(r) + this.Version = &v261 } if r.Intn(10) != 0 { this.Ports = NewPopulatedPorts(r, easy) @@ -20113,23 +22257,23 @@ func NewPopulatedDiscoveryInfo(r randyMesos, easy bool) *DiscoveryInfo { func NewPopulatedAppcImageManifest(r randyMesos, easy bool) *AppcImageManifest { this := &AppcImageManifest{} - v247 := randStringMesos(r) - this.AcKind = &v247 - v248 := randStringMesos(r) - this.AcVersion = &v248 - v249 := randStringMesos(r) - this.Name = &v249 - if r.Intn(10) != 0 { - v250 := r.Intn(10) - this.Labels = make([]*AppcImageManifest_Label, v250) - for i := 0; i < v250; i++ { + v262 := randStringMesos(r) + this.AcKind = &v262 + v263 := randStringMesos(r) + this.AcVersion = &v263 + v264 := randStringMesos(r) + this.Name = &v264 + if r.Intn(10) != 0 { + v265 := r.Intn(10) + this.Labels = make([]*AppcImageManifest_Label, v265) + for i := 0; i < v265; i++ { this.Labels[i] = NewPopulatedAppcImageManifest_Label(r, easy) } } if r.Intn(10) != 0 { - v251 := r.Intn(10) - this.Annotations = make([]*AppcImageManifest_Annotation, v251) - for i := 0; i < v251; i++ { + v266 := r.Intn(10) + this.Annotations = make([]*AppcImageManifest_Annotation, v266) + for i := 0; i < v266; i++ { this.Annotations[i] = NewPopulatedAppcImageManifest_Annotation(r, easy) } } @@ -20141,10 +22285,10 @@ func NewPopulatedAppcImageManifest(r randyMesos, easy bool) *AppcImageManifest { func NewPopulatedAppcImageManifest_Label(r randyMesos, easy bool) *AppcImageManifest_Label { this := &AppcImageManifest_Label{} - v252 := randStringMesos(r) - this.Name = &v252 - v253 := randStringMesos(r) - this.Value = &v253 + v267 := randStringMesos(r) + this.Name = &v267 + v268 := randStringMesos(r) + this.Value = &v268 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } @@ -20153,10 +22297,10 @@ func NewPopulatedAppcImageManifest_Label(r randyMesos, easy bool) *AppcImageMani func NewPopulatedAppcImageManifest_Annotation(r randyMesos, easy bool) *AppcImageManifest_Annotation { this := &AppcImageManifest_Annotation{} - v254 := randStringMesos(r) - this.Name = &v254 - v255 := randStringMesos(r) - this.Value = &v255 + v269 := randStringMesos(r) + this.Name = &v269 + v270 := randStringMesos(r) + this.Value = &v270 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } @@ -20182,9 +22326,9 @@ func randUTF8RuneMesos(r randyMesos) rune { return rune(ru + 61) } func randStringMesos(r randyMesos) string { - v256 := r.Intn(100) - tmps := make([]rune, v256) - for i := 0; i < v256; i++ { + v271 := r.Intn(100) + tmps := make([]rune, v271) + for i := 0; i < v271; i++ { tmps[i] = randUTF8RuneMesos(r) } return string(tmps) @@ -20206,11 +22350,11 @@ func randFieldMesos(data []byte, r randyMesos, fieldNumber int, wire int) []byte switch wire { case 0: data = encodeVarintPopulateMesos(data, uint64(key)) - v257 := r.Int63() + v272 := r.Int63() if r.Intn(2) == 0 { - v257 *= -1 + v272 *= -1 } - data = encodeVarintPopulateMesos(data, uint64(v257)) + data = encodeVarintPopulateMesos(data, uint64(v272)) case 1: data = encodeVarintPopulateMesos(data, uint64(key)) data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -20313,6 +22457,30 @@ func (m *ContainerID) Size() (n int) { return n } +func (m *TimeInfo) Size() (n int) { + var l int + _ = l + if m.Nanoseconds != nil { + n += 1 + sovMesos(uint64(*m.Nanoseconds)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DurationInfo) Size() (n int) { + var l int + _ = l + if m.Nanoseconds != nil { + n += 1 + sovMesos(uint64(*m.Nanoseconds)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *Address) Size() (n int) { var l int _ = l @@ -20364,6 +22532,60 @@ func (m *URL) Size() (n int) { return n } +func (m *Unavailability) Size() (n int) { + var l int + _ = l + if m.Start != nil { + l = m.Start.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MachineID) Size() (n int) { + var l int + _ = l + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Ip != nil { + l = len(*m.Ip) + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MachineInfo) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Mode != nil { + n += 1 + sovMesos(uint64(*m.Mode)) + } + if m.Unavailability != nil { + l = m.Unavailability.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *FrameworkInfo) Size() (n int) { var l int _ = l @@ -21120,6 +23342,10 @@ func (m *ResourceUsage_Executor) Size() (n int) { l = m.Statistics.Size() n += 1 + l + sovMesos(uint64(l)) } + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovMesos(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -21354,6 +23580,10 @@ func (m *Offer) Size() (n int) { l = m.Url.Size() n += 1 + l + sovMesos(uint64(l)) } + if m.Unavailability != nil { + l = m.Unavailability.Size() + n += 1 + l + sovMesos(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -21467,6 +23697,41 @@ func (m *Offer_Operation_Destroy) Size() (n int) { return n } +func (m *InverseOffer) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Url != nil { + l = m.Url.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.FrameworkId != nil { + l = m.FrameworkId.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.SlaveId != nil { + l = m.SlaveId.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Unavailability != nil { + l = m.Unavailability.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *TaskInfo) Size() (n int) { var l int _ = l @@ -21568,6 +23833,10 @@ func (m *TaskStatus) Size() (n int) { l = m.Labels.Size() n += 1 + l + sovMesos(uint64(l)) } + if m.ContainerStatus != nil { + l = m.ContainerStatus.Size() + n += 1 + l + sovMesos(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -21658,7 +23927,7 @@ func (m *Credential) Size() (n int) { n += 1 + l + sovMesos(uint64(l)) } if m.Secret != nil { - l = len(m.Secret) + l = len(*m.Secret) n += 1 + l + sovMesos(uint64(l)) } if m.XXX_unrecognized != nil { @@ -21742,7 +24011,7 @@ func (m *Image) Size() (n int) { return n } -func (m *Image_AppC) Size() (n int) { +func (m *Image_Appc) Size() (n int) { var l int _ = l if m.Name != nil { @@ -21800,6 +24069,54 @@ func (m *Volume) Size() (n int) { return n } +func (m *NetworkInfo) Size() (n int) { + var l int + _ = l + if m.Protocol != nil { + n += 1 + sovMesos(uint64(*m.Protocol)) + } + if m.IpAddress != nil { + l = len(*m.IpAddress) + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Groups) > 0 { + for _, s := range m.Groups { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Labels != nil { + l = m.Labels.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.IpAddresses) > 0 { + for _, e := range m.IpAddresses { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NetworkInfo_IPAddress) Size() (n int) { + var l int + _ = l + if m.Protocol != nil { + n += 1 + sovMesos(uint64(*m.Protocol)) + } + if m.IpAddress != nil { + l = len(*m.IpAddress) + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *ContainerInfo) Size() (n int) { var l int _ = l @@ -21824,6 +24141,12 @@ func (m *ContainerInfo) Size() (n int) { l = m.Mesos.Size() n += 1 + l + sovMesos(uint64(l)) } + if len(m.NetworkInfos) > 0 { + for _, e := range m.NetworkInfos { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -21896,6 +24219,21 @@ func (m *ContainerInfo_MesosInfo) Size() (n int) { return n } +func (m *ContainerStatus) Size() (n int) { + var l int + _ = l + if len(m.NetworkInfos) > 0 { + for _, e := range m.NetworkInfos { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *Labels) Size() (n int) { var l int _ = l @@ -21942,6 +24280,9 @@ func (m *Port) Size() (n int) { l = len(*m.Protocol) n += 1 + l + sovMesos(uint64(l)) } + if m.Visibility != nil { + n += 1 + sovMesos(uint64(*m.Visibility)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -22145,6 +24486,28 @@ func (this *ContainerID) String() string { }, "") return s } +func (this *TimeInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TimeInfo{`, + `Nanoseconds:` + valueToStringMesos(this.Nanoseconds) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DurationInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DurationInfo{`, + `Nanoseconds:` + valueToStringMesos(this.Nanoseconds) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} func (this *Address) String() string { if this == nil { return "nil" @@ -22173,6 +24536,43 @@ func (this *URL) String() string { }, "") return s } +func (this *Unavailability) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unavailability{`, + `Start:` + strings.Replace(fmt.Sprintf("%v", this.Start), "TimeInfo", "TimeInfo", 1) + `,`, + `Duration:` + strings.Replace(fmt.Sprintf("%v", this.Duration), "DurationInfo", "DurationInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MachineID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MachineID{`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `Ip:` + valueToStringMesos(this.Ip) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MachineInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MachineInfo{`, + `Id:` + strings.Replace(fmt.Sprintf("%v", this.Id), "MachineID", "MachineID", 1) + `,`, + `Mode:` + valueToStringMesos(this.Mode) + `,`, + `Unavailability:` + strings.Replace(fmt.Sprintf("%v", this.Unavailability), "Unavailability", "Unavailability", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} func (this *FrameworkInfo) String() string { if this == nil { return "nil" @@ -22571,6 +24971,7 @@ func (this *ResourceUsage_Executor) String() string { `ExecutorInfo:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorInfo), "ExecutorInfo", "ExecutorInfo", 1) + `,`, `Allocated:` + strings.Replace(fmt.Sprintf("%v", this.Allocated), "Resource", "Resource", 1) + `,`, `Statistics:` + strings.Replace(fmt.Sprintf("%v", this.Statistics), "ResourceStatistics", "ResourceStatistics", 1) + `,`, + `ContainerId:` + strings.Replace(fmt.Sprintf("%v", this.ContainerId), "ContainerID", "ContainerID", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -22664,6 +25065,7 @@ func (this *Offer) String() string { `ExecutorIds:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorIds), "ExecutorID", "ExecutorID", 1) + `,`, `Attributes:` + strings.Replace(fmt.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1) + `,`, `Url:` + strings.Replace(fmt.Sprintf("%v", this.Url), "URL", "URL", 1) + `,`, + `Unavailability:` + strings.Replace(fmt.Sprintf("%v", this.Unavailability), "Unavailability", "Unavailability", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -22740,6 +25142,22 @@ func (this *Offer_Operation_Destroy) String() string { }, "") return s } +func (this *InverseOffer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&InverseOffer{`, + `Id:` + strings.Replace(fmt.Sprintf("%v", this.Id), "OfferID", "OfferID", 1) + `,`, + `Url:` + strings.Replace(fmt.Sprintf("%v", this.Url), "URL", "URL", 1) + `,`, + `FrameworkId:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, + `Unavailability:` + strings.Replace(fmt.Sprintf("%v", this.Unavailability), "Unavailability", "Unavailability", 1) + `,`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} func (this *TaskInfo) String() string { if this == nil { return "nil" @@ -22778,6 +25196,7 @@ func (this *TaskStatus) String() string { `Reason:` + valueToStringMesos(this.Reason) + `,`, `Uuid:` + valueToStringMesos(this.Uuid) + `,`, `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `ContainerStatus:` + strings.Replace(fmt.Sprintf("%v", this.ContainerStatus), "ContainerStatus", "ContainerStatus", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -22895,18 +25314,18 @@ func (this *Image) String() string { } s := strings.Join([]string{`&Image{`, `Type:` + valueToStringMesos(this.Type) + `,`, - `Appc:` + strings.Replace(fmt.Sprintf("%v", this.Appc), "Image_AppC", "Image_AppC", 1) + `,`, + `Appc:` + strings.Replace(fmt.Sprintf("%v", this.Appc), "Image_Appc", "Image_Appc", 1) + `,`, `Docker:` + strings.Replace(fmt.Sprintf("%v", this.Docker), "Image_Docker", "Image_Docker", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s } -func (this *Image_AppC) String() string { +func (this *Image_Appc) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Image_AppC{`, + s := strings.Join([]string{`&Image_Appc{`, `Name:` + valueToStringMesos(this.Name) + `,`, `Id:` + valueToStringMesos(this.Id) + `,`, `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, @@ -22940,6 +25359,33 @@ func (this *Volume) String() string { }, "") return s } +func (this *NetworkInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NetworkInfo{`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `IpAddress:` + valueToStringMesos(this.IpAddress) + `,`, + `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `IpAddresses:` + strings.Replace(fmt.Sprintf("%v", this.IpAddresses), "NetworkInfo_IPAddress", "NetworkInfo_IPAddress", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NetworkInfo_IPAddress) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NetworkInfo_IPAddress{`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `IpAddress:` + valueToStringMesos(this.IpAddress) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} func (this *ContainerInfo) String() string { if this == nil { return "nil" @@ -22950,6 +25396,7 @@ func (this *ContainerInfo) String() string { `Docker:` + strings.Replace(fmt.Sprintf("%v", this.Docker), "ContainerInfo_DockerInfo", "ContainerInfo_DockerInfo", 1) + `,`, `Hostname:` + valueToStringMesos(this.Hostname) + `,`, `Mesos:` + strings.Replace(fmt.Sprintf("%v", this.Mesos), "ContainerInfo_MesosInfo", "ContainerInfo_MesosInfo", 1) + `,`, + `NetworkInfos:` + strings.Replace(fmt.Sprintf("%v", this.NetworkInfos), "NetworkInfo", "NetworkInfo", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -22995,6 +25442,17 @@ func (this *ContainerInfo_MesosInfo) String() string { }, "") return s } +func (this *ContainerStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStatus{`, + `NetworkInfos:` + strings.Replace(fmt.Sprintf("%v", this.NetworkInfos), "NetworkInfo", "NetworkInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} func (this *Labels) String() string { if this == nil { return "nil" @@ -23026,6 +25484,7 @@ func (this *Port) String() string { `Number:` + valueToStringMesos(this.Number) + `,`, `Name:` + valueToStringMesos(this.Name) + `,`, `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `Visibility:` + valueToStringMesos(this.Visibility) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -23111,8 +25570,12 @@ func (m *FrameworkID) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23125,6 +25588,12 @@ func (m *FrameworkID) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FrameworkID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FrameworkID: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -23132,6 +25601,9 @@ func (m *FrameworkID) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23155,15 +25627,7 @@ func (m *FrameworkID) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -23182,6 +25646,9 @@ func (m *FrameworkID) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *OfferID) Unmarshal(data []byte) error { @@ -23189,8 +25656,12 @@ func (m *OfferID) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23203,6 +25674,12 @@ func (m *OfferID) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OfferID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OfferID: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -23210,6 +25687,9 @@ func (m *OfferID) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23233,15 +25713,7 @@ func (m *OfferID) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -23260,6 +25732,9 @@ func (m *OfferID) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *SlaveID) Unmarshal(data []byte) error { @@ -23267,8 +25742,12 @@ func (m *SlaveID) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23281,6 +25760,12 @@ func (m *SlaveID) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SlaveID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SlaveID: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -23288,6 +25773,9 @@ func (m *SlaveID) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23311,15 +25799,7 @@ func (m *SlaveID) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -23338,6 +25818,9 @@ func (m *SlaveID) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *TaskID) Unmarshal(data []byte) error { @@ -23345,8 +25828,12 @@ func (m *TaskID) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23359,6 +25846,12 @@ func (m *TaskID) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskID: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -23366,6 +25859,9 @@ func (m *TaskID) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23389,15 +25885,7 @@ func (m *TaskID) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -23416,6 +25904,9 @@ func (m *TaskID) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ExecutorID) Unmarshal(data []byte) error { @@ -23423,8 +25914,12 @@ func (m *ExecutorID) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23437,6 +25932,12 @@ func (m *ExecutorID) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutorID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutorID: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -23444,6 +25945,9 @@ func (m *ExecutorID) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23467,15 +25971,7 @@ func (m *ExecutorID) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -23494,6 +25990,9 @@ func (m *ExecutorID) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ContainerID) Unmarshal(data []byte) error { @@ -23501,8 +26000,12 @@ func (m *ContainerID) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23515,6 +26018,12 @@ func (m *ContainerID) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerID: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -23522,6 +26031,9 @@ func (m *ContainerID) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23545,15 +26057,83 @@ func (m *ContainerID) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TimeInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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: TimeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanoseconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + m.Nanoseconds = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -23569,9 +26149,88 @@ func (m *ContainerID) Unmarshal(data []byte) error { } } if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("nanoseconds") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DurationInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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: DurationInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DurationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanoseconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Nanoseconds = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("nanoseconds") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Address) Unmarshal(data []byte) error { @@ -23579,8 +26238,12 @@ func (m *Address) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23593,6 +26256,12 @@ func (m *Address) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Address: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Address: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -23600,6 +26269,9 @@ func (m *Address) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23627,6 +26299,9 @@ func (m *Address) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23654,6 +26329,9 @@ func (m *Address) Unmarshal(data []byte) error { } var v int32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23667,15 +26345,7 @@ func (m *Address) Unmarshal(data []byte) error { m.Port = &v hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -23694,6 +26364,9 @@ func (m *Address) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *URL) Unmarshal(data []byte) error { @@ -23701,8 +26374,12 @@ func (m *URL) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23715,6 +26392,12 @@ func (m *URL) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: URL: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: URL: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -23722,6 +26405,9 @@ func (m *URL) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23750,6 +26436,9 @@ func (m *URL) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23781,6 +26470,9 @@ func (m *URL) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23808,6 +26500,9 @@ func (m *URL) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23836,6 +26531,9 @@ func (m *URL) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23858,15 +26556,7 @@ func (m *URL) Unmarshal(data []byte) error { m.Fragment = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -23888,15 +26578,22 @@ func (m *URL) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("address") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } -func (m *FrameworkInfo) Unmarshal(data []byte) error { +func (m *Unavailability) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { + preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23909,69 +26606,56 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Unavailability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unavailability: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthMesos } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - s := string(data[iNdEx:postIndex]) - m.User = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - 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 ErrInvalidLengthMesos + if m.Start == nil { + m.Start = &TimeInfo{} } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Start.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err } - s := string(data[iNdEx:postIndex]) - m.Name = &s iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - case 3: + hasFields[0] |= uint64(0x00000001) + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -23989,83 +26673,495 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Id == nil { - m.Id = &FrameworkID{} + if m.Duration == nil { + m.Duration = &DurationInfo{} } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + if err := m.Duration.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FailoverTimeout", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FailoverTimeout = &v2 - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err } - b := bool(v != 0) - m.Checkpoint = &b - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + if skippy < 0 { + return ErrInvalidLengthMesos } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMesos + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("start") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MachineID) 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 ErrIntOverflowMesos } - postIndex := iNdEx + intStringLen - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - s := string(data[iNdEx:postIndex]) - m.Role = &s - iNdEx = postIndex - case 7: + 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: MachineID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MachineID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Ip = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MachineInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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: MachineInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MachineInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Id == nil { + m.Id = &MachineID{} + } + if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var v MachineInfo_Mode + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (MachineInfo_Mode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Mode = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unavailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Unavailability == nil { + m.Unavailability = &Unavailability{} + } + if err := m.Unavailability.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FrameworkInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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: FrameworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FrameworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.User = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Id == nil { + m.Id = &FrameworkID{} + } + if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FailoverTimeout", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.FailoverTimeout = &v2 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Checkpoint = &b + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24093,6 +27189,9 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24120,6 +27219,9 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24147,6 +27249,9 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24175,6 +27280,9 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24200,15 +27308,7 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -24230,6 +27330,9 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *FrameworkInfo_Capability) Unmarshal(data []byte) error { @@ -24237,8 +27340,12 @@ func (m *FrameworkInfo_Capability) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24251,6 +27358,12 @@ func (m *FrameworkInfo_Capability) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Capability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -24258,6 +27371,9 @@ func (m *FrameworkInfo_Capability) Unmarshal(data []byte) error { } var v FrameworkInfo_Capability_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24271,15 +27387,7 @@ func (m *FrameworkInfo_Capability) Unmarshal(data []byte) error { m.Type = &v hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -24298,14 +27406,21 @@ func (m *FrameworkInfo_Capability) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *HealthCheck) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24318,6 +27433,12 @@ func (m *HealthCheck) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HealthCheck: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HealthCheck: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -24325,6 +27446,9 @@ func (m *HealthCheck) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24412,6 +27536,9 @@ func (m *HealthCheck) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24448,6 +27575,9 @@ func (m *HealthCheck) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24473,15 +27603,7 @@ func (m *HealthCheck) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -24497,6 +27619,9 @@ func (m *HealthCheck) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { @@ -24504,8 +27629,12 @@ func (m *HealthCheck_HTTP) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24518,6 +27647,12 @@ func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HTTP: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTP: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -24525,6 +27660,9 @@ func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24543,6 +27681,9 @@ func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24570,6 +27711,9 @@ func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24582,15 +27726,7 @@ func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { } m.Statuses = append(m.Statuses, v) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -24609,14 +27745,21 @@ func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *CommandInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24629,6 +27772,12 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommandInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommandInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -24636,6 +27785,9 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24664,6 +27816,9 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24694,6 +27849,9 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24721,6 +27879,9 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24751,6 +27912,9 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24778,6 +27942,9 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24796,6 +27963,9 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24817,15 +27987,7 @@ func (m *CommandInfo) Unmarshal(data []byte) error { m.Arguments = append(m.Arguments, string(data[iNdEx:postIndex])) iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -24841,6 +28003,9 @@ func (m *CommandInfo) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *CommandInfo_URI) Unmarshal(data []byte) error { @@ -24848,8 +28013,12 @@ func (m *CommandInfo_URI) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24862,6 +28031,12 @@ func (m *CommandInfo_URI) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: URI: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: URI: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -24869,6 +28044,9 @@ func (m *CommandInfo_URI) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24897,6 +28075,9 @@ func (m *CommandInfo_URI) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24915,6 +28096,9 @@ func (m *CommandInfo_URI) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24933,6 +28117,9 @@ func (m *CommandInfo_URI) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24946,15 +28133,7 @@ func (m *CommandInfo_URI) Unmarshal(data []byte) error { b := bool(v != 0) m.Cache = &b default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -24973,6 +28152,9 @@ func (m *CommandInfo_URI) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *CommandInfo_ContainerInfo) Unmarshal(data []byte) error { @@ -24980,8 +28162,12 @@ func (m *CommandInfo_ContainerInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24994,6 +28180,12 @@ func (m *CommandInfo_ContainerInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -25001,6 +28193,9 @@ func (m *CommandInfo_ContainerInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25029,6 +28224,9 @@ func (m *CommandInfo_ContainerInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25050,15 +28248,7 @@ func (m *CommandInfo_ContainerInfo) Unmarshal(data []byte) error { m.Options = append(m.Options, string(data[iNdEx:postIndex])) iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -25077,6 +28267,9 @@ func (m *CommandInfo_ContainerInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("image") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ExecutorInfo) Unmarshal(data []byte) error { @@ -25084,8 +28277,12 @@ func (m *ExecutorInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25098,6 +28295,12 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutorInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutorInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -25105,6 +28308,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25136,6 +28342,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25161,6 +28370,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25189,6 +28401,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25220,6 +28435,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25250,6 +28468,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25277,6 +28498,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25304,6 +28528,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25334,6 +28561,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25359,15 +28589,7 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -25389,6 +28611,9 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("command") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *MasterInfo) Unmarshal(data []byte) error { @@ -25396,8 +28621,12 @@ func (m *MasterInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25410,6 +28639,12 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MasterInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MasterInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -25417,6 +28652,9 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25445,6 +28683,9 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25463,6 +28704,9 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25481,6 +28725,9 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25508,6 +28755,9 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25535,6 +28785,9 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25562,6 +28815,9 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25587,15 +28843,7 @@ func (m *MasterInfo) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -25620,6 +28868,9 @@ func (m *MasterInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *SlaveInfo) Unmarshal(data []byte) error { @@ -25627,8 +28878,12 @@ func (m *SlaveInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25641,6 +28896,12 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SlaveInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SlaveInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -25648,6 +28909,9 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25676,6 +28940,9 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25704,6 +28971,9 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25732,6 +29002,9 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25762,6 +29035,9 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25780,6 +29056,9 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { } var v int32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25792,15 +29071,7 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { } m.Port = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -25819,6 +29090,9 @@ func (m *SlaveInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Value) Unmarshal(data []byte) error { @@ -25826,8 +29100,12 @@ func (m *Value) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25840,6 +29118,12 @@ func (m *Value) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -25847,6 +29131,9 @@ func (m *Value) Unmarshal(data []byte) error { } var v Value_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25865,6 +29152,9 @@ func (m *Value) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25895,6 +29185,9 @@ func (m *Value) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25925,6 +29218,9 @@ func (m *Value) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25955,6 +29251,9 @@ func (m *Value) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -25980,15 +29279,7 @@ func (m *Value) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26007,6 +29298,9 @@ func (m *Value) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Value_Scalar) Unmarshal(data []byte) error { @@ -26014,8 +29308,12 @@ func (m *Value_Scalar) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26028,6 +29326,12 @@ func (m *Value_Scalar) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Scalar: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Scalar: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 1 { @@ -26050,15 +29354,7 @@ func (m *Value_Scalar) Unmarshal(data []byte) error { m.Value = &v2 hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26077,6 +29373,9 @@ func (m *Value_Scalar) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Value_Range) Unmarshal(data []byte) error { @@ -26084,8 +29383,12 @@ func (m *Value_Range) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26098,6 +29401,12 @@ func (m *Value_Range) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Range: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Range: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -26105,6 +29414,9 @@ func (m *Value_Range) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26123,6 +29435,9 @@ func (m *Value_Range) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26136,15 +29451,7 @@ func (m *Value_Range) Unmarshal(data []byte) error { m.End = &v hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26166,14 +29473,21 @@ func (m *Value_Range) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("end") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Value_Ranges) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26186,6 +29500,12 @@ func (m *Value_Ranges) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ranges: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ranges: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -26193,6 +29513,9 @@ func (m *Value_Ranges) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26216,15 +29539,7 @@ func (m *Value_Ranges) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26240,14 +29555,21 @@ func (m *Value_Ranges) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Value_Set) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26260,6 +29582,12 @@ func (m *Value_Set) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Set: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Set: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -26267,6 +29595,9 @@ func (m *Value_Set) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26288,15 +29619,7 @@ func (m *Value_Set) Unmarshal(data []byte) error { m.Item = append(m.Item, string(data[iNdEx:postIndex])) iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26312,6 +29635,9 @@ func (m *Value_Set) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Value_Text) Unmarshal(data []byte) error { @@ -26319,8 +29645,12 @@ func (m *Value_Text) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26333,6 +29663,12 @@ func (m *Value_Text) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Text: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Text: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -26340,6 +29676,9 @@ func (m *Value_Text) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26363,15 +29702,7 @@ func (m *Value_Text) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26390,6 +29721,9 @@ func (m *Value_Text) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Attribute) Unmarshal(data []byte) error { @@ -26397,8 +29731,12 @@ func (m *Attribute) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26411,6 +29749,12 @@ func (m *Attribute) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Attribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -26418,6 +29762,9 @@ func (m *Attribute) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26446,6 +29793,9 @@ func (m *Attribute) Unmarshal(data []byte) error { } var v Value_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26464,6 +29814,9 @@ func (m *Attribute) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26494,6 +29847,9 @@ func (m *Attribute) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26524,6 +29880,9 @@ func (m *Attribute) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26554,6 +29913,9 @@ func (m *Attribute) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26579,15 +29941,7 @@ func (m *Attribute) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26609,6 +29963,9 @@ func (m *Attribute) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Resource) Unmarshal(data []byte) error { @@ -26616,8 +29973,12 @@ func (m *Resource) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26630,6 +29991,12 @@ func (m *Resource) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -26637,6 +30004,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26665,6 +30035,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var v Value_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26683,6 +30056,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26713,6 +30089,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26743,6 +30122,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26773,6 +30155,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26800,6 +30185,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26830,6 +30218,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26860,6 +30251,9 @@ func (m *Resource) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26885,15 +30279,7 @@ func (m *Resource) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26915,6 +30301,9 @@ func (m *Resource) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Resource_ReservationInfo) Unmarshal(data []byte) error { @@ -26922,8 +30311,12 @@ func (m *Resource_ReservationInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26936,6 +30329,12 @@ func (m *Resource_ReservationInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReservationInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReservationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -26943,6 +30342,9 @@ func (m *Resource_ReservationInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -26966,15 +30368,7 @@ func (m *Resource_ReservationInfo) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -26993,14 +30387,21 @@ func (m *Resource_ReservationInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Resource_DiskInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27013,6 +30414,12 @@ func (m *Resource_DiskInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiskInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiskInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -27020,6 +30427,9 @@ func (m *Resource_DiskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27050,6 +30460,9 @@ func (m *Resource_DiskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27075,15 +30488,7 @@ func (m *Resource_DiskInfo) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -27099,6 +30504,9 @@ func (m *Resource_DiskInfo) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Resource_DiskInfo_Persistence) Unmarshal(data []byte) error { @@ -27106,85 +30514,12 @@ func (m *Resource_DiskInfo_Persistence) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { + preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { - 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) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - 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 ErrInvalidLengthMesos - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Id = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } + if shift >= 64 { + return ErrIntOverflowMesos } - iNdEx -= sizeOfWire - skippy, err := skipMesos(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMesos - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") - } - - return nil -} -func (m *Resource_RevocableInfo) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27196,53 +30531,13 @@ func (m *Resource_RevocableInfo) Unmarshal(data []byte) error { } } fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipMesos(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMesos - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Persistence: wiretype end group for non-group") } - } - - return nil -} -func (m *TrafficControlStatistics) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if fieldNum <= 0 { + return fmt.Errorf("proto: Persistence: illegal tag %d (wire type %d)", fieldNum, wire) } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) switch fieldNum { case 1: if wireType != 2 { @@ -27250,6 +30545,146 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Id = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_RevocableInfo) 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 ErrIntOverflowMesos + } + 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: RevocableInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RevocableInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrafficControlStatistics) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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: TrafficControlStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrafficControlStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27278,6 +30713,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27295,6 +30733,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27312,6 +30753,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27329,6 +30773,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27346,6 +30793,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27363,6 +30813,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27380,6 +30833,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27397,6 +30853,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27414,6 +30873,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27426,15 +30888,7 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } m.Requeues = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -27453,6 +30907,9 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ResourceStatistics) Unmarshal(data []byte) error { @@ -27460,8 +30917,12 @@ func (m *ResourceStatistics) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27474,6 +30935,12 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 1 { @@ -27558,6 +31025,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27575,6 +31045,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27592,6 +31065,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27609,6 +31085,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27645,6 +31124,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27662,6 +31144,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27679,6 +31164,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27696,6 +31184,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27726,6 +31217,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27743,6 +31237,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27760,6 +31257,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27777,6 +31277,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27794,6 +31297,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27811,6 +31317,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27828,6 +31337,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27845,6 +31357,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27938,6 +31453,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27955,6 +31473,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28010,6 +31531,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28027,6 +31551,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28044,6 +31571,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28061,6 +31591,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28078,6 +31611,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28095,6 +31631,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28123,6 +31662,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28140,6 +31682,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28157,6 +31702,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28174,6 +31722,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28191,6 +31742,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28208,6 +31762,9 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28220,15 +31777,7 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { } m.MemUnevictableBytes = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -28247,14 +31796,21 @@ func (m *ResourceStatistics) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ResourceUsage) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28267,6 +31823,12 @@ func (m *ResourceUsage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceUsage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceUsage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -28274,6 +31836,9 @@ func (m *ResourceUsage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28302,6 +31867,9 @@ func (m *ResourceUsage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28325,15 +31893,7 @@ func (m *ResourceUsage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -28349,6 +31909,9 @@ func (m *ResourceUsage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ResourceUsage_Executor) Unmarshal(data []byte) error { @@ -28356,8 +31919,12 @@ func (m *ResourceUsage_Executor) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28370,6 +31937,12 @@ func (m *ResourceUsage_Executor) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Executor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Executor: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -28377,6 +31950,9 @@ func (m *ResourceUsage_Executor) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28408,6 +31984,9 @@ func (m *ResourceUsage_Executor) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28436,6 +32015,9 @@ func (m *ResourceUsage_Executor) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28460,16 +32042,42 @@ func (m *ResourceUsage_Executor) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &ContainerID{} + } + if err := m.ContainerId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -28487,7 +32095,13 @@ func (m *ResourceUsage_Executor) Unmarshal(data []byte) error { if hasFields[0]&uint64(0x00000001) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_info") } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *PerfStatistics) Unmarshal(data []byte) error { @@ -28495,8 +32109,12 @@ func (m *PerfStatistics) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28509,6 +32127,12 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PerfStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PerfStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 1 { @@ -28556,6 +32180,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28573,6 +32200,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28590,6 +32220,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28607,6 +32240,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28624,6 +32260,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28641,6 +32280,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28658,6 +32300,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28675,6 +32320,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28692,6 +32340,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28709,6 +32360,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28764,6 +32418,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28781,6 +32438,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28798,6 +32458,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28815,6 +32478,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28832,6 +32498,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28849,6 +32518,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28866,6 +32538,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28883,6 +32558,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28900,6 +32578,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28917,6 +32598,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28934,6 +32618,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28951,6 +32638,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28968,6 +32658,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -28985,6 +32678,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29002,6 +32698,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29019,6 +32718,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29036,6 +32738,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29053,6 +32758,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29070,6 +32778,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29087,6 +32798,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29104,6 +32818,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29121,6 +32838,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29138,6 +32858,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29155,6 +32878,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29172,6 +32898,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29189,6 +32918,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29206,6 +32938,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29223,6 +32958,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29240,6 +32978,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29257,6 +32998,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29274,6 +33018,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29291,6 +33038,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29308,6 +33058,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29325,6 +33078,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29342,6 +33098,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29359,6 +33118,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29376,6 +33138,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29393,6 +33158,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29410,6 +33178,9 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29422,15 +33193,7 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { } m.NodePrefetchMisses = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -29452,14 +33215,21 @@ func (m *PerfStatistics) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("duration") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Request) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29472,6 +33242,12 @@ func (m *Request) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -29479,6 +33255,9 @@ func (m *Request) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29509,6 +33288,9 @@ func (m *Request) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29532,15 +33314,7 @@ func (m *Request) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -29556,6 +33330,9 @@ func (m *Request) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Offer) Unmarshal(data []byte) error { @@ -29563,8 +33340,12 @@ func (m *Offer) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29577,6 +33358,12 @@ func (m *Offer) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Offer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Offer: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -29584,6 +33371,9 @@ func (m *Offer) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29615,6 +33405,9 @@ func (m *Offer) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29646,6 +33439,9 @@ func (m *Offer) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29677,6 +33473,9 @@ func (m *Offer) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29705,6 +33504,9 @@ func (m *Offer) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29733,6 +33535,9 @@ func (m *Offer) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29761,6 +33566,9 @@ func (m *Offer) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29789,6 +33597,9 @@ func (m *Offer) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29813,16 +33624,41 @@ func (m *Offer) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unavailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Unavailability == nil { + m.Unavailability = &Unavailability{} + } + if err := m.Unavailability.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -29850,6 +33686,9 @@ func (m *Offer) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Offer_Operation) Unmarshal(data []byte) error { @@ -29857,8 +33696,12 @@ func (m *Offer_Operation) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29871,6 +33714,12 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Operation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -29878,6 +33727,9 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { } var v Offer_Operation_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29896,6 +33748,9 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29926,6 +33781,9 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29956,6 +33814,9 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -29986,6 +33847,9 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30016,6 +33880,9 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30041,15 +33908,7 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -30068,14 +33927,21 @@ func (m *Offer_Operation) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Offer_Operation_Launch) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30088,6 +33954,12 @@ func (m *Offer_Operation_Launch) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Launch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Launch: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -30095,6 +33967,9 @@ func (m *Offer_Operation_Launch) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30118,15 +33993,7 @@ func (m *Offer_Operation_Launch) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -30142,14 +34009,21 @@ func (m *Offer_Operation_Launch) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Offer_Operation_Reserve) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30162,6 +34036,12 @@ func (m *Offer_Operation_Reserve) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Reserve: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Reserve: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -30169,6 +34049,9 @@ func (m *Offer_Operation_Reserve) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30192,15 +34075,7 @@ func (m *Offer_Operation_Reserve) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -30216,14 +34091,21 @@ func (m *Offer_Operation_Reserve) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Offer_Operation_Unreserve) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30236,6 +34118,12 @@ func (m *Offer_Operation_Unreserve) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Unreserve: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unreserve: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -30243,6 +34131,9 @@ func (m *Offer_Operation_Unreserve) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30266,15 +34157,7 @@ func (m *Offer_Operation_Unreserve) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -30290,14 +34173,21 @@ func (m *Offer_Operation_Unreserve) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Offer_Operation_Create) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30310,6 +34200,12 @@ func (m *Offer_Operation_Create) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Create: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Create: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -30317,6 +34213,9 @@ func (m *Offer_Operation_Create) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30340,15 +34239,7 @@ func (m *Offer_Operation_Create) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -30364,14 +34255,21 @@ func (m *Offer_Operation_Create) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Offer_Operation_Destroy) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30384,6 +34282,12 @@ func (m *Offer_Operation_Destroy) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Destroy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Destroy: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -30391,6 +34295,9 @@ func (m *Offer_Operation_Destroy) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30414,15 +34321,258 @@ func (m *Offer_Operation_Destroy) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InverseOffer) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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: InverseOffer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InverseOffer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Id == nil { + m.Id = &OfferID{} + } + if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Url == nil { + m.Url = &URL{} + } + if err := m.Url.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrameworkId == nil { + m.FrameworkId = &FrameworkID{} + } + if err := m.FrameworkId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SlaveId == nil { + m.SlaveId = &SlaveID{} + } + if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unavailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Unavailability == nil { + m.Unavailability = &Unavailability{} + } + if err := m.Unavailability.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, &Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -30437,7 +34587,19 @@ func (m *Offer_Operation_Destroy) Unmarshal(data []byte) error { iNdEx += skippy } } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("unavailability") + } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *TaskInfo) Unmarshal(data []byte) error { @@ -30445,8 +34607,12 @@ func (m *TaskInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30459,6 +34625,12 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -30466,6 +34638,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30494,6 +34669,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30525,6 +34703,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30556,6 +34737,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30584,6 +34768,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30614,6 +34801,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30639,6 +34829,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30669,6 +34862,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30699,6 +34895,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30729,6 +34928,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30759,6 +34961,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30784,15 +34989,7 @@ func (m *TaskInfo) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -30817,6 +35014,9 @@ func (m *TaskInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *TaskStatus) Unmarshal(data []byte) error { @@ -30824,8 +35024,12 @@ func (m *TaskStatus) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30838,6 +35042,12 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -30845,6 +35055,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30876,6 +35089,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var v TaskState for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30894,6 +35110,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30919,6 +35138,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30946,6 +35168,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -30995,6 +35220,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31025,6 +35253,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31043,6 +35274,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var v TaskStatus_Source for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31060,6 +35294,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var v TaskStatus_Reason for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31077,6 +35314,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31102,6 +35342,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31126,16 +35369,41 @@ func (m *TaskStatus) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerStatus == nil { + m.ContainerStatus = &ContainerStatus{} + } + if err := m.ContainerStatus.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31157,14 +35425,21 @@ func (m *TaskStatus) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Filters) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31177,6 +35452,12 @@ func (m *Filters) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Filters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 1 { @@ -31198,15 +35479,7 @@ func (m *Filters) Unmarshal(data []byte) error { v2 := float64(math.Float64frombits(v)) m.RefuseSeconds = &v2 default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31222,14 +35495,21 @@ func (m *Filters) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Environment) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31242,6 +35522,12 @@ func (m *Environment) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Environment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Environment: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -31249,6 +35535,9 @@ func (m *Environment) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31272,15 +35561,7 @@ func (m *Environment) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31296,6 +35577,9 @@ func (m *Environment) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Environment_Variable) Unmarshal(data []byte) error { @@ -31303,8 +35587,12 @@ func (m *Environment_Variable) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31317,6 +35605,12 @@ func (m *Environment_Variable) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Variable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Variable: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -31324,6 +35618,9 @@ func (m *Environment_Variable) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31352,6 +35649,9 @@ func (m *Environment_Variable) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31375,15 +35675,7 @@ func (m *Environment_Variable) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31405,6 +35697,9 @@ func (m *Environment_Variable) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Parameter) Unmarshal(data []byte) error { @@ -31412,8 +35707,12 @@ func (m *Parameter) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31426,6 +35725,12 @@ func (m *Parameter) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Parameter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -31433,6 +35738,9 @@ func (m *Parameter) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31461,6 +35769,9 @@ func (m *Parameter) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31484,15 +35795,7 @@ func (m *Parameter) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31514,14 +35817,21 @@ func (m *Parameter) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Parameters) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31534,6 +35844,12 @@ func (m *Parameters) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Parameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Parameters: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -31541,6 +35857,9 @@ func (m *Parameters) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31564,15 +35883,7 @@ func (m *Parameters) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31588,6 +35899,9 @@ func (m *Parameters) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Credential) Unmarshal(data []byte) error { @@ -31595,8 +35909,12 @@ func (m *Credential) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31609,6 +35927,12 @@ func (m *Credential) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Credential: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -31616,6 +35940,9 @@ func (m *Credential) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31642,37 +35969,34 @@ func (m *Credential) Unmarshal(data []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthMesos } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Secret = append([]byte{}, data[iNdEx:postIndex]...) + s := string(data[iNdEx:postIndex]) + m.Secret = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31691,14 +36015,21 @@ func (m *Credential) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Credentials) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31711,6 +36042,12 @@ func (m *Credentials) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Credentials: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Credentials: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -31718,6 +36055,9 @@ func (m *Credentials) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31741,15 +36081,7 @@ func (m *Credentials) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31765,6 +36097,9 @@ func (m *Credentials) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RateLimit) Unmarshal(data []byte) error { @@ -31772,8 +36107,12 @@ func (m *RateLimit) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31786,6 +36125,12 @@ func (m *RateLimit) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RateLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RateLimit: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 1 { @@ -31812,6 +36157,9 @@ func (m *RateLimit) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31840,6 +36188,9 @@ func (m *RateLimit) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31852,15 +36203,7 @@ func (m *RateLimit) Unmarshal(data []byte) error { } m.Capacity = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31879,14 +36222,21 @@ func (m *RateLimit) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RateLimits) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31899,6 +36249,12 @@ func (m *RateLimits) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RateLimits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RateLimits: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -31906,6 +36262,9 @@ func (m *RateLimits) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31953,6 +36312,9 @@ func (m *RateLimits) Unmarshal(data []byte) error { } var v uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -31965,15 +36327,7 @@ func (m *RateLimits) Unmarshal(data []byte) error { } m.AggregateDefaultCapacity = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -31989,6 +36343,9 @@ func (m *RateLimits) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Image) Unmarshal(data []byte) error { @@ -31996,8 +36353,12 @@ func (m *Image) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32010,6 +36371,12 @@ func (m *Image) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Image: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -32017,6 +36384,9 @@ func (m *Image) Unmarshal(data []byte) error { } var v Image_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32035,6 +36405,9 @@ func (m *Image) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32053,7 +36426,7 @@ func (m *Image) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Appc == nil { - m.Appc = &Image_AppC{} + m.Appc = &Image_Appc{} } if err := m.Appc.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -32065,6 +36438,9 @@ func (m *Image) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32090,15 +36466,7 @@ func (m *Image) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -32117,15 +36485,22 @@ func (m *Image) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } -func (m *Image_AppC) Unmarshal(data []byte) error { +func (m *Image_Appc) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { + preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32138,6 +36513,12 @@ func (m *Image_AppC) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Appc: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Appc: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -32145,6 +36526,9 @@ func (m *Image_AppC) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32173,6 +36557,9 @@ func (m *Image_AppC) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32200,6 +36587,434 @@ func (m *Image_AppC) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Image_Docker) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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: Docker: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Docker: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Volume) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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: Volume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Volume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.ContainerPath = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.HostPath = &s + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var v Volume_Mode + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Volume_Mode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Mode = &v + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &Image{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_path") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("mode") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkInfo) 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 ErrIntOverflowMesos + } + 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: NetworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var v NetworkInfo_Protocol + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NetworkInfo_Protocol(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Protocol = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IpAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.IpAddress = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32224,94 +37039,39 @@ func (m *Image_AppC) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipMesos(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMesos - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") - } - - return nil -} -func (m *Image_Docker) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - 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) - switch fieldNum { - case 1: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IpAddresses", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthMesos } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - s := string(data[iNdEx:postIndex]) - m.Name = &s + m.IpAddresses = append(m.IpAddresses, &NetworkInfo_IPAddress{}) + if err := m.IpAddresses[len(m.IpAddresses)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -32326,19 +37086,22 @@ func (m *Image_Docker) Unmarshal(data []byte) error { iNdEx += skippy } } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") - } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } -func (m *Volume) Unmarshal(data []byte) error { - var hasFields [1]uint64 +func (m *NetworkInfo_IPAddress) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32351,41 +37114,42 @@ func (m *Volume) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IPAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) } - var stringLen uint64 + var v NetworkInfo_Protocol for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + v |= (NetworkInfo_Protocol(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMesos - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.ContainerPath = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) + m.Protocol = &v case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IpAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32405,66 +37169,10 @@ func (m *Volume) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) - m.HostPath = &s - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - var v Volume_Mode - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (Volume_Mode(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Mode = &v - hasFields[0] |= uint64(0x00000002) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMesos - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Image == nil { - m.Image = &Image{} - } - if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } + m.IpAddress = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -32479,13 +37187,10 @@ func (m *Volume) Unmarshal(data []byte) error { iNdEx += skippy } } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_path") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("mode") - } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ContainerInfo) Unmarshal(data []byte) error { @@ -32493,8 +37198,12 @@ func (m *ContainerInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32507,6 +37216,12 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -32514,6 +37229,9 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { } var v ContainerInfo_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32532,6 +37250,9 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32560,6 +37281,9 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32590,6 +37314,9 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32617,6 +37344,9 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32641,16 +37371,39 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkInfos = append(m.NetworkInfos, &NetworkInfo{}) + if err := m.NetworkInfos[len(m.NetworkInfos)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -32669,6 +37422,9 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { @@ -32676,8 +37432,12 @@ func (m *ContainerInfo_DockerInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32690,6 +37450,12 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DockerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DockerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -32697,6 +37463,9 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32725,6 +37494,9 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { } var v ContainerInfo_DockerInfo_Network for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32742,6 +37514,9 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32770,6 +37545,9 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32788,6 +37566,9 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32816,6 +37597,9 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32829,15 +37613,7 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { b := bool(v != 0) m.ForcePullImage = &b default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -32856,6 +37632,9 @@ func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("image") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { @@ -32863,8 +37642,12 @@ func (m *ContainerInfo_DockerInfo_PortMapping) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32877,6 +37660,12 @@ func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -32884,6 +37673,9 @@ func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32902,6 +37694,9 @@ func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32920,6 +37715,9 @@ func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32942,15 +37740,7 @@ func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { m.Protocol = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -32972,14 +37762,21 @@ func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_port") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ContainerInfo_MesosInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32992,6 +37789,12 @@ func (m *ContainerInfo_MesosInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MesosInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MesosInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -32999,6 +37802,9 @@ func (m *ContainerInfo_MesosInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33024,15 +37830,89 @@ func (m *ContainerInfo_MesosInfo) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatus) 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 ErrIntOverflowMesos + } + 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: ContainerStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkInfos = append(m.NetworkInfos, &NetworkInfo{}) + if err := m.NetworkInfos[len(m.NetworkInfos)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -33048,14 +37928,21 @@ func (m *ContainerInfo_MesosInfo) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Labels) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33068,6 +37955,12 @@ func (m *Labels) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Labels: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Labels: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -33075,6 +37968,9 @@ func (m *Labels) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33098,15 +37994,7 @@ func (m *Labels) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -33122,6 +38010,9 @@ func (m *Labels) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Label) Unmarshal(data []byte) error { @@ -33129,8 +38020,12 @@ func (m *Label) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33143,6 +38038,12 @@ func (m *Label) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Label: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Label: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -33150,6 +38051,9 @@ func (m *Label) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33178,6 +38082,9 @@ func (m *Label) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33200,15 +38107,7 @@ func (m *Label) Unmarshal(data []byte) error { m.Value = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -33227,6 +38126,9 @@ func (m *Label) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Port) Unmarshal(data []byte) error { @@ -33234,8 +38136,12 @@ func (m *Port) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33248,6 +38154,12 @@ func (m *Port) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Port: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Port: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -33255,6 +38167,9 @@ func (m *Port) Unmarshal(data []byte) error { } var v uint32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33273,6 +38188,9 @@ func (m *Port) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33300,6 +38218,9 @@ func (m *Port) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33321,16 +38242,28 @@ func (m *Port) Unmarshal(data []byte) error { s := string(data[iNdEx:postIndex]) m.Protocol = &s iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Visibility", wireType) + } + var v DiscoveryInfo_Visibility + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (DiscoveryInfo_Visibility(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + m.Visibility = &v + default: + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -33349,14 +38282,21 @@ func (m *Port) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("number") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Ports) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33369,6 +38309,12 @@ func (m *Ports) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ports: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ports: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -33376,6 +38322,9 @@ func (m *Ports) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33399,15 +38348,7 @@ func (m *Ports) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -33423,6 +38364,9 @@ func (m *Ports) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *DiscoveryInfo) Unmarshal(data []byte) error { @@ -33430,8 +38374,12 @@ func (m *DiscoveryInfo) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33444,6 +38392,12 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiscoveryInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiscoveryInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -33451,6 +38405,9 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } var v DiscoveryInfo_Visibility for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33469,6 +38426,9 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33496,6 +38456,9 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33523,6 +38486,9 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33550,6 +38516,9 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33577,6 +38546,9 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33607,6 +38579,9 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33632,15 +38607,7 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -33659,6 +38626,9 @@ func (m *DiscoveryInfo) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("visibility") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AppcImageManifest) Unmarshal(data []byte) error { @@ -33666,8 +38636,12 @@ func (m *AppcImageManifest) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33680,6 +38654,12 @@ func (m *AppcImageManifest) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AppcImageManifest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AppcImageManifest: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -33687,6 +38667,9 @@ func (m *AppcImageManifest) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33715,6 +38698,9 @@ func (m *AppcImageManifest) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33743,6 +38729,9 @@ func (m *AppcImageManifest) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33771,6 +38760,9 @@ func (m *AppcImageManifest) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33799,6 +38791,9 @@ func (m *AppcImageManifest) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33822,15 +38817,7 @@ func (m *AppcImageManifest) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -33855,6 +38842,9 @@ func (m *AppcImageManifest) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AppcImageManifest_Label) Unmarshal(data []byte) error { @@ -33862,8 +38852,12 @@ func (m *AppcImageManifest_Label) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33876,6 +38870,12 @@ func (m *AppcImageManifest_Label) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Label: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Label: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -33883,6 +38883,9 @@ func (m *AppcImageManifest_Label) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33911,6 +38914,9 @@ func (m *AppcImageManifest_Label) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33934,15 +38940,7 @@ func (m *AppcImageManifest_Label) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -33964,6 +38962,9 @@ func (m *AppcImageManifest_Label) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *AppcImageManifest_Annotation) Unmarshal(data []byte) error { @@ -33971,8 +38972,12 @@ func (m *AppcImageManifest_Annotation) 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 ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -33985,6 +38990,12 @@ func (m *AppcImageManifest_Annotation) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Annotation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Annotation: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -33992,6 +39003,9 @@ func (m *AppcImageManifest_Annotation) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -34020,6 +39034,9 @@ func (m *AppcImageManifest_Annotation) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -34043,15 +39060,7 @@ func (m *AppcImageManifest_Annotation) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) if err != nil { return err @@ -34073,6 +39082,9 @@ func (m *AppcImageManifest_Annotation) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipMesos(data []byte) (n int, err error) { @@ -34081,6 +39093,9 @@ func skipMesos(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMesos + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -34094,7 +39109,10 @@ func skipMesos(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMesos + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -34110,6 +39128,9 @@ func skipMesos(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMesos + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -34130,6 +39151,9 @@ func skipMesos(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMesos + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -34165,4 +39189,5 @@ func skipMesos(data []byte) (n int, err error) { var ( ErrInvalidLengthMesos = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMesos = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/mesos.proto b/mesosproto/mesos.proto index 07b5c809..fbb1efae 100644 --- a/mesosproto/mesos.proto +++ b/mesosproto/mesos.proto @@ -103,6 +103,24 @@ message ContainerID { } +/** + * Represents time since the epoch, in nanoseconds. + */ +message TimeInfo { + required int64 nanoseconds = 1; + + // TODO(josephw): Add time zone information, if necessary. +} + + +/** + * Represents duration in nanoseconds. + */ +message DurationInfo { + required int64 nanoseconds = 1; +} + + /** * A network address. * @@ -129,6 +147,71 @@ message URL { } +/** + * Represents an interval, from a given start time over a given duration. + * This interval pertains to an unavailability event, such as maintenance, + * and is not a generic interval. + */ +message Unavailability { + required TimeInfo start = 1; + + // When added to `start`, this represents the end of the interval. + // If unspecified, the duration is assumed to be infinite. + optional DurationInfo duration = 2; + + // TODO(josephw): Add additional fields for expressing the purpose and + // urgency of the unavailability event. +} + + +/** + * Represents a single machine, which may hold one or more slaves. + * + * NOTE: In order to match a slave to a machine, both the `hostname` and + * `ip` must match the values advertised by the slave to the master. + * Hostname is not case-sensitive. + */ +message MachineID { + optional string hostname = 1; + optional string ip = 2; +} + + +/** + * Holds information about a single machine, its `mode`, and any other + * relevant information which may affect the behavior of the machine. + */ +message MachineInfo { + // Describes the several states that a machine can be in. A `Mode` + // applies to a machine and to all associated slaves on the machine. + enum Mode { + // In this mode, a machine is behaving normally; + // offering resources, executing tasks, etc. + UP = 1; + + // In this mode, all slaves on the machine are expected to cooperate with + // frameworks to drain resources. In general, draining is done ahead of + // a pending `unavailability`. The resources should be drained so as to + // maximize utilization prior to the maintenance but without knowingly + // violating the frameworks' requirements. + DRAINING = 2; + + // In this mode, a machine is not running any tasks and will not offer + // any of its resources. Slaves on the machine will not be allowed to + // register with the master. + DOWN = 3; + } + + required MachineID id = 1; + optional Mode mode = 2; + + // Signifies that the machine may be unavailable during the given interval. + // See comments in `Unavailability` and for the `unavailability` fields + // in `Offer` and `InverseOffer` for more information. + optional Unavailability unavailability = 3; +} + + /** * Describes a framework. */ @@ -732,6 +815,9 @@ message ResourceUsage { // Current resource usage. If absent, the containerizer // cannot provide resource usage. optional ResourceStatistics statistics = 3; + + // The container id for the executor specified in the executor_info field. + required ContainerID container_id = 4; } repeated Executor executors = 1; @@ -846,6 +932,18 @@ message Offer { repeated Attribute attributes = 7; repeated ExecutorID executor_ids = 6; + // Signifies that the resources in this Offer may be unavailable during + // the given interval. Any tasks launched using these resources may be + // killed when the interval arrives. For example, these resources may be + // part of a planned maintenance schedule. + // + // This field only provides information about a planned unavailability. + // The unavailability interval may not necessarily start at exactly this + // interval, nor last for exactly the duration of this interval. + // The unavailability may also be forever! See comments in + // `Unavailability` for more details. + optional Unavailability unavailability = 9; + // Defines an operation that can be performed against offers. message Operation { enum Type { @@ -886,6 +984,57 @@ message Offer { } +/** + * A request to return some resources occupied by a framework. + */ +message InverseOffer { + // This is the same OfferID as found in normal offers, which allows + // re-use of some of the OfferID-only messages. + required OfferID id = 1; + + // URL for reaching the slave running on the host. This enables some + // optimizations as described in MESOS-3012, such as allowing the + // scheduler driver to bypass the master and talk directly with a slave. + optional URL url = 2; + + // The framework that should release its resources. + // If no specifics are provided (i.e. which slave), all the framework's + // resources are requested back. + required FrameworkID framework_id = 3; + + // Specified if the resources need to be released from a particular slave. + // All the framework's resources on this slave are requested back, + // unless further qualified by the `resources` field. + optional SlaveID slave_id = 4; + + // This InverseOffer represents a planned unavailability event in the + // specified interval. Any tasks running on the given framework or slave + // may be killed when the interval arrives. Therefore, frameworks should + // aim to gracefully terminate tasks prior to the arrival of the interval. + // + // For reserved resources, the resources are expected to be returned to the + // framework after the unavailability interval. This is an expectation, + // not a guarantee. For example, if the unavailability duration is not set, + // the resources may be removed permanently. + // + // For other resources, there is no guarantee that requested resources will + // be returned after the unavailability interval. The allocator has no + // obligation to re-offer these resources to the prior framework after + // the unavailability. + required Unavailability unavailability = 5; + + // A list of resources being requested back from the framework, + // on the slave identified by `slave_id`. If no resources are specified + // then all resources are being requested back. For the purpose of + // maintenance, this field is always empty (maintenance always requests + // all resources back). + repeated Resource resources = 6; + + // TODO(josephw): Add additional options for narrowing down the resources + // being requested back. Such as specific executors, tasks, etc. +} + + /** * Describes a task. Passed from the scheduler all the way to an * executor (see SchedulerDriver::launchTasks and @@ -958,8 +1107,19 @@ message TaskStatus { // TODO(bmahler): Differentiate between slave removal reasons // (e.g. unhealthy vs. unregistered for maintenance). enum Reason { + // TODO(jieyu): The default value when a caller doesn't check for + // presence is 0 and so ideally the 0 reason is not a valid one. + // Since this is not used anywhere, consider removing this reason. REASON_COMMAND_EXECUTOR_FAILED = 0; - REASON_EXECUTOR_PREEMPTED = 17; + + REASON_CONTAINER_LAUNCH_FAILED = 21; + REASON_CONTAINER_LIMITATION = 19; + REASON_CONTAINER_LIMITATION_DISK = 20; + REASON_CONTAINER_LIMITATION_MEMORY = 8; + REASON_CONTAINER_PREEMPTED = 17; + REASON_CONTAINER_UPDATE_FAILED = 22; + REASON_EXECUTOR_REGISTRATION_TIMEOUT = 23; + REASON_EXECUTOR_REREGISTRATION_TIMEOUT = 24; REASON_EXECUTOR_TERMINATED = 1; REASON_EXECUTOR_UNREGISTERED = 2; REASON_FRAMEWORK_REMOVED = 3; @@ -967,7 +1127,6 @@ message TaskStatus { REASON_INVALID_FRAMEWORKID = 5; REASON_INVALID_OFFERS = 6; REASON_MASTER_DISCONNECTED = 7; - REASON_MEMORY_LIMIT = 8; REASON_RECONCILIATION = 9; REASON_RESOURCES_UNKNOWN = 18; REASON_SLAVE_DISCONNECTED = 10; @@ -1012,6 +1171,10 @@ message TaskStatus { // labels should be used to tag TaskStatus message with light-weight // meta-data. optional Labels labels = 12; + + // Container related information that is resolved dynamically such as + // network address. + optional ContainerStatus container_status = 13; } @@ -1073,7 +1236,7 @@ message Parameters { */ message Credential { required string principal = 1; - optional bytes secret = 2; + optional string secret = 2; } @@ -1098,7 +1261,7 @@ message RateLimit { optional double qps = 1; // Principal of framework(s) to be throttled. Should match - // FrameworkInfo.princpal and Credential.principal (if using authentication). + // FrameworkInfo.principal and Credential.principal (if using authentication). required string principal = 2; // Max number of outstanding messages from frameworks of this principal @@ -1145,7 +1308,7 @@ message Image { // Protobuf for specifying an Appc container image. See: // https://github.com/appc/spec/blob/master/spec/aci.md - message AppC { + message Appc { // The name of the image. required string name = 1; @@ -1160,7 +1323,10 @@ message Image { } message Docker { - // The name of the image. Expected in format repository[:tag]. + // The name of the image. Expected format: + // [REGISTRY_HOST[:REGISTRY_PORT]/]REPOSITORY[:TAG|@TYPE:DIGEST] + // + // See: https://docs.docker.com/reference/commandline/pull/ required string name = 1; } @@ -1168,7 +1334,7 @@ message Image { // Only one of the following image messages should be set to match // the type. - optional AppC appc = 2; + optional Appc appc = 2; optional Docker docker = 3; } @@ -1204,6 +1370,90 @@ message Volume { } +/** + * Describes a network request from a framework as well as network resolution + * provided by Mesos. + * + * A Framework may request the network isolator on the Agent to isolate the + * container in a network namespace and create a virtual network interface. + * The `NetworkInfo` message describes the properties of that virtual + * interface, including the IP addresses and network isolation policy + * (network group membership). + * + * The NetworkInfo message is not interpreted by the Master or Agent and is + * intended to be used by Agent and Master modules implementing network + * isolation. If the modules are missing, the message is simply ignored. In + * future, the task launch will fail if there is no module providing the + * network isolation capabilities (MESOS-3390). + * + * An executor, Agent, or an Agent module may append NetworkInfos inside + * TaskStatus::container_status to provide information such as the container IP + * address and isolation groups. + */ +message NetworkInfo { + enum Protocol { + IPv4 = 1; + IPv6 = 2; + } + + // Specifies a request for an IP address, or reports the assigned container + // IP address. + // + // Users can request an automatically assigned IP (for example, via an + // IPAM service) or a specific IP by adding a NetworkInfo to the + // ContainerInfo for a task. On a request, specifying neither `protocol` + // nor `ip_address` means that any available address may be assigned. + message IPAddress { + // Specify IP address requirement. Set protocol to the desired value to + // request the network isolator on the Agent to assign an IP address to the + // container being launched. If a specific IP address is specified in + // ip_address, this field should not be set. + optional Protocol protocol = 1; + + // Statically assigned IP provided by the Framework. This IP will be + // assigned to the container by the network isolator module on the Agent. + // This field should not be used with the protocol field above. + // + // If an explicit address is requested but is unavailable, the network + // isolator should fail the task. + optional string ip_address = 2; + } + + // When included in a ContainerInfo, each of these represent a + // request for an IP address. Each request can specify an explicit address + // or the IP protocol to use. + // + // When included in a TaskStatus message, these inform the framework + // scheduler about the IP addresses that are bound to the container + // interface. When there are no custom network isolator modules installed, + // this field is filled in automatically with the Agent IP address. + repeated IPAddress ip_addresses = 5; + + // Specify IP address requirement. Set protocol to the desired value to + // request the network isolator on the Agent to assign an IP address to the + // container being launched. If a specific IP address is specified in + // ip_address, this field should not be set. + optional Protocol protocol = 1 [deprecated = true]; // Since 0.26.0 + + // Statically assigned IP provided by the Framework. This IP will be assigned + // to the container by the network isolator module on the Agent. This field + // should not be used with the protocol field above. + // NOTE: It is up to the networking 'provider' (IPAM/Isolator) to interpret + // this either as a hint of as a requirement for assigning the IP. + optional string ip_address = 2 [deprecated = true]; // Since 0.26.0 + + // A group is the name given to a set of logically-related interfaces that + // are allowed to communicate among themselves. Network traffic is allowed + // between two container interfaces that share at least one network group. + // For example, one might want to create separate groups for isolating dev, + // testing, qa and prod deployment environments. + repeated string groups = 3; + + // To tag certain metadata to be used by Isolator/IPAM, e.g., rack, etc. + optional Labels labels = 4; +}; + + /** * Describes a container configuration and allows extensible * configurations for different container implementations. @@ -1263,6 +1513,20 @@ message ContainerInfo { // the type. optional DockerInfo docker = 3; optional MesosInfo mesos = 5; + + // A list of network requests. A framework can request multiple IP addresses + // for the container. + repeated NetworkInfo network_infos = 7; +} + + +/** + * Container related information that is resolved during container setup. The + * information is sent back to the framework as part of the TaskStatus message. + */ +message ContainerStatus { + // This field can be reliably used to identify the container IP address. + repeated NetworkInfo network_infos = 1; } @@ -1290,6 +1554,7 @@ message Port { required uint32 number = 1; optional string name = 2; optional string protocol = 3; + optional DiscoveryInfo.Visibility visibility = 4; } @@ -1303,15 +1568,16 @@ message Ports { /** * Service discovery information. -* The visibility field restricts discovery within a framework -* (FRAMEWORK), within a Mesos cluster (CLUSTER), or places no -* restrictions (EXTERNAL). -* The environment, location, and version fields provide first class -* support for common attributes used to differentiate between -* similar services. The environment may receive values such as -* PROD/QA/DEV, the location field may receive values like -* EAST-US/WEST-US/EUROPE/AMEA, and the version field may receive -* values like v2.0/v0.9. The exact use of these fields is up to each +* The visibility field restricts discovery within a framework (FRAMEWORK), +* within a Mesos cluster (CLUSTER), or places no restrictions (EXTERNAL). +* Each port in the ports field also has an optional visibility field. +* If visibility is specified for a port, it overrides the default service-wide +* DiscoveryInfo.visibility for that port. +* The environment, location, and version fields provide first class support for +* common attributes used to differentiate between similar services. The +* environment may receive values such as PROD/QA/DEV, the location field may +* receive values like EAST-US/WEST-US/EUROPE/AMEA, and the version field may +* receive values like v2.0/v0.9. The exact use of these fields is up to each * service discovery system. */ message DiscoveryInfo { diff --git a/mesosproto/mesospb_test.go b/mesosproto/mesospb_test.go index ef0191b7..2bfe52d5 100644 --- a/mesosproto/mesospb_test.go +++ b/mesosproto/mesospb_test.go @@ -633,15 +633,15 @@ func BenchmarkContainerIDProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAddressProto(t *testing.T) { +func TestTimeInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddress(popr, false) + p := NewPopulatedTimeInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Address{} + msg := &TimeInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -667,10 +667,10 @@ func TestAddressProto(t *testing.T) { } } -func TestAddressMarshalTo(t *testing.T) { +func TestTimeInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddress(popr, false) + p := NewPopulatedTimeInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -680,7 +680,7 @@ func TestAddressMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Address{} + msg := &TimeInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -695,12 +695,12 @@ func TestAddressMarshalTo(t *testing.T) { } } -func BenchmarkAddressProtoMarshal(b *testing.B) { +func BenchmarkTimeInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Address, 10000) + pops := make([]*TimeInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAddress(popr, false) + pops[i] = NewPopulatedTimeInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -713,18 +713,18 @@ func BenchmarkAddressProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAddressProtoUnmarshal(b *testing.B) { +func BenchmarkTimeInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAddress(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimeInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Address{} + msg := &TimeInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -735,15 +735,15 @@ func BenchmarkAddressProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestURLProto(t *testing.T) { +func TestDurationInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedURL(popr, false) + p := NewPopulatedDurationInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &URL{} + msg := &DurationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -769,10 +769,10 @@ func TestURLProto(t *testing.T) { } } -func TestURLMarshalTo(t *testing.T) { +func TestDurationInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedURL(popr, false) + p := NewPopulatedDurationInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -782,7 +782,7 @@ func TestURLMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &URL{} + msg := &DurationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -797,12 +797,12 @@ func TestURLMarshalTo(t *testing.T) { } } -func BenchmarkURLProtoMarshal(b *testing.B) { +func BenchmarkDurationInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*URL, 10000) + pops := make([]*DurationInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedURL(popr, false) + pops[i] = NewPopulatedDurationInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -815,18 +815,18 @@ func BenchmarkURLProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkURLProtoUnmarshal(b *testing.B) { +func BenchmarkDurationInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedURL(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDurationInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &URL{} + msg := &DurationInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -837,15 +837,15 @@ func BenchmarkURLProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfoProto(t *testing.T) { +func TestAddressProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo(popr, false) + p := NewPopulatedAddress(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &FrameworkInfo{} + msg := &Address{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -871,10 +871,10 @@ func TestFrameworkInfoProto(t *testing.T) { } } -func TestFrameworkInfoMarshalTo(t *testing.T) { +func TestAddressMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo(popr, false) + p := NewPopulatedAddress(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -884,7 +884,7 @@ func TestFrameworkInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &FrameworkInfo{} + msg := &Address{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -899,12 +899,12 @@ func TestFrameworkInfoMarshalTo(t *testing.T) { } } -func BenchmarkFrameworkInfoProtoMarshal(b *testing.B) { +func BenchmarkAddressProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkInfo, 10000) + pops := make([]*Address, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFrameworkInfo(popr, false) + pops[i] = NewPopulatedAddress(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -917,18 +917,18 @@ func BenchmarkFrameworkInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkFrameworkInfoProtoUnmarshal(b *testing.B) { +func BenchmarkAddressProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFrameworkInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAddress(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &FrameworkInfo{} + msg := &Address{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -939,15 +939,15 @@ func BenchmarkFrameworkInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfo_CapabilityProto(t *testing.T) { +func TestURLProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo_Capability(popr, false) + p := NewPopulatedURL(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &FrameworkInfo_Capability{} + msg := &URL{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -973,10 +973,10 @@ func TestFrameworkInfo_CapabilityProto(t *testing.T) { } } -func TestFrameworkInfo_CapabilityMarshalTo(t *testing.T) { +func TestURLMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo_Capability(popr, false) + p := NewPopulatedURL(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -986,7 +986,7 @@ func TestFrameworkInfo_CapabilityMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &FrameworkInfo_Capability{} + msg := &URL{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1001,12 +1001,12 @@ func TestFrameworkInfo_CapabilityMarshalTo(t *testing.T) { } } -func BenchmarkFrameworkInfo_CapabilityProtoMarshal(b *testing.B) { +func BenchmarkURLProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkInfo_Capability, 10000) + pops := make([]*URL, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFrameworkInfo_Capability(popr, false) + pops[i] = NewPopulatedURL(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1019,18 +1019,18 @@ func BenchmarkFrameworkInfo_CapabilityProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkFrameworkInfo_CapabilityProtoUnmarshal(b *testing.B) { +func BenchmarkURLProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFrameworkInfo_Capability(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedURL(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &FrameworkInfo_Capability{} + msg := &URL{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1041,15 +1041,15 @@ func BenchmarkFrameworkInfo_CapabilityProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestHealthCheckProto(t *testing.T) { +func TestUnavailabilityProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck(popr, false) + p := NewPopulatedUnavailability(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck{} + msg := &Unavailability{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1075,10 +1075,10 @@ func TestHealthCheckProto(t *testing.T) { } } -func TestHealthCheckMarshalTo(t *testing.T) { +func TestUnavailabilityMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck(popr, false) + p := NewPopulatedUnavailability(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1088,7 +1088,7 @@ func TestHealthCheckMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck{} + msg := &Unavailability{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1103,12 +1103,12 @@ func TestHealthCheckMarshalTo(t *testing.T) { } } -func BenchmarkHealthCheckProtoMarshal(b *testing.B) { +func BenchmarkUnavailabilityProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*HealthCheck, 10000) + pops := make([]*Unavailability, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedHealthCheck(popr, false) + pops[i] = NewPopulatedUnavailability(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1121,18 +1121,18 @@ func BenchmarkHealthCheckProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkHealthCheckProtoUnmarshal(b *testing.B) { +func BenchmarkUnavailabilityProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHealthCheck(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnavailability(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &HealthCheck{} + msg := &Unavailability{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1143,15 +1143,15 @@ func BenchmarkHealthCheckProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestHealthCheck_HTTPProto(t *testing.T) { +func TestMachineIDProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_HTTP(popr, false) + p := NewPopulatedMachineID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck_HTTP{} + msg := &MachineID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1177,10 +1177,10 @@ func TestHealthCheck_HTTPProto(t *testing.T) { } } -func TestHealthCheck_HTTPMarshalTo(t *testing.T) { +func TestMachineIDMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_HTTP(popr, false) + p := NewPopulatedMachineID(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1190,7 +1190,7 @@ func TestHealthCheck_HTTPMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck_HTTP{} + msg := &MachineID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1205,12 +1205,12 @@ func TestHealthCheck_HTTPMarshalTo(t *testing.T) { } } -func BenchmarkHealthCheck_HTTPProtoMarshal(b *testing.B) { +func BenchmarkMachineIDProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*HealthCheck_HTTP, 10000) + pops := make([]*MachineID, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedHealthCheck_HTTP(popr, false) + pops[i] = NewPopulatedMachineID(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1223,18 +1223,18 @@ func BenchmarkHealthCheck_HTTPProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkHealthCheck_HTTPProtoUnmarshal(b *testing.B) { +func BenchmarkMachineIDProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHealthCheck_HTTP(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMachineID(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &HealthCheck_HTTP{} + msg := &MachineID{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1245,15 +1245,15 @@ func BenchmarkHealthCheck_HTTPProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCommandInfoProto(t *testing.T) { +func TestMachineInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo(popr, false) + p := NewPopulatedMachineInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo{} + msg := &MachineInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1279,10 +1279,10 @@ func TestCommandInfoProto(t *testing.T) { } } -func TestCommandInfoMarshalTo(t *testing.T) { +func TestMachineInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo(popr, false) + p := NewPopulatedMachineInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1292,7 +1292,7 @@ func TestCommandInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo{} + msg := &MachineInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1307,12 +1307,12 @@ func TestCommandInfoMarshalTo(t *testing.T) { } } -func BenchmarkCommandInfoProtoMarshal(b *testing.B) { +func BenchmarkMachineInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CommandInfo, 10000) + pops := make([]*MachineInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCommandInfo(popr, false) + pops[i] = NewPopulatedMachineInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1325,18 +1325,18 @@ func BenchmarkCommandInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCommandInfoProtoUnmarshal(b *testing.B) { +func BenchmarkMachineInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCommandInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMachineInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &CommandInfo{} + msg := &MachineInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1347,15 +1347,15 @@ func BenchmarkCommandInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_URIProto(t *testing.T) { +func TestFrameworkInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_URI(popr, false) + p := NewPopulatedFrameworkInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_URI{} + msg := &FrameworkInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1381,10 +1381,10 @@ func TestCommandInfo_URIProto(t *testing.T) { } } -func TestCommandInfo_URIMarshalTo(t *testing.T) { +func TestFrameworkInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_URI(popr, false) + p := NewPopulatedFrameworkInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1394,7 +1394,7 @@ func TestCommandInfo_URIMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_URI{} + msg := &FrameworkInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1409,12 +1409,12 @@ func TestCommandInfo_URIMarshalTo(t *testing.T) { } } -func BenchmarkCommandInfo_URIProtoMarshal(b *testing.B) { +func BenchmarkFrameworkInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CommandInfo_URI, 10000) + pops := make([]*FrameworkInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCommandInfo_URI(popr, false) + pops[i] = NewPopulatedFrameworkInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1427,18 +1427,18 @@ func BenchmarkCommandInfo_URIProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCommandInfo_URIProtoUnmarshal(b *testing.B) { +func BenchmarkFrameworkInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCommandInfo_URI(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFrameworkInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &CommandInfo_URI{} + msg := &FrameworkInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1449,15 +1449,15 @@ func BenchmarkCommandInfo_URIProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_ContainerInfoProto(t *testing.T) { +func TestFrameworkInfo_CapabilityProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_ContainerInfo(popr, false) + p := NewPopulatedFrameworkInfo_Capability(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_ContainerInfo{} + msg := &FrameworkInfo_Capability{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1483,10 +1483,10 @@ func TestCommandInfo_ContainerInfoProto(t *testing.T) { } } -func TestCommandInfo_ContainerInfoMarshalTo(t *testing.T) { +func TestFrameworkInfo_CapabilityMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_ContainerInfo(popr, false) + p := NewPopulatedFrameworkInfo_Capability(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1496,7 +1496,7 @@ func TestCommandInfo_ContainerInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_ContainerInfo{} + msg := &FrameworkInfo_Capability{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1511,12 +1511,12 @@ func TestCommandInfo_ContainerInfoMarshalTo(t *testing.T) { } } -func BenchmarkCommandInfo_ContainerInfoProtoMarshal(b *testing.B) { +func BenchmarkFrameworkInfo_CapabilityProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CommandInfo_ContainerInfo, 10000) + pops := make([]*FrameworkInfo_Capability, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCommandInfo_ContainerInfo(popr, false) + pops[i] = NewPopulatedFrameworkInfo_Capability(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1529,18 +1529,18 @@ func BenchmarkCommandInfo_ContainerInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCommandInfo_ContainerInfoProtoUnmarshal(b *testing.B) { +func BenchmarkFrameworkInfo_CapabilityProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCommandInfo_ContainerInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFrameworkInfo_Capability(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &CommandInfo_ContainerInfo{} + msg := &FrameworkInfo_Capability{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1551,15 +1551,15 @@ func BenchmarkCommandInfo_ContainerInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestExecutorInfoProto(t *testing.T) { +func TestHealthCheckProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorInfo(popr, false) + p := NewPopulatedHealthCheck(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ExecutorInfo{} + msg := &HealthCheck{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1585,10 +1585,10 @@ func TestExecutorInfoProto(t *testing.T) { } } -func TestExecutorInfoMarshalTo(t *testing.T) { +func TestHealthCheckMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorInfo(popr, false) + p := NewPopulatedHealthCheck(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1598,7 +1598,7 @@ func TestExecutorInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ExecutorInfo{} + msg := &HealthCheck{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1613,12 +1613,12 @@ func TestExecutorInfoMarshalTo(t *testing.T) { } } -func BenchmarkExecutorInfoProtoMarshal(b *testing.B) { +func BenchmarkHealthCheckProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ExecutorInfo, 10000) + pops := make([]*HealthCheck, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedExecutorInfo(popr, false) + pops[i] = NewPopulatedHealthCheck(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1631,18 +1631,18 @@ func BenchmarkExecutorInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkExecutorInfoProtoUnmarshal(b *testing.B) { +func BenchmarkHealthCheckProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedExecutorInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHealthCheck(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ExecutorInfo{} + msg := &HealthCheck{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1653,15 +1653,15 @@ func BenchmarkExecutorInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestMasterInfoProto(t *testing.T) { +func TestHealthCheck_HTTPProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterInfo(popr, false) + p := NewPopulatedHealthCheck_HTTP(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &MasterInfo{} + msg := &HealthCheck_HTTP{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1687,10 +1687,10 @@ func TestMasterInfoProto(t *testing.T) { } } -func TestMasterInfoMarshalTo(t *testing.T) { +func TestHealthCheck_HTTPMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterInfo(popr, false) + p := NewPopulatedHealthCheck_HTTP(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1700,7 +1700,7 @@ func TestMasterInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &MasterInfo{} + msg := &HealthCheck_HTTP{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1715,12 +1715,12 @@ func TestMasterInfoMarshalTo(t *testing.T) { } } -func BenchmarkMasterInfoProtoMarshal(b *testing.B) { +func BenchmarkHealthCheck_HTTPProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*MasterInfo, 10000) + pops := make([]*HealthCheck_HTTP, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMasterInfo(popr, false) + pops[i] = NewPopulatedHealthCheck_HTTP(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1733,18 +1733,18 @@ func BenchmarkMasterInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkMasterInfoProtoUnmarshal(b *testing.B) { +func BenchmarkHealthCheck_HTTPProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMasterInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHealthCheck_HTTP(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &MasterInfo{} + msg := &HealthCheck_HTTP{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1755,15 +1755,15 @@ func BenchmarkMasterInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestSlaveInfoProto(t *testing.T) { +func TestCommandInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveInfo(popr, false) + p := NewPopulatedCommandInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &SlaveInfo{} + msg := &CommandInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1789,10 +1789,10 @@ func TestSlaveInfoProto(t *testing.T) { } } -func TestSlaveInfoMarshalTo(t *testing.T) { +func TestCommandInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveInfo(popr, false) + p := NewPopulatedCommandInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1802,7 +1802,7 @@ func TestSlaveInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &SlaveInfo{} + msg := &CommandInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1817,12 +1817,12 @@ func TestSlaveInfoMarshalTo(t *testing.T) { } } -func BenchmarkSlaveInfoProtoMarshal(b *testing.B) { +func BenchmarkCommandInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*SlaveInfo, 10000) + pops := make([]*CommandInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedSlaveInfo(popr, false) + pops[i] = NewPopulatedCommandInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1835,18 +1835,18 @@ func BenchmarkSlaveInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkSlaveInfoProtoUnmarshal(b *testing.B) { +func BenchmarkCommandInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSlaveInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCommandInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &SlaveInfo{} + msg := &CommandInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1857,15 +1857,15 @@ func BenchmarkSlaveInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValueProto(t *testing.T) { +func TestCommandInfo_URIProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue(popr, false) + p := NewPopulatedCommandInfo_URI(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value{} + msg := &CommandInfo_URI{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1891,10 +1891,10 @@ func TestValueProto(t *testing.T) { } } -func TestValueMarshalTo(t *testing.T) { +func TestCommandInfo_URIMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue(popr, false) + p := NewPopulatedCommandInfo_URI(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1904,7 +1904,7 @@ func TestValueMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value{} + msg := &CommandInfo_URI{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1919,12 +1919,12 @@ func TestValueMarshalTo(t *testing.T) { } } -func BenchmarkValueProtoMarshal(b *testing.B) { +func BenchmarkCommandInfo_URIProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value, 10000) + pops := make([]*CommandInfo_URI, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue(popr, false) + pops[i] = NewPopulatedCommandInfo_URI(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1937,18 +1937,18 @@ func BenchmarkValueProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValueProtoUnmarshal(b *testing.B) { +func BenchmarkCommandInfo_URIProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCommandInfo_URI(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value{} + msg := &CommandInfo_URI{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1959,15 +1959,15 @@ func BenchmarkValueProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_ScalarProto(t *testing.T) { +func TestCommandInfo_ContainerInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Scalar(popr, false) + p := NewPopulatedCommandInfo_ContainerInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Scalar{} + msg := &CommandInfo_ContainerInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1993,10 +1993,10 @@ func TestValue_ScalarProto(t *testing.T) { } } -func TestValue_ScalarMarshalTo(t *testing.T) { +func TestCommandInfo_ContainerInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Scalar(popr, false) + p := NewPopulatedCommandInfo_ContainerInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2006,7 +2006,7 @@ func TestValue_ScalarMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Scalar{} + msg := &CommandInfo_ContainerInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2021,12 +2021,12 @@ func TestValue_ScalarMarshalTo(t *testing.T) { } } -func BenchmarkValue_ScalarProtoMarshal(b *testing.B) { +func BenchmarkCommandInfo_ContainerInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Scalar, 10000) + pops := make([]*CommandInfo_ContainerInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Scalar(popr, false) + pops[i] = NewPopulatedCommandInfo_ContainerInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2039,18 +2039,18 @@ func BenchmarkValue_ScalarProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_ScalarProtoUnmarshal(b *testing.B) { +func BenchmarkCommandInfo_ContainerInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Scalar(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCommandInfo_ContainerInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Scalar{} + msg := &CommandInfo_ContainerInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2061,15 +2061,15 @@ func BenchmarkValue_ScalarProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_RangeProto(t *testing.T) { +func TestExecutorInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Range(popr, false) + p := NewPopulatedExecutorInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Range{} + msg := &ExecutorInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2095,10 +2095,10 @@ func TestValue_RangeProto(t *testing.T) { } } -func TestValue_RangeMarshalTo(t *testing.T) { +func TestExecutorInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Range(popr, false) + p := NewPopulatedExecutorInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2108,7 +2108,7 @@ func TestValue_RangeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Range{} + msg := &ExecutorInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2123,12 +2123,12 @@ func TestValue_RangeMarshalTo(t *testing.T) { } } -func BenchmarkValue_RangeProtoMarshal(b *testing.B) { +func BenchmarkExecutorInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Range, 10000) + pops := make([]*ExecutorInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Range(popr, false) + pops[i] = NewPopulatedExecutorInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2141,18 +2141,18 @@ func BenchmarkValue_RangeProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_RangeProtoUnmarshal(b *testing.B) { +func BenchmarkExecutorInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Range(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedExecutorInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Range{} + msg := &ExecutorInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2163,15 +2163,15 @@ func BenchmarkValue_RangeProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_RangesProto(t *testing.T) { +func TestMasterInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Ranges(popr, false) + p := NewPopulatedMasterInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Ranges{} + msg := &MasterInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2197,10 +2197,10 @@ func TestValue_RangesProto(t *testing.T) { } } -func TestValue_RangesMarshalTo(t *testing.T) { +func TestMasterInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Ranges(popr, false) + p := NewPopulatedMasterInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2210,7 +2210,7 @@ func TestValue_RangesMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Ranges{} + msg := &MasterInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2225,12 +2225,12 @@ func TestValue_RangesMarshalTo(t *testing.T) { } } -func BenchmarkValue_RangesProtoMarshal(b *testing.B) { +func BenchmarkMasterInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Ranges, 10000) + pops := make([]*MasterInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Ranges(popr, false) + pops[i] = NewPopulatedMasterInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2243,18 +2243,18 @@ func BenchmarkValue_RangesProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_RangesProtoUnmarshal(b *testing.B) { +func BenchmarkMasterInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Ranges(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMasterInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Ranges{} + msg := &MasterInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2265,15 +2265,15 @@ func BenchmarkValue_RangesProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_SetProto(t *testing.T) { +func TestSlaveInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Set(popr, false) + p := NewPopulatedSlaveInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Set{} + msg := &SlaveInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2299,10 +2299,10 @@ func TestValue_SetProto(t *testing.T) { } } -func TestValue_SetMarshalTo(t *testing.T) { +func TestSlaveInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Set(popr, false) + p := NewPopulatedSlaveInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2312,7 +2312,7 @@ func TestValue_SetMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Set{} + msg := &SlaveInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2327,12 +2327,12 @@ func TestValue_SetMarshalTo(t *testing.T) { } } -func BenchmarkValue_SetProtoMarshal(b *testing.B) { +func BenchmarkSlaveInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Set, 10000) + pops := make([]*SlaveInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Set(popr, false) + pops[i] = NewPopulatedSlaveInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2345,18 +2345,18 @@ func BenchmarkValue_SetProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_SetProtoUnmarshal(b *testing.B) { +func BenchmarkSlaveInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Set(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSlaveInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Set{} + msg := &SlaveInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2367,15 +2367,15 @@ func BenchmarkValue_SetProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_TextProto(t *testing.T) { +func TestValueProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Text(popr, false) + p := NewPopulatedValue(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Text{} + msg := &Value{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2401,10 +2401,10 @@ func TestValue_TextProto(t *testing.T) { } } -func TestValue_TextMarshalTo(t *testing.T) { +func TestValueMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Text(popr, false) + p := NewPopulatedValue(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2414,7 +2414,7 @@ func TestValue_TextMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Text{} + msg := &Value{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2429,12 +2429,12 @@ func TestValue_TextMarshalTo(t *testing.T) { } } -func BenchmarkValue_TextProtoMarshal(b *testing.B) { +func BenchmarkValueProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Text, 10000) + pops := make([]*Value, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Text(popr, false) + pops[i] = NewPopulatedValue(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2447,18 +2447,18 @@ func BenchmarkValue_TextProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_TextProtoUnmarshal(b *testing.B) { +func BenchmarkValueProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Text(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Text{} + msg := &Value{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2469,15 +2469,15 @@ func BenchmarkValue_TextProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAttributeProto(t *testing.T) { +func TestValue_ScalarProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAttribute(popr, false) + p := NewPopulatedValue_Scalar(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Attribute{} + msg := &Value_Scalar{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2503,10 +2503,10 @@ func TestAttributeProto(t *testing.T) { } } -func TestAttributeMarshalTo(t *testing.T) { +func TestValue_ScalarMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAttribute(popr, false) + p := NewPopulatedValue_Scalar(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2516,7 +2516,7 @@ func TestAttributeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Attribute{} + msg := &Value_Scalar{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2531,12 +2531,12 @@ func TestAttributeMarshalTo(t *testing.T) { } } -func BenchmarkAttributeProtoMarshal(b *testing.B) { +func BenchmarkValue_ScalarProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Attribute, 10000) + pops := make([]*Value_Scalar, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAttribute(popr, false) + pops[i] = NewPopulatedValue_Scalar(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2549,18 +2549,18 @@ func BenchmarkAttributeProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAttributeProtoUnmarshal(b *testing.B) { +func BenchmarkValue_ScalarProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAttribute(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Scalar(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Attribute{} + msg := &Value_Scalar{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2571,15 +2571,15 @@ func BenchmarkAttributeProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceProto(t *testing.T) { +func TestValue_RangeProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource(popr, false) + p := NewPopulatedValue_Range(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource{} + msg := &Value_Range{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2605,10 +2605,10 @@ func TestResourceProto(t *testing.T) { } } -func TestResourceMarshalTo(t *testing.T) { +func TestValue_RangeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource(popr, false) + p := NewPopulatedValue_Range(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2618,7 +2618,7 @@ func TestResourceMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource{} + msg := &Value_Range{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2633,12 +2633,12 @@ func TestResourceMarshalTo(t *testing.T) { } } -func BenchmarkResourceProtoMarshal(b *testing.B) { +func BenchmarkValue_RangeProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource, 10000) + pops := make([]*Value_Range, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource(popr, false) + pops[i] = NewPopulatedValue_Range(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2651,18 +2651,18 @@ func BenchmarkResourceProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceProtoUnmarshal(b *testing.B) { +func BenchmarkValue_RangeProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Range(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource{} + msg := &Value_Range{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2673,15 +2673,15 @@ func BenchmarkResourceProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_ReservationInfoProto(t *testing.T) { +func TestValue_RangesProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_ReservationInfo(popr, false) + p := NewPopulatedValue_Ranges(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_ReservationInfo{} + msg := &Value_Ranges{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2707,10 +2707,10 @@ func TestResource_ReservationInfoProto(t *testing.T) { } } -func TestResource_ReservationInfoMarshalTo(t *testing.T) { +func TestValue_RangesMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_ReservationInfo(popr, false) + p := NewPopulatedValue_Ranges(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2720,7 +2720,7 @@ func TestResource_ReservationInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_ReservationInfo{} + msg := &Value_Ranges{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2735,12 +2735,12 @@ func TestResource_ReservationInfoMarshalTo(t *testing.T) { } } -func BenchmarkResource_ReservationInfoProtoMarshal(b *testing.B) { +func BenchmarkValue_RangesProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_ReservationInfo, 10000) + pops := make([]*Value_Ranges, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_ReservationInfo(popr, false) + pops[i] = NewPopulatedValue_Ranges(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2753,18 +2753,18 @@ func BenchmarkResource_ReservationInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_ReservationInfoProtoUnmarshal(b *testing.B) { +func BenchmarkValue_RangesProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_ReservationInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Ranges(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_ReservationInfo{} + msg := &Value_Ranges{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2775,15 +2775,15 @@ func BenchmarkResource_ReservationInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_DiskInfoProto(t *testing.T) { +func TestValue_SetProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo(popr, false) + p := NewPopulatedValue_Set(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo{} + msg := &Value_Set{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2809,10 +2809,10 @@ func TestResource_DiskInfoProto(t *testing.T) { } } -func TestResource_DiskInfoMarshalTo(t *testing.T) { +func TestValue_SetMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo(popr, false) + p := NewPopulatedValue_Set(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2822,7 +2822,7 @@ func TestResource_DiskInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo{} + msg := &Value_Set{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2837,12 +2837,12 @@ func TestResource_DiskInfoMarshalTo(t *testing.T) { } } -func BenchmarkResource_DiskInfoProtoMarshal(b *testing.B) { +func BenchmarkValue_SetProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_DiskInfo, 10000) + pops := make([]*Value_Set, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_DiskInfo(popr, false) + pops[i] = NewPopulatedValue_Set(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2855,18 +2855,18 @@ func BenchmarkResource_DiskInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_DiskInfoProtoUnmarshal(b *testing.B) { +func BenchmarkValue_SetProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Set(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_DiskInfo{} + msg := &Value_Set{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2877,15 +2877,15 @@ func BenchmarkResource_DiskInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_DiskInfo_PersistenceProto(t *testing.T) { +func TestValue_TextProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + p := NewPopulatedValue_Text(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Persistence{} + msg := &Value_Text{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2911,10 +2911,10 @@ func TestResource_DiskInfo_PersistenceProto(t *testing.T) { } } -func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { +func TestValue_TextMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + p := NewPopulatedValue_Text(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2924,7 +2924,7 @@ func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Persistence{} + msg := &Value_Text{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2939,12 +2939,12 @@ func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { } } -func BenchmarkResource_DiskInfo_PersistenceProtoMarshal(b *testing.B) { +func BenchmarkValue_TextProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_DiskInfo_Persistence, 10000) + pops := make([]*Value_Text, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_DiskInfo_Persistence(popr, false) + pops[i] = NewPopulatedValue_Text(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2957,18 +2957,18 @@ func BenchmarkResource_DiskInfo_PersistenceProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_DiskInfo_PersistenceProtoUnmarshal(b *testing.B) { +func BenchmarkValue_TextProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo_Persistence(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Text(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_DiskInfo_Persistence{} + msg := &Value_Text{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2979,15 +2979,15 @@ func BenchmarkResource_DiskInfo_PersistenceProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_RevocableInfoProto(t *testing.T) { +func TestAttributeProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_RevocableInfo(popr, false) + p := NewPopulatedAttribute(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_RevocableInfo{} + msg := &Attribute{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3013,10 +3013,10 @@ func TestResource_RevocableInfoProto(t *testing.T) { } } -func TestResource_RevocableInfoMarshalTo(t *testing.T) { +func TestAttributeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_RevocableInfo(popr, false) + p := NewPopulatedAttribute(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3026,7 +3026,7 @@ func TestResource_RevocableInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_RevocableInfo{} + msg := &Attribute{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3041,12 +3041,12 @@ func TestResource_RevocableInfoMarshalTo(t *testing.T) { } } -func BenchmarkResource_RevocableInfoProtoMarshal(b *testing.B) { +func BenchmarkAttributeProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_RevocableInfo, 10000) + pops := make([]*Attribute, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_RevocableInfo(popr, false) + pops[i] = NewPopulatedAttribute(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3059,18 +3059,18 @@ func BenchmarkResource_RevocableInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_RevocableInfoProtoUnmarshal(b *testing.B) { +func BenchmarkAttributeProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_RevocableInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAttribute(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_RevocableInfo{} + msg := &Attribute{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3081,15 +3081,15 @@ func BenchmarkResource_RevocableInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTrafficControlStatisticsProto(t *testing.T) { +func TestResourceProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTrafficControlStatistics(popr, false) + p := NewPopulatedResource(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TrafficControlStatistics{} + msg := &Resource{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3115,10 +3115,10 @@ func TestTrafficControlStatisticsProto(t *testing.T) { } } -func TestTrafficControlStatisticsMarshalTo(t *testing.T) { +func TestResourceMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTrafficControlStatistics(popr, false) + p := NewPopulatedResource(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3128,7 +3128,7 @@ func TestTrafficControlStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TrafficControlStatistics{} + msg := &Resource{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3143,12 +3143,12 @@ func TestTrafficControlStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkTrafficControlStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResourceProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TrafficControlStatistics, 10000) + pops := make([]*Resource, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTrafficControlStatistics(popr, false) + pops[i] = NewPopulatedResource(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3161,18 +3161,18 @@ func BenchmarkTrafficControlStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTrafficControlStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResourceProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTrafficControlStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TrafficControlStatistics{} + msg := &Resource{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3183,15 +3183,15 @@ func BenchmarkTrafficControlStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceStatisticsProto(t *testing.T) { +func TestResource_ReservationInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceStatistics(popr, false) + p := NewPopulatedResource_ReservationInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceStatistics{} + msg := &Resource_ReservationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3217,10 +3217,10 @@ func TestResourceStatisticsProto(t *testing.T) { } } -func TestResourceStatisticsMarshalTo(t *testing.T) { +func TestResource_ReservationInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceStatistics(popr, false) + p := NewPopulatedResource_ReservationInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3230,7 +3230,7 @@ func TestResourceStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceStatistics{} + msg := &Resource_ReservationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3245,12 +3245,12 @@ func TestResourceStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_ReservationInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceStatistics, 10000) + pops := make([]*Resource_ReservationInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceStatistics(popr, false) + pops[i] = NewPopulatedResource_ReservationInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3263,18 +3263,18 @@ func BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResource_ReservationInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_ReservationInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceStatistics{} + msg := &Resource_ReservationInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3285,15 +3285,15 @@ func BenchmarkResourceStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceUsageProto(t *testing.T) { +func TestResource_DiskInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage(popr, false) + p := NewPopulatedResource_DiskInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage{} + msg := &Resource_DiskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3319,10 +3319,10 @@ func TestResourceUsageProto(t *testing.T) { } } -func TestResourceUsageMarshalTo(t *testing.T) { +func TestResource_DiskInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage(popr, false) + p := NewPopulatedResource_DiskInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3332,7 +3332,7 @@ func TestResourceUsageMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage{} + msg := &Resource_DiskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3347,12 +3347,12 @@ func TestResourceUsageMarshalTo(t *testing.T) { } } -func BenchmarkResourceUsageProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceUsage, 10000) + pops := make([]*Resource_DiskInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceUsage(popr, false) + pops[i] = NewPopulatedResource_DiskInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3365,18 +3365,18 @@ func BenchmarkResourceUsageProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceUsageProtoUnmarshal(b *testing.B) { +func BenchmarkResource_DiskInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceUsage(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceUsage{} + msg := &Resource_DiskInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3387,15 +3387,15 @@ func BenchmarkResourceUsageProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceUsage_ExecutorProto(t *testing.T) { +func TestResource_DiskInfo_PersistenceProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor(popr, false) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage_Executor{} + msg := &Resource_DiskInfo_Persistence{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3421,10 +3421,10 @@ func TestResourceUsage_ExecutorProto(t *testing.T) { } } -func TestResourceUsage_ExecutorMarshalTo(t *testing.T) { +func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor(popr, false) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3434,7 +3434,7 @@ func TestResourceUsage_ExecutorMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage_Executor{} + msg := &Resource_DiskInfo_Persistence{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3449,12 +3449,12 @@ func TestResourceUsage_ExecutorMarshalTo(t *testing.T) { } } -func BenchmarkResourceUsage_ExecutorProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_PersistenceProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceUsage_Executor, 10000) + pops := make([]*Resource_DiskInfo_Persistence, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceUsage_Executor(popr, false) + pops[i] = NewPopulatedResource_DiskInfo_Persistence(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3467,18 +3467,18 @@ func BenchmarkResourceUsage_ExecutorProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceUsage_ExecutorProtoUnmarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_PersistenceProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceUsage_Executor(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo_Persistence(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceUsage_Executor{} + msg := &Resource_DiskInfo_Persistence{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3489,15 +3489,15 @@ func BenchmarkResourceUsage_ExecutorProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestPerfStatisticsProto(t *testing.T) { +func TestResource_RevocableInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPerfStatistics(popr, false) + p := NewPopulatedResource_RevocableInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &PerfStatistics{} + msg := &Resource_RevocableInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3523,10 +3523,10 @@ func TestPerfStatisticsProto(t *testing.T) { } } -func TestPerfStatisticsMarshalTo(t *testing.T) { +func TestResource_RevocableInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPerfStatistics(popr, false) + p := NewPopulatedResource_RevocableInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3536,7 +3536,7 @@ func TestPerfStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &PerfStatistics{} + msg := &Resource_RevocableInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3551,12 +3551,12 @@ func TestPerfStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_RevocableInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*PerfStatistics, 10000) + pops := make([]*Resource_RevocableInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedPerfStatistics(popr, false) + pops[i] = NewPopulatedResource_RevocableInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3569,18 +3569,18 @@ func BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkPerfStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResource_RevocableInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPerfStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_RevocableInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &PerfStatistics{} + msg := &Resource_RevocableInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3591,15 +3591,15 @@ func BenchmarkPerfStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRequestProto(t *testing.T) { +func TestTrafficControlStatisticsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRequest(popr, false) + p := NewPopulatedTrafficControlStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Request{} + msg := &TrafficControlStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3625,10 +3625,10 @@ func TestRequestProto(t *testing.T) { } } -func TestRequestMarshalTo(t *testing.T) { +func TestTrafficControlStatisticsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRequest(popr, false) + p := NewPopulatedTrafficControlStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3638,7 +3638,7 @@ func TestRequestMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Request{} + msg := &TrafficControlStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3653,12 +3653,12 @@ func TestRequestMarshalTo(t *testing.T) { } } -func BenchmarkRequestProtoMarshal(b *testing.B) { +func BenchmarkTrafficControlStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Request, 10000) + pops := make([]*TrafficControlStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRequest(popr, false) + pops[i] = NewPopulatedTrafficControlStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3671,18 +3671,18 @@ func BenchmarkRequestProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRequestProtoUnmarshal(b *testing.B) { +func BenchmarkTrafficControlStatisticsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRequest(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTrafficControlStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Request{} + msg := &TrafficControlStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3693,15 +3693,15 @@ func BenchmarkRequestProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOfferProto(t *testing.T) { +func TestResourceStatisticsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer(popr, false) + p := NewPopulatedResourceStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer{} + msg := &ResourceStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3727,10 +3727,10 @@ func TestOfferProto(t *testing.T) { } } -func TestOfferMarshalTo(t *testing.T) { +func TestResourceStatisticsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer(popr, false) + p := NewPopulatedResourceStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3740,7 +3740,7 @@ func TestOfferMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer{} + msg := &ResourceStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3755,12 +3755,12 @@ func TestOfferMarshalTo(t *testing.T) { } } -func BenchmarkOfferProtoMarshal(b *testing.B) { +func BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer, 10000) + pops := make([]*ResourceStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer(popr, false) + pops[i] = NewPopulatedResourceStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3773,18 +3773,18 @@ func BenchmarkOfferProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOfferProtoUnmarshal(b *testing.B) { +func BenchmarkResourceStatisticsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer{} + msg := &ResourceStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3795,15 +3795,15 @@ func BenchmarkOfferProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_OperationProto(t *testing.T) { +func TestResourceUsageProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation(popr, false) + p := NewPopulatedResourceUsage(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation{} + msg := &ResourceUsage{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3829,10 +3829,10 @@ func TestOffer_OperationProto(t *testing.T) { } } -func TestOffer_OperationMarshalTo(t *testing.T) { +func TestResourceUsageMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation(popr, false) + p := NewPopulatedResourceUsage(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3842,7 +3842,7 @@ func TestOffer_OperationMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation{} + msg := &ResourceUsage{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3857,12 +3857,12 @@ func TestOffer_OperationMarshalTo(t *testing.T) { } } -func BenchmarkOffer_OperationProtoMarshal(b *testing.B) { +func BenchmarkResourceUsageProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation, 10000) + pops := make([]*ResourceUsage, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation(popr, false) + pops[i] = NewPopulatedResourceUsage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3875,18 +3875,18 @@ func BenchmarkOffer_OperationProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_OperationProtoUnmarshal(b *testing.B) { +func BenchmarkResourceUsageProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceUsage(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation{} + msg := &ResourceUsage{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3897,15 +3897,15 @@ func BenchmarkOffer_OperationProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_LaunchProto(t *testing.T) { +func TestResourceUsage_ExecutorProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Launch(popr, false) + p := NewPopulatedResourceUsage_Executor(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Launch{} + msg := &ResourceUsage_Executor{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3931,10 +3931,10 @@ func TestOffer_Operation_LaunchProto(t *testing.T) { } } -func TestOffer_Operation_LaunchMarshalTo(t *testing.T) { +func TestResourceUsage_ExecutorMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Launch(popr, false) + p := NewPopulatedResourceUsage_Executor(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3944,7 +3944,7 @@ func TestOffer_Operation_LaunchMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Launch{} + msg := &ResourceUsage_Executor{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3959,12 +3959,12 @@ func TestOffer_Operation_LaunchMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_LaunchProtoMarshal(b *testing.B) { +func BenchmarkResourceUsage_ExecutorProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Launch, 10000) + pops := make([]*ResourceUsage_Executor, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Launch(popr, false) + pops[i] = NewPopulatedResourceUsage_Executor(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3977,18 +3977,18 @@ func BenchmarkOffer_Operation_LaunchProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_LaunchProtoUnmarshal(b *testing.B) { +func BenchmarkResourceUsage_ExecutorProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Launch(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceUsage_Executor(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Launch{} + msg := &ResourceUsage_Executor{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3999,15 +3999,15 @@ func BenchmarkOffer_Operation_LaunchProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_ReserveProto(t *testing.T) { +func TestPerfStatisticsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Reserve(popr, false) + p := NewPopulatedPerfStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Reserve{} + msg := &PerfStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4033,10 +4033,10 @@ func TestOffer_Operation_ReserveProto(t *testing.T) { } } -func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { +func TestPerfStatisticsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Reserve(popr, false) + p := NewPopulatedPerfStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4046,7 +4046,7 @@ func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Reserve{} + msg := &PerfStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4061,12 +4061,12 @@ func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_ReserveProtoMarshal(b *testing.B) { +func BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Reserve, 10000) + pops := make([]*PerfStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Reserve(popr, false) + pops[i] = NewPopulatedPerfStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4079,18 +4079,18 @@ func BenchmarkOffer_Operation_ReserveProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_ReserveProtoUnmarshal(b *testing.B) { +func BenchmarkPerfStatisticsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Reserve(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPerfStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Reserve{} + msg := &PerfStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4101,15 +4101,15 @@ func BenchmarkOffer_Operation_ReserveProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_UnreserveProto(t *testing.T) { +func TestRequestProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Unreserve(popr, false) + p := NewPopulatedRequest(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Unreserve{} + msg := &Request{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4135,10 +4135,10 @@ func TestOffer_Operation_UnreserveProto(t *testing.T) { } } -func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { +func TestRequestMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Unreserve(popr, false) + p := NewPopulatedRequest(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4148,7 +4148,7 @@ func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Unreserve{} + msg := &Request{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4163,12 +4163,12 @@ func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_UnreserveProtoMarshal(b *testing.B) { +func BenchmarkRequestProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Unreserve, 10000) + pops := make([]*Request, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Unreserve(popr, false) + pops[i] = NewPopulatedRequest(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4181,18 +4181,18 @@ func BenchmarkOffer_Operation_UnreserveProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_UnreserveProtoUnmarshal(b *testing.B) { +func BenchmarkRequestProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Unreserve(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRequest(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Unreserve{} + msg := &Request{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4203,15 +4203,15 @@ func BenchmarkOffer_Operation_UnreserveProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_CreateProto(t *testing.T) { +func TestOfferProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Create(popr, false) + p := NewPopulatedOffer(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Create{} + msg := &Offer{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4237,10 +4237,10 @@ func TestOffer_Operation_CreateProto(t *testing.T) { } } -func TestOffer_Operation_CreateMarshalTo(t *testing.T) { +func TestOfferMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Create(popr, false) + p := NewPopulatedOffer(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4250,7 +4250,7 @@ func TestOffer_Operation_CreateMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Create{} + msg := &Offer{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4265,12 +4265,12 @@ func TestOffer_Operation_CreateMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_CreateProtoMarshal(b *testing.B) { +func BenchmarkOfferProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Create, 10000) + pops := make([]*Offer, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Create(popr, false) + pops[i] = NewPopulatedOffer(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4283,18 +4283,18 @@ func BenchmarkOffer_Operation_CreateProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_CreateProtoUnmarshal(b *testing.B) { +func BenchmarkOfferProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Create(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Create{} + msg := &Offer{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4305,15 +4305,15 @@ func BenchmarkOffer_Operation_CreateProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_DestroyProto(t *testing.T) { +func TestOffer_OperationProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Destroy(popr, false) + p := NewPopulatedOffer_Operation(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Destroy{} + msg := &Offer_Operation{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4339,10 +4339,10 @@ func TestOffer_Operation_DestroyProto(t *testing.T) { } } -func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { +func TestOffer_OperationMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Destroy(popr, false) + p := NewPopulatedOffer_Operation(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4352,7 +4352,7 @@ func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Destroy{} + msg := &Offer_Operation{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4367,12 +4367,12 @@ func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_DestroyProtoMarshal(b *testing.B) { +func BenchmarkOffer_OperationProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Destroy, 10000) + pops := make([]*Offer_Operation, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Destroy(popr, false) + pops[i] = NewPopulatedOffer_Operation(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4385,18 +4385,18 @@ func BenchmarkOffer_Operation_DestroyProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_DestroyProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_OperationProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Destroy(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Destroy{} + msg := &Offer_Operation{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4407,15 +4407,15 @@ func BenchmarkOffer_Operation_DestroyProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskInfoProto(t *testing.T) { +func TestOffer_Operation_LaunchProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskInfo(popr, false) + p := NewPopulatedOffer_Operation_Launch(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskInfo{} + msg := &Offer_Operation_Launch{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4441,10 +4441,10 @@ func TestTaskInfoProto(t *testing.T) { } } -func TestTaskInfoMarshalTo(t *testing.T) { +func TestOffer_Operation_LaunchMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskInfo(popr, false) + p := NewPopulatedOffer_Operation_Launch(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4454,7 +4454,7 @@ func TestTaskInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskInfo{} + msg := &Offer_Operation_Launch{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4469,12 +4469,12 @@ func TestTaskInfoMarshalTo(t *testing.T) { } } -func BenchmarkTaskInfoProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_LaunchProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskInfo, 10000) + pops := make([]*Offer_Operation_Launch, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTaskInfo(popr, false) + pops[i] = NewPopulatedOffer_Operation_Launch(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4487,18 +4487,18 @@ func BenchmarkTaskInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTaskInfoProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_LaunchProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Launch(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TaskInfo{} + msg := &Offer_Operation_Launch{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4509,15 +4509,15 @@ func BenchmarkTaskInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskStatusProto(t *testing.T) { +func TestOffer_Operation_ReserveProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskStatus(popr, false) + p := NewPopulatedOffer_Operation_Reserve(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskStatus{} + msg := &Offer_Operation_Reserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4543,10 +4543,10 @@ func TestTaskStatusProto(t *testing.T) { } } -func TestTaskStatusMarshalTo(t *testing.T) { +func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskStatus(popr, false) + p := NewPopulatedOffer_Operation_Reserve(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4556,7 +4556,7 @@ func TestTaskStatusMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskStatus{} + msg := &Offer_Operation_Reserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4571,12 +4571,12 @@ func TestTaskStatusMarshalTo(t *testing.T) { } } -func BenchmarkTaskStatusProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_ReserveProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskStatus, 10000) + pops := make([]*Offer_Operation_Reserve, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTaskStatus(popr, false) + pops[i] = NewPopulatedOffer_Operation_Reserve(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4589,18 +4589,18 @@ func BenchmarkTaskStatusProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTaskStatusProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_ReserveProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskStatus(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Reserve(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TaskStatus{} + msg := &Offer_Operation_Reserve{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4611,15 +4611,15 @@ func BenchmarkTaskStatusProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFiltersProto(t *testing.T) { +func TestOffer_Operation_UnreserveProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFilters(popr, false) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Filters{} + msg := &Offer_Operation_Unreserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4645,10 +4645,10 @@ func TestFiltersProto(t *testing.T) { } } -func TestFiltersMarshalTo(t *testing.T) { +func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFilters(popr, false) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4658,7 +4658,7 @@ func TestFiltersMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Filters{} + msg := &Offer_Operation_Unreserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4673,12 +4673,12 @@ func TestFiltersMarshalTo(t *testing.T) { } } -func BenchmarkFiltersProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_UnreserveProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Filters, 10000) + pops := make([]*Offer_Operation_Unreserve, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFilters(popr, false) + pops[i] = NewPopulatedOffer_Operation_Unreserve(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4691,18 +4691,18 @@ func BenchmarkFiltersProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkFiltersProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_UnreserveProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFilters(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Unreserve(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Filters{} + msg := &Offer_Operation_Unreserve{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4713,15 +4713,15 @@ func BenchmarkFiltersProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestEnvironmentProto(t *testing.T) { +func TestOffer_Operation_CreateProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment(popr, false) + p := NewPopulatedOffer_Operation_Create(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment{} + msg := &Offer_Operation_Create{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4747,10 +4747,10 @@ func TestEnvironmentProto(t *testing.T) { } } -func TestEnvironmentMarshalTo(t *testing.T) { +func TestOffer_Operation_CreateMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment(popr, false) + p := NewPopulatedOffer_Operation_Create(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4760,7 +4760,7 @@ func TestEnvironmentMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment{} + msg := &Offer_Operation_Create{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4775,12 +4775,12 @@ func TestEnvironmentMarshalTo(t *testing.T) { } } -func BenchmarkEnvironmentProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_CreateProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Environment, 10000) + pops := make([]*Offer_Operation_Create, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedEnvironment(popr, false) + pops[i] = NewPopulatedOffer_Operation_Create(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4793,18 +4793,18 @@ func BenchmarkEnvironmentProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkEnvironmentProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_CreateProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Create(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Environment{} + msg := &Offer_Operation_Create{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4815,15 +4815,15 @@ func BenchmarkEnvironmentProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestEnvironment_VariableProto(t *testing.T) { +func TestOffer_Operation_DestroyProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment_Variable(popr, false) + p := NewPopulatedOffer_Operation_Destroy(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment_Variable{} + msg := &Offer_Operation_Destroy{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4849,10 +4849,10 @@ func TestEnvironment_VariableProto(t *testing.T) { } } -func TestEnvironment_VariableMarshalTo(t *testing.T) { +func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment_Variable(popr, false) + p := NewPopulatedOffer_Operation_Destroy(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4862,7 +4862,7 @@ func TestEnvironment_VariableMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment_Variable{} + msg := &Offer_Operation_Destroy{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4877,12 +4877,12 @@ func TestEnvironment_VariableMarshalTo(t *testing.T) { } } -func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_DestroyProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Environment_Variable, 10000) + pops := make([]*Offer_Operation_Destroy, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedEnvironment_Variable(popr, false) + pops[i] = NewPopulatedOffer_Operation_Destroy(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4895,18 +4895,18 @@ func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkEnvironment_VariableProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_DestroyProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment_Variable(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Destroy(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Environment_Variable{} + msg := &Offer_Operation_Destroy{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4917,15 +4917,15 @@ func BenchmarkEnvironment_VariableProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestParameterProto(t *testing.T) { +func TestInverseOfferProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameter(popr, false) + p := NewPopulatedInverseOffer(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameter{} + msg := &InverseOffer{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4951,10 +4951,10 @@ func TestParameterProto(t *testing.T) { } } -func TestParameterMarshalTo(t *testing.T) { +func TestInverseOfferMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameter(popr, false) + p := NewPopulatedInverseOffer(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4964,7 +4964,7 @@ func TestParameterMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameter{} + msg := &InverseOffer{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4979,12 +4979,12 @@ func TestParameterMarshalTo(t *testing.T) { } } -func BenchmarkParameterProtoMarshal(b *testing.B) { +func BenchmarkInverseOfferProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Parameter, 10000) + pops := make([]*InverseOffer, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedParameter(popr, false) + pops[i] = NewPopulatedInverseOffer(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4997,18 +4997,18 @@ func BenchmarkParameterProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkParameterProtoUnmarshal(b *testing.B) { +func BenchmarkInverseOfferProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameter(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedInverseOffer(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Parameter{} + msg := &InverseOffer{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5019,15 +5019,15 @@ func BenchmarkParameterProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestParametersProto(t *testing.T) { +func TestTaskInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameters(popr, false) + p := NewPopulatedTaskInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameters{} + msg := &TaskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5053,10 +5053,10 @@ func TestParametersProto(t *testing.T) { } } -func TestParametersMarshalTo(t *testing.T) { +func TestTaskInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameters(popr, false) + p := NewPopulatedTaskInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5066,7 +5066,7 @@ func TestParametersMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameters{} + msg := &TaskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5081,12 +5081,12 @@ func TestParametersMarshalTo(t *testing.T) { } } -func BenchmarkParametersProtoMarshal(b *testing.B) { +func BenchmarkTaskInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Parameters, 10000) + pops := make([]*TaskInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedParameters(popr, false) + pops[i] = NewPopulatedTaskInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5099,18 +5099,18 @@ func BenchmarkParametersProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkParametersProtoUnmarshal(b *testing.B) { +func BenchmarkTaskInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameters(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Parameters{} + msg := &TaskInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5121,15 +5121,15 @@ func BenchmarkParametersProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCredentialProto(t *testing.T) { +func TestTaskStatusProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredential(popr, false) + p := NewPopulatedTaskStatus(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credential{} + msg := &TaskStatus{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5155,10 +5155,10 @@ func TestCredentialProto(t *testing.T) { } } -func TestCredentialMarshalTo(t *testing.T) { +func TestTaskStatusMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredential(popr, false) + p := NewPopulatedTaskStatus(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5168,7 +5168,7 @@ func TestCredentialMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credential{} + msg := &TaskStatus{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5183,12 +5183,12 @@ func TestCredentialMarshalTo(t *testing.T) { } } -func BenchmarkCredentialProtoMarshal(b *testing.B) { +func BenchmarkTaskStatusProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Credential, 10000) + pops := make([]*TaskStatus, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCredential(popr, false) + pops[i] = NewPopulatedTaskStatus(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5201,18 +5201,18 @@ func BenchmarkCredentialProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCredentialProtoUnmarshal(b *testing.B) { +func BenchmarkTaskStatusProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredential(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskStatus(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Credential{} + msg := &TaskStatus{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5223,15 +5223,15 @@ func BenchmarkCredentialProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCredentialsProto(t *testing.T) { +func TestFiltersProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredentials(popr, false) + p := NewPopulatedFilters(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credentials{} + msg := &Filters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5257,10 +5257,10 @@ func TestCredentialsProto(t *testing.T) { } } -func TestCredentialsMarshalTo(t *testing.T) { +func TestFiltersMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredentials(popr, false) + p := NewPopulatedFilters(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5270,7 +5270,7 @@ func TestCredentialsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credentials{} + msg := &Filters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5285,12 +5285,12 @@ func TestCredentialsMarshalTo(t *testing.T) { } } -func BenchmarkCredentialsProtoMarshal(b *testing.B) { +func BenchmarkFiltersProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Credentials, 10000) + pops := make([]*Filters, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCredentials(popr, false) + pops[i] = NewPopulatedFilters(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5303,18 +5303,18 @@ func BenchmarkCredentialsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCredentialsProtoUnmarshal(b *testing.B) { +func BenchmarkFiltersProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredentials(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFilters(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Credentials{} + msg := &Filters{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5325,15 +5325,15 @@ func BenchmarkCredentialsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRateLimitProto(t *testing.T) { +func TestEnvironmentProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimit(popr, false) + p := NewPopulatedEnvironment(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimit{} + msg := &Environment{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5359,10 +5359,10 @@ func TestRateLimitProto(t *testing.T) { } } -func TestRateLimitMarshalTo(t *testing.T) { +func TestEnvironmentMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimit(popr, false) + p := NewPopulatedEnvironment(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5372,7 +5372,7 @@ func TestRateLimitMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimit{} + msg := &Environment{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5387,12 +5387,12 @@ func TestRateLimitMarshalTo(t *testing.T) { } } -func BenchmarkRateLimitProtoMarshal(b *testing.B) { +func BenchmarkEnvironmentProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RateLimit, 10000) + pops := make([]*Environment, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRateLimit(popr, false) + pops[i] = NewPopulatedEnvironment(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5405,18 +5405,18 @@ func BenchmarkRateLimitProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRateLimitProtoUnmarshal(b *testing.B) { +func BenchmarkEnvironmentProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimit(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &RateLimit{} + msg := &Environment{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5427,15 +5427,15 @@ func BenchmarkRateLimitProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRateLimitsProto(t *testing.T) { +func TestEnvironment_VariableProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimits(popr, false) + p := NewPopulatedEnvironment_Variable(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimits{} + msg := &Environment_Variable{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5461,10 +5461,10 @@ func TestRateLimitsProto(t *testing.T) { } } -func TestRateLimitsMarshalTo(t *testing.T) { +func TestEnvironment_VariableMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimits(popr, false) + p := NewPopulatedEnvironment_Variable(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5474,7 +5474,7 @@ func TestRateLimitsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimits{} + msg := &Environment_Variable{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5489,12 +5489,12 @@ func TestRateLimitsMarshalTo(t *testing.T) { } } -func BenchmarkRateLimitsProtoMarshal(b *testing.B) { +func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RateLimits, 10000) + pops := make([]*Environment_Variable, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRateLimits(popr, false) + pops[i] = NewPopulatedEnvironment_Variable(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5507,18 +5507,18 @@ func BenchmarkRateLimitsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRateLimitsProtoUnmarshal(b *testing.B) { +func BenchmarkEnvironment_VariableProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimits(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment_Variable(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &RateLimits{} + msg := &Environment_Variable{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5529,15 +5529,15 @@ func BenchmarkRateLimitsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestImageProto(t *testing.T) { +func TestParameterProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage(popr, false) + p := NewPopulatedParameter(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image{} + msg := &Parameter{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5563,10 +5563,10 @@ func TestImageProto(t *testing.T) { } } -func TestImageMarshalTo(t *testing.T) { +func TestParameterMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage(popr, false) + p := NewPopulatedParameter(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5576,7 +5576,7 @@ func TestImageMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image{} + msg := &Parameter{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5591,12 +5591,12 @@ func TestImageMarshalTo(t *testing.T) { } } -func BenchmarkImageProtoMarshal(b *testing.B) { +func BenchmarkParameterProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Image, 10000) + pops := make([]*Parameter, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedImage(popr, false) + pops[i] = NewPopulatedParameter(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5609,18 +5609,18 @@ func BenchmarkImageProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkImageProtoUnmarshal(b *testing.B) { +func BenchmarkParameterProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedImage(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameter(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Image{} + msg := &Parameter{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5631,15 +5631,15 @@ func BenchmarkImageProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestImage_AppCProto(t *testing.T) { +func TestParametersProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_AppC(popr, false) + p := NewPopulatedParameters(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_AppC{} + msg := &Parameters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5665,10 +5665,10 @@ func TestImage_AppCProto(t *testing.T) { } } -func TestImage_AppCMarshalTo(t *testing.T) { +func TestParametersMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_AppC(popr, false) + p := NewPopulatedParameters(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5678,7 +5678,7 @@ func TestImage_AppCMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_AppC{} + msg := &Parameters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5693,12 +5693,12 @@ func TestImage_AppCMarshalTo(t *testing.T) { } } -func BenchmarkImage_AppCProtoMarshal(b *testing.B) { +func BenchmarkParametersProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Image_AppC, 10000) + pops := make([]*Parameters, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedImage_AppC(popr, false) + pops[i] = NewPopulatedParameters(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5711,18 +5711,18 @@ func BenchmarkImage_AppCProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkImage_AppCProtoUnmarshal(b *testing.B) { +func BenchmarkParametersProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedImage_AppC(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameters(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Image_AppC{} + msg := &Parameters{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5733,15 +5733,15 @@ func BenchmarkImage_AppCProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestImage_DockerProto(t *testing.T) { +func TestCredentialProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, false) + p := NewPopulatedCredential(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_Docker{} + msg := &Credential{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5767,10 +5767,10 @@ func TestImage_DockerProto(t *testing.T) { } } -func TestImage_DockerMarshalTo(t *testing.T) { +func TestCredentialMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, false) + p := NewPopulatedCredential(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5780,7 +5780,7 @@ func TestImage_DockerMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_Docker{} + msg := &Credential{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5795,12 +5795,12 @@ func TestImage_DockerMarshalTo(t *testing.T) { } } -func BenchmarkImage_DockerProtoMarshal(b *testing.B) { +func BenchmarkCredentialProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Image_Docker, 10000) + pops := make([]*Credential, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedImage_Docker(popr, false) + pops[i] = NewPopulatedCredential(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5813,18 +5813,18 @@ func BenchmarkImage_DockerProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkImage_DockerProtoUnmarshal(b *testing.B) { +func BenchmarkCredentialProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedImage_Docker(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredential(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Image_Docker{} + msg := &Credential{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5835,15 +5835,15 @@ func BenchmarkImage_DockerProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestVolumeProto(t *testing.T) { +func TestCredentialsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, false) + p := NewPopulatedCredentials(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume{} + msg := &Credentials{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5869,10 +5869,10 @@ func TestVolumeProto(t *testing.T) { } } -func TestVolumeMarshalTo(t *testing.T) { +func TestCredentialsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, false) + p := NewPopulatedCredentials(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5882,7 +5882,7 @@ func TestVolumeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume{} + msg := &Credentials{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5897,12 +5897,12 @@ func TestVolumeMarshalTo(t *testing.T) { } } -func BenchmarkVolumeProtoMarshal(b *testing.B) { +func BenchmarkCredentialsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Volume, 10000) + pops := make([]*Credentials, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolume(popr, false) + pops[i] = NewPopulatedCredentials(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5915,18 +5915,18 @@ func BenchmarkVolumeProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkVolumeProtoUnmarshal(b *testing.B) { +func BenchmarkCredentialsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolume(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredentials(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Volume{} + msg := &Credentials{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5937,15 +5937,15 @@ func BenchmarkVolumeProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfoProto(t *testing.T) { +func TestRateLimitProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo(popr, false) + p := NewPopulatedRateLimit(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo{} + msg := &RateLimit{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5971,10 +5971,10 @@ func TestContainerInfoProto(t *testing.T) { } } -func TestContainerInfoMarshalTo(t *testing.T) { +func TestRateLimitMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo(popr, false) + p := NewPopulatedRateLimit(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5984,7 +5984,7 @@ func TestContainerInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo{} + msg := &RateLimit{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5999,12 +5999,12 @@ func TestContainerInfoMarshalTo(t *testing.T) { } } -func BenchmarkContainerInfoProtoMarshal(b *testing.B) { +func BenchmarkRateLimitProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo, 10000) + pops := make([]*RateLimit, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainerInfo(popr, false) + pops[i] = NewPopulatedRateLimit(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6017,18 +6017,18 @@ func BenchmarkContainerInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkContainerInfoProtoUnmarshal(b *testing.B) { +func BenchmarkRateLimitProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimit(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ContainerInfo{} + msg := &RateLimit{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6039,15 +6039,15 @@ func BenchmarkContainerInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfoProto(t *testing.T) { +func TestRateLimitsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo(popr, false) + p := NewPopulatedRateLimits(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo{} + msg := &RateLimits{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6073,10 +6073,10 @@ func TestContainerInfo_DockerInfoProto(t *testing.T) { } } -func TestContainerInfo_DockerInfoMarshalTo(t *testing.T) { +func TestRateLimitsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo(popr, false) + p := NewPopulatedRateLimits(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6086,7 +6086,7 @@ func TestContainerInfo_DockerInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo{} + msg := &RateLimits{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6101,12 +6101,12 @@ func TestContainerInfo_DockerInfoMarshalTo(t *testing.T) { } } -func BenchmarkContainerInfo_DockerInfoProtoMarshal(b *testing.B) { +func BenchmarkRateLimitsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo_DockerInfo, 10000) + pops := make([]*RateLimits, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainerInfo_DockerInfo(popr, false) + pops[i] = NewPopulatedRateLimits(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6119,18 +6119,18 @@ func BenchmarkContainerInfo_DockerInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkContainerInfo_DockerInfoProtoUnmarshal(b *testing.B) { +func BenchmarkRateLimitsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_DockerInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimits(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ContainerInfo_DockerInfo{} + msg := &RateLimits{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6141,15 +6141,15 @@ func BenchmarkContainerInfo_DockerInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfo_PortMappingProto(t *testing.T) { +func TestImageProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + p := NewPopulatedImage(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Image{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6175,10 +6175,10 @@ func TestContainerInfo_DockerInfo_PortMappingProto(t *testing.T) { } } -func TestContainerInfo_DockerInfo_PortMappingMarshalTo(t *testing.T) { +func TestImageMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + p := NewPopulatedImage(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6188,7 +6188,7 @@ func TestContainerInfo_DockerInfo_PortMappingMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Image{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6203,12 +6203,12 @@ func TestContainerInfo_DockerInfo_PortMappingMarshalTo(t *testing.T) { } } -func BenchmarkContainerInfo_DockerInfo_PortMappingProtoMarshal(b *testing.B) { +func BenchmarkImageProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo_DockerInfo_PortMapping, 10000) + pops := make([]*Image, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + pops[i] = NewPopulatedImage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6221,18 +6221,18 @@ func BenchmarkContainerInfo_DockerInfo_PortMappingProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkContainerInfo_DockerInfo_PortMappingProtoUnmarshal(b *testing.B) { +func BenchmarkImageProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedImage(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Image{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6243,15 +6243,15 @@ func BenchmarkContainerInfo_DockerInfo_PortMappingProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_MesosInfoProto(t *testing.T) { +func TestImage_AppcProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_MesosInfo(popr, false) + p := NewPopulatedImage_Appc(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_MesosInfo{} + msg := &Image_Appc{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6277,10 +6277,10 @@ func TestContainerInfo_MesosInfoProto(t *testing.T) { } } -func TestContainerInfo_MesosInfoMarshalTo(t *testing.T) { +func TestImage_AppcMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_MesosInfo(popr, false) + p := NewPopulatedImage_Appc(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6290,7 +6290,7 @@ func TestContainerInfo_MesosInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_MesosInfo{} + msg := &Image_Appc{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6305,12 +6305,12 @@ func TestContainerInfo_MesosInfoMarshalTo(t *testing.T) { } } -func BenchmarkContainerInfo_MesosInfoProtoMarshal(b *testing.B) { +func BenchmarkImage_AppcProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo_MesosInfo, 10000) + pops := make([]*Image_Appc, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainerInfo_MesosInfo(popr, false) + pops[i] = NewPopulatedImage_Appc(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6323,18 +6323,18 @@ func BenchmarkContainerInfo_MesosInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkContainerInfo_MesosInfoProtoUnmarshal(b *testing.B) { +func BenchmarkImage_AppcProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_MesosInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedImage_Appc(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ContainerInfo_MesosInfo{} + msg := &Image_Appc{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6345,15 +6345,15 @@ func BenchmarkContainerInfo_MesosInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestLabelsProto(t *testing.T) { +func TestImage_DockerProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabels(popr, false) + p := NewPopulatedImage_Docker(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Labels{} + msg := &Image_Docker{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6379,10 +6379,10 @@ func TestLabelsProto(t *testing.T) { } } -func TestLabelsMarshalTo(t *testing.T) { +func TestImage_DockerMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabels(popr, false) + p := NewPopulatedImage_Docker(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6392,7 +6392,7 @@ func TestLabelsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Labels{} + msg := &Image_Docker{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6407,12 +6407,12 @@ func TestLabelsMarshalTo(t *testing.T) { } } -func BenchmarkLabelsProtoMarshal(b *testing.B) { +func BenchmarkImage_DockerProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Labels, 10000) + pops := make([]*Image_Docker, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLabels(popr, false) + pops[i] = NewPopulatedImage_Docker(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6425,18 +6425,18 @@ func BenchmarkLabelsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkLabelsProtoUnmarshal(b *testing.B) { +func BenchmarkImage_DockerProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLabels(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedImage_Docker(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Labels{} + msg := &Image_Docker{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6447,15 +6447,15 @@ func BenchmarkLabelsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestLabelProto(t *testing.T) { +func TestVolumeProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabel(popr, false) + p := NewPopulatedVolume(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Label{} + msg := &Volume{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6481,10 +6481,10 @@ func TestLabelProto(t *testing.T) { } } -func TestLabelMarshalTo(t *testing.T) { +func TestVolumeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabel(popr, false) + p := NewPopulatedVolume(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6494,7 +6494,7 @@ func TestLabelMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Label{} + msg := &Volume{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6509,12 +6509,12 @@ func TestLabelMarshalTo(t *testing.T) { } } -func BenchmarkLabelProtoMarshal(b *testing.B) { +func BenchmarkVolumeProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Label, 10000) + pops := make([]*Volume, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLabel(popr, false) + pops[i] = NewPopulatedVolume(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6527,18 +6527,18 @@ func BenchmarkLabelProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkLabelProtoUnmarshal(b *testing.B) { +func BenchmarkVolumeProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLabel(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolume(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Label{} + msg := &Volume{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6549,15 +6549,15 @@ func BenchmarkLabelProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestPortProto(t *testing.T) { +func TestNetworkInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPort(popr, false) + p := NewPopulatedNetworkInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Port{} + msg := &NetworkInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6583,10 +6583,10 @@ func TestPortProto(t *testing.T) { } } -func TestPortMarshalTo(t *testing.T) { +func TestNetworkInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPort(popr, false) + p := NewPopulatedNetworkInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6596,7 +6596,7 @@ func TestPortMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Port{} + msg := &NetworkInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6611,12 +6611,12 @@ func TestPortMarshalTo(t *testing.T) { } } -func BenchmarkPortProtoMarshal(b *testing.B) { +func BenchmarkNetworkInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Port, 10000) + pops := make([]*NetworkInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedPort(popr, false) + pops[i] = NewPopulatedNetworkInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6629,18 +6629,18 @@ func BenchmarkPortProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkPortProtoUnmarshal(b *testing.B) { +func BenchmarkNetworkInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPort(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNetworkInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Port{} + msg := &NetworkInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6651,15 +6651,15 @@ func BenchmarkPortProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestPortsProto(t *testing.T) { +func TestNetworkInfo_IPAddressProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPorts(popr, false) + p := NewPopulatedNetworkInfo_IPAddress(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Ports{} + msg := &NetworkInfo_IPAddress{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6685,10 +6685,10 @@ func TestPortsProto(t *testing.T) { } } -func TestPortsMarshalTo(t *testing.T) { +func TestNetworkInfo_IPAddressMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPorts(popr, false) + p := NewPopulatedNetworkInfo_IPAddress(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6698,7 +6698,7 @@ func TestPortsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Ports{} + msg := &NetworkInfo_IPAddress{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6713,12 +6713,12 @@ func TestPortsMarshalTo(t *testing.T) { } } -func BenchmarkPortsProtoMarshal(b *testing.B) { +func BenchmarkNetworkInfo_IPAddressProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Ports, 10000) + pops := make([]*NetworkInfo_IPAddress, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedPorts(popr, false) + pops[i] = NewPopulatedNetworkInfo_IPAddress(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6731,18 +6731,18 @@ func BenchmarkPortsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkPortsProtoUnmarshal(b *testing.B) { +func BenchmarkNetworkInfo_IPAddressProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPorts(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNetworkInfo_IPAddress(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Ports{} + msg := &NetworkInfo_IPAddress{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6753,15 +6753,15 @@ func BenchmarkPortsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestDiscoveryInfoProto(t *testing.T) { +func TestContainerInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDiscoveryInfo(popr, false) + p := NewPopulatedContainerInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &DiscoveryInfo{} + msg := &ContainerInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6787,10 +6787,10 @@ func TestDiscoveryInfoProto(t *testing.T) { } } -func TestDiscoveryInfoMarshalTo(t *testing.T) { +func TestContainerInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDiscoveryInfo(popr, false) + p := NewPopulatedContainerInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6800,7 +6800,7 @@ func TestDiscoveryInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &DiscoveryInfo{} + msg := &ContainerInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6815,12 +6815,12 @@ func TestDiscoveryInfoMarshalTo(t *testing.T) { } } -func BenchmarkDiscoveryInfoProtoMarshal(b *testing.B) { +func BenchmarkContainerInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*DiscoveryInfo, 10000) + pops := make([]*ContainerInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDiscoveryInfo(popr, false) + pops[i] = NewPopulatedContainerInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6833,18 +6833,18 @@ func BenchmarkDiscoveryInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkDiscoveryInfoProtoUnmarshal(b *testing.B) { +func BenchmarkContainerInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDiscoveryInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &DiscoveryInfo{} + msg := &ContainerInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6855,15 +6855,15 @@ func BenchmarkDiscoveryInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAppcImageManifestProto(t *testing.T) { +func TestContainerInfo_DockerInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest(popr, false) + p := NewPopulatedContainerInfo_DockerInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest{} + msg := &ContainerInfo_DockerInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6889,10 +6889,10 @@ func TestAppcImageManifestProto(t *testing.T) { } } -func TestAppcImageManifestMarshalTo(t *testing.T) { +func TestContainerInfo_DockerInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest(popr, false) + p := NewPopulatedContainerInfo_DockerInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6902,7 +6902,7 @@ func TestAppcImageManifestMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest{} + msg := &ContainerInfo_DockerInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6917,12 +6917,12 @@ func TestAppcImageManifestMarshalTo(t *testing.T) { } } -func BenchmarkAppcImageManifestProtoMarshal(b *testing.B) { +func BenchmarkContainerInfo_DockerInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*AppcImageManifest, 10000) + pops := make([]*ContainerInfo_DockerInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAppcImageManifest(popr, false) + pops[i] = NewPopulatedContainerInfo_DockerInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6935,18 +6935,18 @@ func BenchmarkAppcImageManifestProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAppcImageManifestProtoUnmarshal(b *testing.B) { +func BenchmarkContainerInfo_DockerInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAppcImageManifest(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_DockerInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &AppcImageManifest{} + msg := &ContainerInfo_DockerInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6957,15 +6957,15 @@ func BenchmarkAppcImageManifestProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAppcImageManifest_LabelProto(t *testing.T) { +func TestContainerInfo_DockerInfo_PortMappingProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Label(popr, false) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest_Label{} + msg := &ContainerInfo_DockerInfo_PortMapping{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6991,10 +6991,10 @@ func TestAppcImageManifest_LabelProto(t *testing.T) { } } -func TestAppcImageManifest_LabelMarshalTo(t *testing.T) { +func TestContainerInfo_DockerInfo_PortMappingMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Label(popr, false) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7004,7 +7004,7 @@ func TestAppcImageManifest_LabelMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest_Label{} + msg := &ContainerInfo_DockerInfo_PortMapping{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7019,12 +7019,12 @@ func TestAppcImageManifest_LabelMarshalTo(t *testing.T) { } } -func BenchmarkAppcImageManifest_LabelProtoMarshal(b *testing.B) { +func BenchmarkContainerInfo_DockerInfo_PortMappingProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*AppcImageManifest_Label, 10000) + pops := make([]*ContainerInfo_DockerInfo_PortMapping, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAppcImageManifest_Label(popr, false) + pops[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7037,18 +7037,18 @@ func BenchmarkAppcImageManifest_LabelProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAppcImageManifest_LabelProtoUnmarshal(b *testing.B) { +func BenchmarkContainerInfo_DockerInfo_PortMappingProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAppcImageManifest_Label(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &AppcImageManifest_Label{} + msg := &ContainerInfo_DockerInfo_PortMapping{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7059,15 +7059,15 @@ func BenchmarkAppcImageManifest_LabelProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAppcImageManifest_AnnotationProto(t *testing.T) { +func TestContainerInfo_MesosInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Annotation(popr, false) + p := NewPopulatedContainerInfo_MesosInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest_Annotation{} + msg := &ContainerInfo_MesosInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7093,10 +7093,10 @@ func TestAppcImageManifest_AnnotationProto(t *testing.T) { } } -func TestAppcImageManifest_AnnotationMarshalTo(t *testing.T) { +func TestContainerInfo_MesosInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Annotation(popr, false) + p := NewPopulatedContainerInfo_MesosInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7106,7 +7106,7 @@ func TestAppcImageManifest_AnnotationMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest_Annotation{} + msg := &ContainerInfo_MesosInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7121,12 +7121,12 @@ func TestAppcImageManifest_AnnotationMarshalTo(t *testing.T) { } } -func BenchmarkAppcImageManifest_AnnotationProtoMarshal(b *testing.B) { +func BenchmarkContainerInfo_MesosInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*AppcImageManifest_Annotation, 10000) + pops := make([]*ContainerInfo_MesosInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAppcImageManifest_Annotation(popr, false) + pops[i] = NewPopulatedContainerInfo_MesosInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7139,18 +7139,18 @@ func BenchmarkAppcImageManifest_AnnotationProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAppcImageManifest_AnnotationProtoUnmarshal(b *testing.B) { +func BenchmarkContainerInfo_MesosInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAppcImageManifest_Annotation(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_MesosInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &AppcImageManifest_Annotation{} + msg := &ContainerInfo_MesosInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7161,583 +7161,934 @@ func BenchmarkAppcImageManifest_AnnotationProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkIDJSON(t *testing.T) { +func TestContainerStatusProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkID(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedContainerStatus(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &FrameworkID{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &ContainerStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestOfferIDJSON(t *testing.T) { + +func TestContainerStatusMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOfferID(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedContainerStatus(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &OfferID{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &ContainerStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestSlaveIDJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveID(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + +func BenchmarkContainerStatusProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerStatus, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainerStatus(popr, false) } - msg := &SlaveID{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainerStatusProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerStatus(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + msg := &ContainerStatus{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestTaskIDJSON(t *testing.T) { + +func TestLabelsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskID(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedLabels(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskID{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestExecutorIDJSON(t *testing.T) { + +func TestLabelsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorID(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + p := NewPopulatedLabels(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &ExecutorID{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainerIDJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerID(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerID{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAddressJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddress(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + +func BenchmarkLabelsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Labels, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLabels(popr, false) } - msg := &Address{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLabelsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLabels(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + msg := &Labels{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestURLJSON(t *testing.T) { + +func TestLabelProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedURL(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedLabel(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &URL{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestFrameworkInfoJSON(t *testing.T) { + +func TestLabelMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedLabel(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &FrameworkInfo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestFrameworkInfo_CapabilityJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo_Capability(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + +func BenchmarkLabelProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Label, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLabel(popr, false) } - msg := &FrameworkInfo_Capability{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLabelProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLabel(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + msg := &Label{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestHealthCheckJSON(t *testing.T) { + +func TestPortProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedPort(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &Port{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestHealthCheck_HTTPJSON(t *testing.T) { + +func TestPortMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_HTTP(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedPort(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck_HTTP{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &Port{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestCommandInfoJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CommandInfo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + +func BenchmarkPortProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Port, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedPort(popr, false) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkPortProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPort(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Port{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_URIJSON(t *testing.T) { + +func TestPortsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_URI(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedPorts(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_URI{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestCommandInfo_ContainerInfoJSON(t *testing.T) { + +func TestPortsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_ContainerInfo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedPorts(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_ContainerInfo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestExecutorInfoJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorInfo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + +func BenchmarkPortsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Ports, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedPorts(popr, false) } - msg := &ExecutorInfo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkPortsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPorts(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + msg := &Ports{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestMasterInfoJSON(t *testing.T) { + +func TestDiscoveryInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterInfo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedDiscoveryInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &MasterInfo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestSlaveInfoJSON(t *testing.T) { + +func TestDiscoveryInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveInfo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedDiscoveryInfo(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &SlaveInfo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestValueJSON(t *testing.T) { + +func BenchmarkDiscoveryInfoProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DiscoveryInfo, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDiscoveryInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDiscoveryInfoProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDiscoveryInfo(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DiscoveryInfo{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAppcImageManifestProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedAppcImageManifest(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &AppcImageManifest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestValue_ScalarJSON(t *testing.T) { + +func TestAppcImageManifestMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Scalar(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + p := NewPopulatedAppcImageManifest(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &Value_Scalar{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestValue_RangeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Range(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { + msg := &AppcImageManifest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Range{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestValue_RangesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Ranges(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + +func BenchmarkAppcImageManifestProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AppcImageManifest, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAppcImageManifest(popr, false) } - msg := &Value_Ranges{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAppcImageManifestProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAppcImageManifest(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + msg := &AppcImageManifest{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestValue_SetJSON(t *testing.T) { + +func TestAppcImageManifest_LabelProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Set(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedAppcImageManifest_Label(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Set{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &AppcImageManifest_Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestValue_TextJSON(t *testing.T) { + +func TestAppcImageManifest_LabelMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Text(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedAppcImageManifest_Label(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Text{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &AppcImageManifest_Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAttributeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAttribute(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + +func BenchmarkAppcImageManifest_LabelProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AppcImageManifest_Label, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAppcImageManifest_Label(popr, false) } - msg := &Attribute{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAppcImageManifest_LabelProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAppcImageManifest_Label(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + msg := &AppcImageManifest_Label{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestResourceJSON(t *testing.T) { + +func TestAppcImageManifest_AnnotationProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedAppcImageManifest_Annotation(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &AppcImageManifest_Annotation{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestResource_ReservationInfoJSON(t *testing.T) { + +func TestAppcImageManifest_AnnotationMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_ReservationInfo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) + p := NewPopulatedAppcImageManifest_Annotation(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_ReservationInfo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { + msg := &AppcImageManifest_Annotation{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } + for i := range data { + data[i] = byte(popr.Intn(256)) + } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestResource_DiskInfoJSON(t *testing.T) { + +func BenchmarkAppcImageManifest_AnnotationProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AppcImageManifest_Annotation, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAppcImageManifest_Annotation(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAppcImageManifest_AnnotationProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAppcImageManifest_Annotation(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AppcImageManifest_Annotation{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFrameworkIDJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo(popr, true) + p := NewPopulatedFrameworkID(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo{} + msg := &FrameworkID{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7749,16 +8100,16 @@ func TestResource_DiskInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestResource_DiskInfo_PersistenceJSON(t *testing.T) { +func TestOfferIDJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Persistence(popr, true) + p := NewPopulatedOfferID(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Persistence{} + msg := &OfferID{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7770,16 +8121,16 @@ func TestResource_DiskInfo_PersistenceJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestResource_RevocableInfoJSON(t *testing.T) { +func TestSlaveIDJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_RevocableInfo(popr, true) + p := NewPopulatedSlaveID(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_RevocableInfo{} + msg := &SlaveID{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7791,16 +8142,16 @@ func TestResource_RevocableInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestTrafficControlStatisticsJSON(t *testing.T) { +func TestTaskIDJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTrafficControlStatistics(popr, true) + p := NewPopulatedTaskID(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TrafficControlStatistics{} + msg := &TaskID{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7812,16 +8163,16 @@ func TestTrafficControlStatisticsJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestResourceStatisticsJSON(t *testing.T) { +func TestExecutorIDJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceStatistics(popr, true) + p := NewPopulatedExecutorID(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceStatistics{} + msg := &ExecutorID{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7833,16 +8184,16 @@ func TestResourceStatisticsJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestResourceUsageJSON(t *testing.T) { +func TestContainerIDJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage(popr, true) + p := NewPopulatedContainerID(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage{} + msg := &ContainerID{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7854,16 +8205,16 @@ func TestResourceUsageJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestResourceUsage_ExecutorJSON(t *testing.T) { +func TestTimeInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor(popr, true) + p := NewPopulatedTimeInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage_Executor{} + msg := &TimeInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7875,16 +8226,16 @@ func TestResourceUsage_ExecutorJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestPerfStatisticsJSON(t *testing.T) { +func TestDurationInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPerfStatistics(popr, true) + p := NewPopulatedDurationInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &PerfStatistics{} + msg := &DurationInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7896,16 +8247,16 @@ func TestPerfStatisticsJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestRequestJSON(t *testing.T) { +func TestAddressJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRequest(popr, true) + p := NewPopulatedAddress(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Request{} + msg := &Address{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7917,16 +8268,16 @@ func TestRequestJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOfferJSON(t *testing.T) { +func TestURLJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer(popr, true) + p := NewPopulatedURL(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer{} + msg := &URL{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7938,16 +8289,16 @@ func TestOfferJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOffer_OperationJSON(t *testing.T) { +func TestUnavailabilityJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation(popr, true) + p := NewPopulatedUnavailability(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation{} + msg := &Unavailability{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7959,16 +8310,16 @@ func TestOffer_OperationJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOffer_Operation_LaunchJSON(t *testing.T) { +func TestMachineIDJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Launch(popr, true) + p := NewPopulatedMachineID(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Launch{} + msg := &MachineID{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -7980,16 +8331,16 @@ func TestOffer_Operation_LaunchJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOffer_Operation_ReserveJSON(t *testing.T) { +func TestMachineInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Reserve(popr, true) + p := NewPopulatedMachineInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Reserve{} + msg := &MachineInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8001,16 +8352,16 @@ func TestOffer_Operation_ReserveJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOffer_Operation_UnreserveJSON(t *testing.T) { +func TestFrameworkInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Unreserve(popr, true) + p := NewPopulatedFrameworkInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Unreserve{} + msg := &FrameworkInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8022,16 +8373,16 @@ func TestOffer_Operation_UnreserveJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOffer_Operation_CreateJSON(t *testing.T) { +func TestFrameworkInfo_CapabilityJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Create(popr, true) + p := NewPopulatedFrameworkInfo_Capability(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Create{} + msg := &FrameworkInfo_Capability{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8043,16 +8394,16 @@ func TestOffer_Operation_CreateJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOffer_Operation_DestroyJSON(t *testing.T) { +func TestHealthCheckJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Destroy(popr, true) + p := NewPopulatedHealthCheck(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Destroy{} + msg := &HealthCheck{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8064,16 +8415,16 @@ func TestOffer_Operation_DestroyJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestTaskInfoJSON(t *testing.T) { +func TestHealthCheck_HTTPJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskInfo(popr, true) + p := NewPopulatedHealthCheck_HTTP(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskInfo{} + msg := &HealthCheck_HTTP{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8085,16 +8436,16 @@ func TestTaskInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestTaskStatusJSON(t *testing.T) { +func TestCommandInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskStatus(popr, true) + p := NewPopulatedCommandInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskStatus{} + msg := &CommandInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8106,16 +8457,16 @@ func TestTaskStatusJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestFiltersJSON(t *testing.T) { +func TestCommandInfo_URIJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFilters(popr, true) + p := NewPopulatedCommandInfo_URI(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Filters{} + msg := &CommandInfo_URI{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8127,16 +8478,16 @@ func TestFiltersJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestEnvironmentJSON(t *testing.T) { +func TestCommandInfo_ContainerInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment(popr, true) + p := NewPopulatedCommandInfo_ContainerInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment{} + msg := &CommandInfo_ContainerInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8148,16 +8499,16 @@ func TestEnvironmentJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestEnvironment_VariableJSON(t *testing.T) { +func TestExecutorInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment_Variable(popr, true) + p := NewPopulatedExecutorInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment_Variable{} + msg := &ExecutorInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8169,16 +8520,16 @@ func TestEnvironment_VariableJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestParameterJSON(t *testing.T) { +func TestMasterInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameter(popr, true) + p := NewPopulatedMasterInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameter{} + msg := &MasterInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8190,16 +8541,16 @@ func TestParameterJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestParametersJSON(t *testing.T) { +func TestSlaveInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameters(popr, true) + p := NewPopulatedSlaveInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameters{} + msg := &SlaveInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8211,16 +8562,16 @@ func TestParametersJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestCredentialJSON(t *testing.T) { +func TestValueJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredential(popr, true) + p := NewPopulatedValue(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credential{} + msg := &Value{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8232,16 +8583,16 @@ func TestCredentialJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestCredentialsJSON(t *testing.T) { +func TestValue_ScalarJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredentials(popr, true) + p := NewPopulatedValue_Scalar(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credentials{} + msg := &Value_Scalar{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8253,16 +8604,16 @@ func TestCredentialsJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestRateLimitJSON(t *testing.T) { +func TestValue_RangeJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimit(popr, true) + p := NewPopulatedValue_Range(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimit{} + msg := &Value_Range{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8274,16 +8625,16 @@ func TestRateLimitJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestRateLimitsJSON(t *testing.T) { +func TestValue_RangesJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimits(popr, true) + p := NewPopulatedValue_Ranges(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimits{} + msg := &Value_Ranges{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8295,16 +8646,16 @@ func TestRateLimitsJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestImageJSON(t *testing.T) { +func TestValue_SetJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage(popr, true) + p := NewPopulatedValue_Set(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image{} + msg := &Value_Set{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8316,16 +8667,16 @@ func TestImageJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestImage_AppCJSON(t *testing.T) { +func TestValue_TextJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_AppC(popr, true) + p := NewPopulatedValue_Text(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_AppC{} + msg := &Value_Text{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8337,16 +8688,16 @@ func TestImage_AppCJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestImage_DockerJSON(t *testing.T) { +func TestAttributeJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, true) + p := NewPopulatedAttribute(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_Docker{} + msg := &Attribute{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8358,16 +8709,16 @@ func TestImage_DockerJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestVolumeJSON(t *testing.T) { +func TestResourceJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, true) + p := NewPopulatedResource(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume{} + msg := &Resource{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8379,16 +8730,16 @@ func TestVolumeJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestContainerInfoJSON(t *testing.T) { +func TestResource_ReservationInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo(popr, true) + p := NewPopulatedResource_ReservationInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo{} + msg := &Resource_ReservationInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8400,16 +8751,16 @@ func TestContainerInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestContainerInfo_DockerInfoJSON(t *testing.T) { +func TestResource_DiskInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo(popr, true) + p := NewPopulatedResource_DiskInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo{} + msg := &Resource_DiskInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8421,16 +8772,16 @@ func TestContainerInfo_DockerInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestContainerInfo_DockerInfo_PortMappingJSON(t *testing.T) { +func TestResource_DiskInfo_PersistenceJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + p := NewPopulatedResource_DiskInfo_Persistence(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Resource_DiskInfo_Persistence{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8442,16 +8793,16 @@ func TestContainerInfo_DockerInfo_PortMappingJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestContainerInfo_MesosInfoJSON(t *testing.T) { +func TestResource_RevocableInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_MesosInfo(popr, true) + p := NewPopulatedResource_RevocableInfo(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_MesosInfo{} + msg := &Resource_RevocableInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8463,16 +8814,16 @@ func TestContainerInfo_MesosInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestLabelsJSON(t *testing.T) { +func TestTrafficControlStatisticsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabels(popr, true) + p := NewPopulatedTrafficControlStatistics(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Labels{} + msg := &TrafficControlStatistics{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8484,16 +8835,16 @@ func TestLabelsJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestLabelJSON(t *testing.T) { +func TestResourceStatisticsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabel(popr, true) + p := NewPopulatedResourceStatistics(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Label{} + msg := &ResourceStatistics{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8505,16 +8856,16 @@ func TestLabelJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestPortJSON(t *testing.T) { +func TestResourceUsageJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPort(popr, true) + p := NewPopulatedResourceUsage(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Port{} + msg := &ResourceUsage{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8526,16 +8877,16 @@ func TestPortJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestPortsJSON(t *testing.T) { +func TestResourceUsage_ExecutorJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPorts(popr, true) + p := NewPopulatedResourceUsage_Executor(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Ports{} + msg := &ResourceUsage_Executor{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8547,16 +8898,16 @@ func TestPortsJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestDiscoveryInfoJSON(t *testing.T) { +func TestPerfStatisticsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDiscoveryInfo(popr, true) + p := NewPopulatedPerfStatistics(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &DiscoveryInfo{} + msg := &PerfStatistics{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8568,16 +8919,16 @@ func TestDiscoveryInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestAppcImageManifestJSON(t *testing.T) { +func TestRequestJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest(popr, true) + p := NewPopulatedRequest(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest{} + msg := &Request{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8589,16 +8940,16 @@ func TestAppcImageManifestJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestAppcImageManifest_LabelJSON(t *testing.T) { +func TestOfferJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Label(popr, true) + p := NewPopulatedOffer(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest_Label{} + msg := &Offer{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8610,16 +8961,16 @@ func TestAppcImageManifest_LabelJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestAppcImageManifest_AnnotationJSON(t *testing.T) { +func TestOffer_OperationJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Annotation(popr, true) + p := NewPopulatedOffer_Operation(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AppcImageManifest_Annotation{} + msg := &Offer_Operation{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -8631,624 +8982,768 @@ func TestAppcImageManifest_AnnotationJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestFrameworkIDProtoText(t *testing.T) { +func TestOffer_Operation_LaunchJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkID(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FrameworkID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedOffer_Operation_Launch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Launch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestFrameworkIDProtoCompactText(t *testing.T) { +func TestOffer_Operation_ReserveJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkID(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FrameworkID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedOffer_Operation_Reserve(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Reserve{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestOfferIDProtoText(t *testing.T) { +func TestOffer_Operation_UnreserveJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOfferID(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OfferID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedOffer_Operation_Unreserve(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Unreserve{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestOfferIDProtoCompactText(t *testing.T) { +func TestOffer_Operation_CreateJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOfferID(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OfferID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedOffer_Operation_Create(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Create{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestSlaveIDProtoText(t *testing.T) { +func TestOffer_Operation_DestroyJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveID(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SlaveID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedOffer_Operation_Destroy(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Destroy{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestSlaveIDProtoCompactText(t *testing.T) { +func TestInverseOfferJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveID(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SlaveID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedInverseOffer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &InverseOffer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestTaskIDProtoText(t *testing.T) { +func TestTaskInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskID(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TaskID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedTaskInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TaskInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestTaskIDProtoCompactText(t *testing.T) { +func TestTaskStatusJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskID(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TaskID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedTaskStatus(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TaskStatus{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestExecutorIDProtoText(t *testing.T) { +func TestFiltersJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorID(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ExecutorID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedFilters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Filters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestExecutorIDProtoCompactText(t *testing.T) { +func TestEnvironmentJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorID(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ExecutorID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedEnvironment(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Environment{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestContainerIDProtoText(t *testing.T) { +func TestEnvironment_VariableJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerID(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainerID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedEnvironment_Variable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Environment_Variable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestContainerIDProtoCompactText(t *testing.T) { +func TestParameterJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerID(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainerID{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedParameter(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Parameter{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestAddressProtoText(t *testing.T) { +func TestParametersJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddress(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Address{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedParameters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Parameters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestAddressProtoCompactText(t *testing.T) { +func TestCredentialJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddress(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Address{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedCredential(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Credential{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestURLProtoText(t *testing.T) { +func TestCredentialsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedURL(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &URL{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedCredentials(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Credentials{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestURLProtoCompactText(t *testing.T) { +func TestRateLimitJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedURL(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &URL{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedRateLimit(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RateLimit{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestFrameworkInfoProtoText(t *testing.T) { +func TestRateLimitsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FrameworkInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedRateLimits(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RateLimits{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestFrameworkInfoProtoCompactText(t *testing.T) { +func TestImageJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FrameworkInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedImage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Image{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestFrameworkInfo_CapabilityProtoText(t *testing.T) { +func TestImage_AppcJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo_Capability(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FrameworkInfo_Capability{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedImage_Appc(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Image_Appc{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestFrameworkInfo_CapabilityProtoCompactText(t *testing.T) { +func TestImage_DockerJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo_Capability(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FrameworkInfo_Capability{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedImage_Docker(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Image_Docker{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestHealthCheckProtoText(t *testing.T) { +func TestVolumeJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &HealthCheck{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedVolume(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Volume{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestHealthCheckProtoCompactText(t *testing.T) { +func TestNetworkInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &HealthCheck{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedNetworkInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NetworkInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestHealthCheck_HTTPProtoText(t *testing.T) { +func TestNetworkInfo_IPAddressJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_HTTP(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &HealthCheck_HTTP{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedNetworkInfo_IPAddress(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NetworkInfo_IPAddress{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestHealthCheck_HTTPProtoCompactText(t *testing.T) { +func TestContainerInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_HTTP(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &HealthCheck_HTTP{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedContainerInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCommandInfoProtoText(t *testing.T) { +func TestContainerInfo_DockerInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CommandInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedContainerInfo_DockerInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerInfo_DockerInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCommandInfoProtoCompactText(t *testing.T) { +func TestContainerInfo_DockerInfo_PortMappingJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CommandInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerInfo_DockerInfo_PortMapping{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCommandInfo_URIProtoText(t *testing.T) { +func TestContainerInfo_MesosInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_URI(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CommandInfo_URI{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedContainerInfo_MesosInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerInfo_MesosInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCommandInfo_URIProtoCompactText(t *testing.T) { +func TestContainerStatusJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_URI(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CommandInfo_URI{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedContainerStatus(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerStatus{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCommandInfo_ContainerInfoProtoText(t *testing.T) { +func TestLabelsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_ContainerInfo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CommandInfo_ContainerInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedLabels(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Labels{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCommandInfo_ContainerInfoProtoCompactText(t *testing.T) { +func TestLabelJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_ContainerInfo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CommandInfo_ContainerInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedLabel(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Label{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestExecutorInfoProtoText(t *testing.T) { +func TestPortJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorInfo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ExecutorInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedPort(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Port{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestExecutorInfoProtoCompactText(t *testing.T) { +func TestPortsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorInfo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ExecutorInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedPorts(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Ports{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestMasterInfoProtoText(t *testing.T) { +func TestDiscoveryInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterInfo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MasterInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedDiscoveryInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DiscoveryInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestMasterInfoProtoCompactText(t *testing.T) { +func TestAppcImageManifestJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterInfo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MasterInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedAppcImageManifest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AppcImageManifest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestSlaveInfoProtoText(t *testing.T) { +func TestAppcImageManifest_LabelJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveInfo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SlaveInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedAppcImageManifest_Label(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AppcImageManifest_Label{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestSlaveInfoProtoCompactText(t *testing.T) { +func TestAppcImageManifest_AnnotationJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveInfo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SlaveInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + p := NewPopulatedAppcImageManifest_Annotation(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AppcImageManifest_Annotation{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValueProtoText(t *testing.T) { +func TestFrameworkIDProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue(popr, true) + p := NewPopulatedFrameworkID(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Value{} + msg := &FrameworkID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9260,12 +9755,12 @@ func TestValueProtoText(t *testing.T) { } } -func TestValueProtoCompactText(t *testing.T) { +func TestFrameworkIDProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue(popr, true) + p := NewPopulatedFrameworkID(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Value{} + msg := &FrameworkID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9277,12 +9772,12 @@ func TestValueProtoCompactText(t *testing.T) { } } -func TestValue_ScalarProtoText(t *testing.T) { +func TestOfferIDProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Scalar(popr, true) + p := NewPopulatedOfferID(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Value_Scalar{} + msg := &OfferID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9294,12 +9789,12 @@ func TestValue_ScalarProtoText(t *testing.T) { } } -func TestValue_ScalarProtoCompactText(t *testing.T) { +func TestOfferIDProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Scalar(popr, true) + p := NewPopulatedOfferID(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Value_Scalar{} + msg := &OfferID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9311,12 +9806,12 @@ func TestValue_ScalarProtoCompactText(t *testing.T) { } } -func TestValue_RangeProtoText(t *testing.T) { +func TestSlaveIDProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Range(popr, true) + p := NewPopulatedSlaveID(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Value_Range{} + msg := &SlaveID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9328,12 +9823,12 @@ func TestValue_RangeProtoText(t *testing.T) { } } -func TestValue_RangeProtoCompactText(t *testing.T) { +func TestSlaveIDProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Range(popr, true) + p := NewPopulatedSlaveID(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Value_Range{} + msg := &SlaveID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9345,12 +9840,12 @@ func TestValue_RangeProtoCompactText(t *testing.T) { } } -func TestValue_RangesProtoText(t *testing.T) { +func TestTaskIDProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Ranges(popr, true) + p := NewPopulatedTaskID(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Value_Ranges{} + msg := &TaskID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9362,12 +9857,12 @@ func TestValue_RangesProtoText(t *testing.T) { } } -func TestValue_RangesProtoCompactText(t *testing.T) { +func TestTaskIDProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Ranges(popr, true) + p := NewPopulatedTaskID(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Value_Ranges{} + msg := &TaskID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9379,12 +9874,12 @@ func TestValue_RangesProtoCompactText(t *testing.T) { } } -func TestValue_SetProtoText(t *testing.T) { +func TestExecutorIDProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Set(popr, true) + p := NewPopulatedExecutorID(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Value_Set{} + msg := &ExecutorID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9396,12 +9891,12 @@ func TestValue_SetProtoText(t *testing.T) { } } -func TestValue_SetProtoCompactText(t *testing.T) { +func TestExecutorIDProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Set(popr, true) + p := NewPopulatedExecutorID(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Value_Set{} + msg := &ExecutorID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9413,12 +9908,12 @@ func TestValue_SetProtoCompactText(t *testing.T) { } } -func TestValue_TextProtoText(t *testing.T) { +func TestContainerIDProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Text(popr, true) + p := NewPopulatedContainerID(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Value_Text{} + msg := &ContainerID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9430,12 +9925,12 @@ func TestValue_TextProtoText(t *testing.T) { } } -func TestValue_TextProtoCompactText(t *testing.T) { +func TestContainerIDProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Text(popr, true) + p := NewPopulatedContainerID(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Value_Text{} + msg := &ContainerID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9447,12 +9942,12 @@ func TestValue_TextProtoCompactText(t *testing.T) { } } -func TestAttributeProtoText(t *testing.T) { +func TestTimeInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAttribute(popr, true) + p := NewPopulatedTimeInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Attribute{} + msg := &TimeInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9464,12 +9959,12 @@ func TestAttributeProtoText(t *testing.T) { } } -func TestAttributeProtoCompactText(t *testing.T) { +func TestTimeInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAttribute(popr, true) + p := NewPopulatedTimeInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Attribute{} + msg := &TimeInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9481,12 +9976,12 @@ func TestAttributeProtoCompactText(t *testing.T) { } } -func TestResourceProtoText(t *testing.T) { +func TestDurationInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource(popr, true) + p := NewPopulatedDurationInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Resource{} + msg := &DurationInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9498,12 +9993,12 @@ func TestResourceProtoText(t *testing.T) { } } -func TestResourceProtoCompactText(t *testing.T) { +func TestDurationInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource(popr, true) + p := NewPopulatedDurationInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Resource{} + msg := &DurationInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9515,12 +10010,12 @@ func TestResourceProtoCompactText(t *testing.T) { } } -func TestResource_ReservationInfoProtoText(t *testing.T) { +func TestAddressProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_ReservationInfo(popr, true) + p := NewPopulatedAddress(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Resource_ReservationInfo{} + msg := &Address{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9532,12 +10027,12 @@ func TestResource_ReservationInfoProtoText(t *testing.T) { } } -func TestResource_ReservationInfoProtoCompactText(t *testing.T) { +func TestAddressProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_ReservationInfo(popr, true) + p := NewPopulatedAddress(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Resource_ReservationInfo{} + msg := &Address{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9549,12 +10044,12 @@ func TestResource_ReservationInfoProtoCompactText(t *testing.T) { } } -func TestResource_DiskInfoProtoText(t *testing.T) { +func TestURLProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo(popr, true) + p := NewPopulatedURL(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Resource_DiskInfo{} + msg := &URL{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9566,12 +10061,12 @@ func TestResource_DiskInfoProtoText(t *testing.T) { } } -func TestResource_DiskInfoProtoCompactText(t *testing.T) { +func TestURLProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo(popr, true) + p := NewPopulatedURL(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Resource_DiskInfo{} + msg := &URL{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9583,12 +10078,12 @@ func TestResource_DiskInfoProtoCompactText(t *testing.T) { } } -func TestResource_DiskInfo_PersistenceProtoText(t *testing.T) { +func TestUnavailabilityProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Persistence(popr, true) + p := NewPopulatedUnavailability(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Resource_DiskInfo_Persistence{} + msg := &Unavailability{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9600,12 +10095,12 @@ func TestResource_DiskInfo_PersistenceProtoText(t *testing.T) { } } -func TestResource_DiskInfo_PersistenceProtoCompactText(t *testing.T) { +func TestUnavailabilityProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Persistence(popr, true) + p := NewPopulatedUnavailability(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Resource_DiskInfo_Persistence{} + msg := &Unavailability{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9617,12 +10112,12 @@ func TestResource_DiskInfo_PersistenceProtoCompactText(t *testing.T) { } } -func TestResource_RevocableInfoProtoText(t *testing.T) { +func TestMachineIDProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_RevocableInfo(popr, true) + p := NewPopulatedMachineID(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Resource_RevocableInfo{} + msg := &MachineID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9634,12 +10129,12 @@ func TestResource_RevocableInfoProtoText(t *testing.T) { } } -func TestResource_RevocableInfoProtoCompactText(t *testing.T) { +func TestMachineIDProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_RevocableInfo(popr, true) + p := NewPopulatedMachineID(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Resource_RevocableInfo{} + msg := &MachineID{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9651,12 +10146,12 @@ func TestResource_RevocableInfoProtoCompactText(t *testing.T) { } } -func TestTrafficControlStatisticsProtoText(t *testing.T) { +func TestMachineInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTrafficControlStatistics(popr, true) + p := NewPopulatedMachineInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TrafficControlStatistics{} + msg := &MachineInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9668,12 +10163,12 @@ func TestTrafficControlStatisticsProtoText(t *testing.T) { } } -func TestTrafficControlStatisticsProtoCompactText(t *testing.T) { +func TestMachineInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTrafficControlStatistics(popr, true) + p := NewPopulatedMachineInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TrafficControlStatistics{} + msg := &MachineInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9685,12 +10180,12 @@ func TestTrafficControlStatisticsProtoCompactText(t *testing.T) { } } -func TestResourceStatisticsProtoText(t *testing.T) { +func TestFrameworkInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceStatistics(popr, true) + p := NewPopulatedFrameworkInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ResourceStatistics{} + msg := &FrameworkInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9702,12 +10197,12 @@ func TestResourceStatisticsProtoText(t *testing.T) { } } -func TestResourceStatisticsProtoCompactText(t *testing.T) { +func TestFrameworkInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceStatistics(popr, true) + p := NewPopulatedFrameworkInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ResourceStatistics{} + msg := &FrameworkInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9719,12 +10214,12 @@ func TestResourceStatisticsProtoCompactText(t *testing.T) { } } -func TestResourceUsageProtoText(t *testing.T) { +func TestFrameworkInfo_CapabilityProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage(popr, true) + p := NewPopulatedFrameworkInfo_Capability(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ResourceUsage{} + msg := &FrameworkInfo_Capability{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9736,12 +10231,12 @@ func TestResourceUsageProtoText(t *testing.T) { } } -func TestResourceUsageProtoCompactText(t *testing.T) { +func TestFrameworkInfo_CapabilityProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage(popr, true) + p := NewPopulatedFrameworkInfo_Capability(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ResourceUsage{} + msg := &FrameworkInfo_Capability{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9753,12 +10248,12 @@ func TestResourceUsageProtoCompactText(t *testing.T) { } } -func TestResourceUsage_ExecutorProtoText(t *testing.T) { +func TestHealthCheckProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor(popr, true) + p := NewPopulatedHealthCheck(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ResourceUsage_Executor{} + msg := &HealthCheck{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9770,12 +10265,12 @@ func TestResourceUsage_ExecutorProtoText(t *testing.T) { } } -func TestResourceUsage_ExecutorProtoCompactText(t *testing.T) { +func TestHealthCheckProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor(popr, true) + p := NewPopulatedHealthCheck(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ResourceUsage_Executor{} + msg := &HealthCheck{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9787,12 +10282,12 @@ func TestResourceUsage_ExecutorProtoCompactText(t *testing.T) { } } -func TestPerfStatisticsProtoText(t *testing.T) { +func TestHealthCheck_HTTPProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPerfStatistics(popr, true) + p := NewPopulatedHealthCheck_HTTP(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PerfStatistics{} + msg := &HealthCheck_HTTP{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9804,12 +10299,12 @@ func TestPerfStatisticsProtoText(t *testing.T) { } } -func TestPerfStatisticsProtoCompactText(t *testing.T) { +func TestHealthCheck_HTTPProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPerfStatistics(popr, true) + p := NewPopulatedHealthCheck_HTTP(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PerfStatistics{} + msg := &HealthCheck_HTTP{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9821,12 +10316,12 @@ func TestPerfStatisticsProtoCompactText(t *testing.T) { } } -func TestRequestProtoText(t *testing.T) { +func TestCommandInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRequest(popr, true) + p := NewPopulatedCommandInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Request{} + msg := &CommandInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9838,12 +10333,12 @@ func TestRequestProtoText(t *testing.T) { } } -func TestRequestProtoCompactText(t *testing.T) { +func TestCommandInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRequest(popr, true) + p := NewPopulatedCommandInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Request{} + msg := &CommandInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9855,12 +10350,12 @@ func TestRequestProtoCompactText(t *testing.T) { } } -func TestOfferProtoText(t *testing.T) { +func TestCommandInfo_URIProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer(popr, true) + p := NewPopulatedCommandInfo_URI(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Offer{} + msg := &CommandInfo_URI{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9872,12 +10367,12 @@ func TestOfferProtoText(t *testing.T) { } } -func TestOfferProtoCompactText(t *testing.T) { +func TestCommandInfo_URIProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer(popr, true) + p := NewPopulatedCommandInfo_URI(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Offer{} + msg := &CommandInfo_URI{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9889,12 +10384,12 @@ func TestOfferProtoCompactText(t *testing.T) { } } -func TestOffer_OperationProtoText(t *testing.T) { +func TestCommandInfo_ContainerInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation(popr, true) + p := NewPopulatedCommandInfo_ContainerInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Offer_Operation{} + msg := &CommandInfo_ContainerInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9906,12 +10401,12 @@ func TestOffer_OperationProtoText(t *testing.T) { } } -func TestOffer_OperationProtoCompactText(t *testing.T) { +func TestCommandInfo_ContainerInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation(popr, true) + p := NewPopulatedCommandInfo_ContainerInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Offer_Operation{} + msg := &CommandInfo_ContainerInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9923,12 +10418,12 @@ func TestOffer_OperationProtoCompactText(t *testing.T) { } } -func TestOffer_Operation_LaunchProtoText(t *testing.T) { +func TestExecutorInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Launch(popr, true) + p := NewPopulatedExecutorInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Offer_Operation_Launch{} + msg := &ExecutorInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9940,12 +10435,12 @@ func TestOffer_Operation_LaunchProtoText(t *testing.T) { } } -func TestOffer_Operation_LaunchProtoCompactText(t *testing.T) { +func TestExecutorInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Launch(popr, true) + p := NewPopulatedExecutorInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Offer_Operation_Launch{} + msg := &ExecutorInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9957,12 +10452,12 @@ func TestOffer_Operation_LaunchProtoCompactText(t *testing.T) { } } -func TestOffer_Operation_ReserveProtoText(t *testing.T) { +func TestMasterInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Reserve(popr, true) + p := NewPopulatedMasterInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Offer_Operation_Reserve{} + msg := &MasterInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9974,12 +10469,12 @@ func TestOffer_Operation_ReserveProtoText(t *testing.T) { } } -func TestOffer_Operation_ReserveProtoCompactText(t *testing.T) { +func TestMasterInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Reserve(popr, true) + p := NewPopulatedMasterInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Offer_Operation_Reserve{} + msg := &MasterInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -9991,12 +10486,12 @@ func TestOffer_Operation_ReserveProtoCompactText(t *testing.T) { } } -func TestOffer_Operation_UnreserveProtoText(t *testing.T) { +func TestSlaveInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Unreserve(popr, true) + p := NewPopulatedSlaveInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Offer_Operation_Unreserve{} + msg := &SlaveInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10008,12 +10503,12 @@ func TestOffer_Operation_UnreserveProtoText(t *testing.T) { } } -func TestOffer_Operation_UnreserveProtoCompactText(t *testing.T) { +func TestSlaveInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Unreserve(popr, true) + p := NewPopulatedSlaveInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Offer_Operation_Unreserve{} + msg := &SlaveInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10025,12 +10520,12 @@ func TestOffer_Operation_UnreserveProtoCompactText(t *testing.T) { } } -func TestOffer_Operation_CreateProtoText(t *testing.T) { +func TestValueProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Create(popr, true) + p := NewPopulatedValue(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Offer_Operation_Create{} + msg := &Value{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10042,12 +10537,12 @@ func TestOffer_Operation_CreateProtoText(t *testing.T) { } } -func TestOffer_Operation_CreateProtoCompactText(t *testing.T) { +func TestValueProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Create(popr, true) + p := NewPopulatedValue(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Offer_Operation_Create{} + msg := &Value{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10059,12 +10554,12 @@ func TestOffer_Operation_CreateProtoCompactText(t *testing.T) { } } -func TestOffer_Operation_DestroyProtoText(t *testing.T) { +func TestValue_ScalarProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Destroy(popr, true) + p := NewPopulatedValue_Scalar(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Offer_Operation_Destroy{} + msg := &Value_Scalar{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10076,12 +10571,12 @@ func TestOffer_Operation_DestroyProtoText(t *testing.T) { } } -func TestOffer_Operation_DestroyProtoCompactText(t *testing.T) { +func TestValue_ScalarProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Destroy(popr, true) + p := NewPopulatedValue_Scalar(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Offer_Operation_Destroy{} + msg := &Value_Scalar{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10093,12 +10588,12 @@ func TestOffer_Operation_DestroyProtoCompactText(t *testing.T) { } } -func TestTaskInfoProtoText(t *testing.T) { +func TestValue_RangeProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskInfo(popr, true) + p := NewPopulatedValue_Range(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TaskInfo{} + msg := &Value_Range{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10110,12 +10605,12 @@ func TestTaskInfoProtoText(t *testing.T) { } } -func TestTaskInfoProtoCompactText(t *testing.T) { +func TestValue_RangeProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskInfo(popr, true) + p := NewPopulatedValue_Range(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TaskInfo{} + msg := &Value_Range{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10127,12 +10622,12 @@ func TestTaskInfoProtoCompactText(t *testing.T) { } } -func TestTaskStatusProtoText(t *testing.T) { +func TestValue_RangesProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskStatus(popr, true) + p := NewPopulatedValue_Ranges(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TaskStatus{} + msg := &Value_Ranges{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10144,12 +10639,12 @@ func TestTaskStatusProtoText(t *testing.T) { } } -func TestTaskStatusProtoCompactText(t *testing.T) { +func TestValue_RangesProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskStatus(popr, true) + p := NewPopulatedValue_Ranges(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TaskStatus{} + msg := &Value_Ranges{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10161,12 +10656,12 @@ func TestTaskStatusProtoCompactText(t *testing.T) { } } -func TestFiltersProtoText(t *testing.T) { +func TestValue_SetProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFilters(popr, true) + p := NewPopulatedValue_Set(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Filters{} + msg := &Value_Set{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10178,12 +10673,12 @@ func TestFiltersProtoText(t *testing.T) { } } -func TestFiltersProtoCompactText(t *testing.T) { +func TestValue_SetProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFilters(popr, true) + p := NewPopulatedValue_Set(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Filters{} + msg := &Value_Set{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10195,12 +10690,12 @@ func TestFiltersProtoCompactText(t *testing.T) { } } -func TestEnvironmentProtoText(t *testing.T) { +func TestValue_TextProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment(popr, true) + p := NewPopulatedValue_Text(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Environment{} + msg := &Value_Text{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10212,12 +10707,12 @@ func TestEnvironmentProtoText(t *testing.T) { } } -func TestEnvironmentProtoCompactText(t *testing.T) { +func TestValue_TextProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment(popr, true) + p := NewPopulatedValue_Text(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Environment{} + msg := &Value_Text{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10229,12 +10724,12 @@ func TestEnvironmentProtoCompactText(t *testing.T) { } } -func TestEnvironment_VariableProtoText(t *testing.T) { +func TestAttributeProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment_Variable(popr, true) + p := NewPopulatedAttribute(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Environment_Variable{} + msg := &Attribute{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10246,12 +10741,12 @@ func TestEnvironment_VariableProtoText(t *testing.T) { } } -func TestEnvironment_VariableProtoCompactText(t *testing.T) { +func TestAttributeProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment_Variable(popr, true) + p := NewPopulatedAttribute(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Environment_Variable{} + msg := &Attribute{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10263,12 +10758,12 @@ func TestEnvironment_VariableProtoCompactText(t *testing.T) { } } -func TestParameterProtoText(t *testing.T) { +func TestResourceProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameter(popr, true) + p := NewPopulatedResource(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Parameter{} + msg := &Resource{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10280,12 +10775,12 @@ func TestParameterProtoText(t *testing.T) { } } -func TestParameterProtoCompactText(t *testing.T) { +func TestResourceProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameter(popr, true) + p := NewPopulatedResource(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Parameter{} + msg := &Resource{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10297,12 +10792,12 @@ func TestParameterProtoCompactText(t *testing.T) { } } -func TestParametersProtoText(t *testing.T) { +func TestResource_ReservationInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameters(popr, true) + p := NewPopulatedResource_ReservationInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Parameters{} + msg := &Resource_ReservationInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10314,12 +10809,12 @@ func TestParametersProtoText(t *testing.T) { } } -func TestParametersProtoCompactText(t *testing.T) { +func TestResource_ReservationInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameters(popr, true) + p := NewPopulatedResource_ReservationInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Parameters{} + msg := &Resource_ReservationInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10331,12 +10826,12 @@ func TestParametersProtoCompactText(t *testing.T) { } } -func TestCredentialProtoText(t *testing.T) { +func TestResource_DiskInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredential(popr, true) + p := NewPopulatedResource_DiskInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Credential{} + msg := &Resource_DiskInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10348,12 +10843,12 @@ func TestCredentialProtoText(t *testing.T) { } } -func TestCredentialProtoCompactText(t *testing.T) { +func TestResource_DiskInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredential(popr, true) + p := NewPopulatedResource_DiskInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Credential{} + msg := &Resource_DiskInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10365,12 +10860,12 @@ func TestCredentialProtoCompactText(t *testing.T) { } } -func TestCredentialsProtoText(t *testing.T) { +func TestResource_DiskInfo_PersistenceProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredentials(popr, true) + p := NewPopulatedResource_DiskInfo_Persistence(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Credentials{} + msg := &Resource_DiskInfo_Persistence{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10382,12 +10877,12 @@ func TestCredentialsProtoText(t *testing.T) { } } -func TestCredentialsProtoCompactText(t *testing.T) { +func TestResource_DiskInfo_PersistenceProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredentials(popr, true) + p := NewPopulatedResource_DiskInfo_Persistence(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Credentials{} + msg := &Resource_DiskInfo_Persistence{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10399,12 +10894,12 @@ func TestCredentialsProtoCompactText(t *testing.T) { } } -func TestRateLimitProtoText(t *testing.T) { +func TestResource_RevocableInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimit(popr, true) + p := NewPopulatedResource_RevocableInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &RateLimit{} + msg := &Resource_RevocableInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10416,12 +10911,12 @@ func TestRateLimitProtoText(t *testing.T) { } } -func TestRateLimitProtoCompactText(t *testing.T) { +func TestResource_RevocableInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimit(popr, true) + p := NewPopulatedResource_RevocableInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &RateLimit{} + msg := &Resource_RevocableInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10433,12 +10928,12 @@ func TestRateLimitProtoCompactText(t *testing.T) { } } -func TestRateLimitsProtoText(t *testing.T) { +func TestTrafficControlStatisticsProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimits(popr, true) + p := NewPopulatedTrafficControlStatistics(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &RateLimits{} + msg := &TrafficControlStatistics{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10450,12 +10945,12 @@ func TestRateLimitsProtoText(t *testing.T) { } } -func TestRateLimitsProtoCompactText(t *testing.T) { +func TestTrafficControlStatisticsProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimits(popr, true) + p := NewPopulatedTrafficControlStatistics(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &RateLimits{} + msg := &TrafficControlStatistics{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10467,12 +10962,12 @@ func TestRateLimitsProtoCompactText(t *testing.T) { } } -func TestImageProtoText(t *testing.T) { +func TestResourceStatisticsProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage(popr, true) + p := NewPopulatedResourceStatistics(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Image{} + msg := &ResourceStatistics{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10484,12 +10979,12 @@ func TestImageProtoText(t *testing.T) { } } -func TestImageProtoCompactText(t *testing.T) { +func TestResourceStatisticsProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage(popr, true) + p := NewPopulatedResourceStatistics(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Image{} + msg := &ResourceStatistics{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10501,12 +10996,12 @@ func TestImageProtoCompactText(t *testing.T) { } } -func TestImage_AppCProtoText(t *testing.T) { +func TestResourceUsageProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_AppC(popr, true) + p := NewPopulatedResourceUsage(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Image_AppC{} + msg := &ResourceUsage{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10518,12 +11013,12 @@ func TestImage_AppCProtoText(t *testing.T) { } } -func TestImage_AppCProtoCompactText(t *testing.T) { +func TestResourceUsageProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_AppC(popr, true) + p := NewPopulatedResourceUsage(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Image_AppC{} + msg := &ResourceUsage{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10535,12 +11030,12 @@ func TestImage_AppCProtoCompactText(t *testing.T) { } } -func TestImage_DockerProtoText(t *testing.T) { +func TestResourceUsage_ExecutorProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, true) + p := NewPopulatedResourceUsage_Executor(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Image_Docker{} + msg := &ResourceUsage_Executor{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10552,12 +11047,12 @@ func TestImage_DockerProtoText(t *testing.T) { } } -func TestImage_DockerProtoCompactText(t *testing.T) { +func TestResourceUsage_ExecutorProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, true) + p := NewPopulatedResourceUsage_Executor(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Image_Docker{} + msg := &ResourceUsage_Executor{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10569,12 +11064,12 @@ func TestImage_DockerProtoCompactText(t *testing.T) { } } -func TestVolumeProtoText(t *testing.T) { +func TestPerfStatisticsProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, true) + p := NewPopulatedPerfStatistics(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Volume{} + msg := &PerfStatistics{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10586,12 +11081,12 @@ func TestVolumeProtoText(t *testing.T) { } } -func TestVolumeProtoCompactText(t *testing.T) { +func TestPerfStatisticsProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, true) + p := NewPopulatedPerfStatistics(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Volume{} + msg := &PerfStatistics{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10603,12 +11098,12 @@ func TestVolumeProtoCompactText(t *testing.T) { } } -func TestContainerInfoProtoText(t *testing.T) { +func TestRequestProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo(popr, true) + p := NewPopulatedRequest(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainerInfo{} + msg := &Request{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10620,12 +11115,12 @@ func TestContainerInfoProtoText(t *testing.T) { } } -func TestContainerInfoProtoCompactText(t *testing.T) { +func TestRequestProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo(popr, true) + p := NewPopulatedRequest(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainerInfo{} + msg := &Request{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10637,12 +11132,12 @@ func TestContainerInfoProtoCompactText(t *testing.T) { } } -func TestContainerInfo_DockerInfoProtoText(t *testing.T) { +func TestOfferProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo(popr, true) + p := NewPopulatedOffer(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainerInfo_DockerInfo{} + msg := &Offer{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10654,12 +11149,12 @@ func TestContainerInfo_DockerInfoProtoText(t *testing.T) { } } -func TestContainerInfo_DockerInfoProtoCompactText(t *testing.T) { +func TestOfferProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo(popr, true) + p := NewPopulatedOffer(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainerInfo_DockerInfo{} + msg := &Offer{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10671,12 +11166,12 @@ func TestContainerInfo_DockerInfoProtoCompactText(t *testing.T) { } } -func TestContainerInfo_DockerInfo_PortMappingProtoText(t *testing.T) { +func TestOffer_OperationProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + p := NewPopulatedOffer_Operation(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Offer_Operation{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10688,12 +11183,12 @@ func TestContainerInfo_DockerInfo_PortMappingProtoText(t *testing.T) { } } -func TestContainerInfo_DockerInfo_PortMappingProtoCompactText(t *testing.T) { +func TestOffer_OperationProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + p := NewPopulatedOffer_Operation(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Offer_Operation{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10705,12 +11200,12 @@ func TestContainerInfo_DockerInfo_PortMappingProtoCompactText(t *testing.T) { } } -func TestContainerInfo_MesosInfoProtoText(t *testing.T) { +func TestOffer_Operation_LaunchProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_MesosInfo(popr, true) + p := NewPopulatedOffer_Operation_Launch(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainerInfo_MesosInfo{} + msg := &Offer_Operation_Launch{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10722,12 +11217,12 @@ func TestContainerInfo_MesosInfoProtoText(t *testing.T) { } } -func TestContainerInfo_MesosInfoProtoCompactText(t *testing.T) { +func TestOffer_Operation_LaunchProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_MesosInfo(popr, true) + p := NewPopulatedOffer_Operation_Launch(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainerInfo_MesosInfo{} + msg := &Offer_Operation_Launch{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10739,12 +11234,12 @@ func TestContainerInfo_MesosInfoProtoCompactText(t *testing.T) { } } -func TestLabelsProtoText(t *testing.T) { +func TestOffer_Operation_ReserveProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabels(popr, true) + p := NewPopulatedOffer_Operation_Reserve(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Labels{} + msg := &Offer_Operation_Reserve{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10756,12 +11251,12 @@ func TestLabelsProtoText(t *testing.T) { } } -func TestLabelsProtoCompactText(t *testing.T) { +func TestOffer_Operation_ReserveProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabels(popr, true) + p := NewPopulatedOffer_Operation_Reserve(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Labels{} + msg := &Offer_Operation_Reserve{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10773,12 +11268,12 @@ func TestLabelsProtoCompactText(t *testing.T) { } } -func TestLabelProtoText(t *testing.T) { +func TestOffer_Operation_UnreserveProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabel(popr, true) + p := NewPopulatedOffer_Operation_Unreserve(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Label{} + msg := &Offer_Operation_Unreserve{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10790,12 +11285,12 @@ func TestLabelProtoText(t *testing.T) { } } -func TestLabelProtoCompactText(t *testing.T) { +func TestOffer_Operation_UnreserveProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabel(popr, true) + p := NewPopulatedOffer_Operation_Unreserve(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Label{} + msg := &Offer_Operation_Unreserve{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10807,12 +11302,12 @@ func TestLabelProtoCompactText(t *testing.T) { } } -func TestPortProtoText(t *testing.T) { +func TestOffer_Operation_CreateProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPort(popr, true) + p := NewPopulatedOffer_Operation_Create(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Port{} + msg := &Offer_Operation_Create{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10824,12 +11319,12 @@ func TestPortProtoText(t *testing.T) { } } -func TestPortProtoCompactText(t *testing.T) { +func TestOffer_Operation_CreateProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPort(popr, true) + p := NewPopulatedOffer_Operation_Create(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Port{} + msg := &Offer_Operation_Create{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10841,12 +11336,12 @@ func TestPortProtoCompactText(t *testing.T) { } } -func TestPortsProtoText(t *testing.T) { +func TestOffer_Operation_DestroyProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPorts(popr, true) + p := NewPopulatedOffer_Operation_Destroy(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Ports{} + msg := &Offer_Operation_Destroy{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10858,12 +11353,12 @@ func TestPortsProtoText(t *testing.T) { } } -func TestPortsProtoCompactText(t *testing.T) { +func TestOffer_Operation_DestroyProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPorts(popr, true) + p := NewPopulatedOffer_Operation_Destroy(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Ports{} + msg := &Offer_Operation_Destroy{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10875,12 +11370,12 @@ func TestPortsProtoCompactText(t *testing.T) { } } -func TestDiscoveryInfoProtoText(t *testing.T) { +func TestInverseOfferProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDiscoveryInfo(popr, true) + p := NewPopulatedInverseOffer(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DiscoveryInfo{} + msg := &InverseOffer{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10892,12 +11387,12 @@ func TestDiscoveryInfoProtoText(t *testing.T) { } } -func TestDiscoveryInfoProtoCompactText(t *testing.T) { +func TestInverseOfferProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDiscoveryInfo(popr, true) + p := NewPopulatedInverseOffer(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DiscoveryInfo{} + msg := &InverseOffer{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10909,12 +11404,12 @@ func TestDiscoveryInfoProtoCompactText(t *testing.T) { } } -func TestAppcImageManifestProtoText(t *testing.T) { +func TestTaskInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest(popr, true) + p := NewPopulatedTaskInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AppcImageManifest{} + msg := &TaskInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10926,12 +11421,12 @@ func TestAppcImageManifestProtoText(t *testing.T) { } } -func TestAppcImageManifestProtoCompactText(t *testing.T) { +func TestTaskInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest(popr, true) + p := NewPopulatedTaskInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AppcImageManifest{} + msg := &TaskInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10943,12 +11438,12 @@ func TestAppcImageManifestProtoCompactText(t *testing.T) { } } -func TestAppcImageManifest_LabelProtoText(t *testing.T) { +func TestTaskStatusProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Label(popr, true) + p := NewPopulatedTaskStatus(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AppcImageManifest_Label{} + msg := &TaskStatus{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10960,12 +11455,12 @@ func TestAppcImageManifest_LabelProtoText(t *testing.T) { } } -func TestAppcImageManifest_LabelProtoCompactText(t *testing.T) { +func TestTaskStatusProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Label(popr, true) + p := NewPopulatedTaskStatus(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AppcImageManifest_Label{} + msg := &TaskStatus{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10977,12 +11472,12 @@ func TestAppcImageManifest_LabelProtoCompactText(t *testing.T) { } } -func TestAppcImageManifest_AnnotationProtoText(t *testing.T) { +func TestFiltersProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Annotation(popr, true) + p := NewPopulatedFilters(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AppcImageManifest_Annotation{} + msg := &Filters{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -10994,12 +11489,12 @@ func TestAppcImageManifest_AnnotationProtoText(t *testing.T) { } } -func TestAppcImageManifest_AnnotationProtoCompactText(t *testing.T) { +func TestFiltersProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Annotation(popr, true) + p := NewPopulatedFilters(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AppcImageManifest_Annotation{} + msg := &Filters{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -11011,1964 +11506,1633 @@ func TestAppcImageManifest_AnnotationProtoCompactText(t *testing.T) { } } -func TestFrameworkIDVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FrameworkID{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +func TestEnvironmentProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Environment{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOfferIDVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOfferID(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OfferID{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestSlaveIDVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SlaveID{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + +func TestEnvironmentProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Environment{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestTaskIDVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskID(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &TaskID{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestEnvironment_VariableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment_Variable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Environment_Variable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestExecutorIDVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &ExecutorID{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestEnvironment_VariableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment_Variable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Environment_Variable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestContainerIDVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerID(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &ContainerID{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestParameterProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameter(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Parameter{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestAddressVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAddress(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Address{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestParameterProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameter(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Parameter{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestURLVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedURL(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &URL{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestParametersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameters(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Parameters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestFrameworkInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &FrameworkInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestParametersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameters(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Parameters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestFrameworkInfo_CapabilityVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkInfo_Capability(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &FrameworkInfo_Capability{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestCredentialProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredential(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Credential{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestHealthCheckVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &HealthCheck{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestCredentialProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredential(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Credential{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestHealthCheck_HTTPVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &HealthCheck_HTTP{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestCredentialsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredentials(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Credentials{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestCommandInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &CommandInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestCredentialsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredentials(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Credentials{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCommandInfo_URIVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CommandInfo_URI{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestCommandInfo_ContainerInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CommandInfo_ContainerInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + +func TestRateLimitProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimit(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RateLimit{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestExecutorInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &ExecutorInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestRateLimitProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimit(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RateLimit{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestMasterInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &MasterInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestRateLimitsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimits(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RateLimits{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestSlaveInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &SlaveInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestRateLimitsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimits(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RateLimits{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestValueVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Value{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestImageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedImage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Image{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestValue_ScalarVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Value_Scalar{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestImageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedImage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Image{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestValue_RangeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Value_Range{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestImage_AppcProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedImage_Appc(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Image_Appc{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestValue_RangesVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Value_Ranges{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestImage_AppcProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedImage_Appc(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Image_Appc{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestValue_SetVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Value_Set{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestImage_DockerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedImage_Docker(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Image_Docker{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestValue_TextVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Value_Text{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestImage_DockerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedImage_Docker(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Image_Docker{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAttributeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAttribute(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Attribute{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + +func TestVolumeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Volume{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResourceVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Resource{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestVolumeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Volume{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResource_ReservationInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource_ReservationInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Resource_ReservationInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestNetworkInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNetworkInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NetworkInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResource_DiskInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource_DiskInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Resource_DiskInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestNetworkInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNetworkInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NetworkInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResource_DiskInfo_PersistenceVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource_DiskInfo_Persistence(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Resource_DiskInfo_Persistence{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestNetworkInfo_IPAddressProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNetworkInfo_IPAddress(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NetworkInfo_IPAddress{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResource_RevocableInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource_RevocableInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Resource_RevocableInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestNetworkInfo_IPAddressProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNetworkInfo_IPAddress(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NetworkInfo_IPAddress{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestTrafficControlStatisticsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTrafficControlStatistics(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &TrafficControlStatistics{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResourceStatisticsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &ResourceStatistics{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResourceUsageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &ResourceUsage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerInfo_DockerInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerInfo_DockerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResourceUsage_ExecutorVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceUsage_Executor(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &ResourceUsage_Executor{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerInfo_DockerInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerInfo_DockerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestPerfStatisticsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &PerfStatistics{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerInfo_DockerInfo_PortMappingProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerInfo_DockerInfo_PortMapping{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRequest(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Request{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerInfo_DockerInfo_PortMappingProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerInfo_DockerInfo_PortMapping{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestOfferVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Offer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerInfo_MesosInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_MesosInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerInfo_MesosInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestOffer_OperationVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Offer_Operation{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerInfo_MesosInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_MesosInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerInfo_MesosInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestOffer_Operation_LaunchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Launch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Offer_Operation_Launch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerStatusProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerStatus(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerStatus{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestOffer_Operation_ReserveVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Reserve(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Offer_Operation_Reserve{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestContainerStatusProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerStatus(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerStatus{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestOffer_Operation_UnreserveVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Unreserve(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Offer_Operation_Unreserve{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestLabelsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestOffer_Operation_CreateVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Create(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Offer_Operation_Create{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestLabelsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestOffer_Operation_DestroyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Destroy(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Offer_Operation_Destroy{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestLabelProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Label{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestTaskInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &TaskInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestLabelProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Label{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestTaskStatusVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &TaskStatus{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestPortProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPort(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Port{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestFiltersVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFilters(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Filters{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestPortProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPort(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Port{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestEnvironmentVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Environment{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestPortsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPorts(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestEnvironment_VariableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Environment_Variable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestPortsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPorts(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestParameterVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedParameter(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Parameter{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestDiscoveryInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDiscoveryInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestParametersVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedParameters(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Parameters{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestDiscoveryInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDiscoveryInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestCredentialVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCredential(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Credential{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestAppcImageManifestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAppcImageManifest(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AppcImageManifest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestCredentialsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCredentials(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Credentials{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestAppcImageManifestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAppcImageManifest(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AppcImageManifest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestRateLimitVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &RateLimit{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestAppcImageManifest_LabelProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAppcImageManifest_Label(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AppcImageManifest_Label{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestRateLimitsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &RateLimits{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestAppcImageManifest_LabelProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAppcImageManifest_Label(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AppcImageManifest_Label{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestImageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedImage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Image{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestAppcImageManifest_AnnotationProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAppcImageManifest_Annotation(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AppcImageManifest_Annotation{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestImage_AppCVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedImage_AppC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Image_AppC{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestAppcImageManifest_AnnotationProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAppcImageManifest_Annotation(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AppcImageManifest_Annotation{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestImage_DockerVerboseEqual(t *testing.T) { + +func TestFrameworkIDStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedImage_Docker(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Image_Docker{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedFrameworkID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestVolumeVerboseEqual(t *testing.T) { +func TestOfferIDStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVolume(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Volume{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedOfferID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerInfoVerboseEqual(t *testing.T) { +func TestSlaveIDStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainerInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedSlaveID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerInfo_DockerInfoVerboseEqual(t *testing.T) { +func TestTaskIDStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainerInfo_DockerInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedTaskID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerInfo_DockerInfo_PortMappingVerboseEqual(t *testing.T) { +func TestExecutorIDStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainerInfo_DockerInfo_PortMapping{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedExecutorID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerInfo_MesosInfoVerboseEqual(t *testing.T) { +func TestContainerIDStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_MesosInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainerInfo_MesosInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedContainerID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestLabelsVerboseEqual(t *testing.T) { +func TestTimeInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLabels(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Labels{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedTimeInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestLabelVerboseEqual(t *testing.T) { +func TestDurationInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLabel(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Label{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedDurationInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPortVerboseEqual(t *testing.T) { +func TestAddressStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPort(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Port{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedAddress(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPortsVerboseEqual(t *testing.T) { +func TestURLStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPorts(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Ports{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedURL(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestDiscoveryInfoVerboseEqual(t *testing.T) { +func TestUnavailabilityStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDiscoveryInfo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DiscoveryInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedUnavailability(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAppcImageManifestVerboseEqual(t *testing.T) { +func TestMachineIDStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAppcImageManifest(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AppcImageManifest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedMachineID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAppcImageManifest_LabelVerboseEqual(t *testing.T) { +func TestMachineInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAppcImageManifest_Label(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AppcImageManifest_Label{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedMachineInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAppcImageManifest_AnnotationVerboseEqual(t *testing.T) { +func TestFrameworkInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAppcImageManifest_Annotation(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AppcImageManifest_Annotation{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + p := NewPopulatedFrameworkInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestFrameworkIDGoString(t *testing.T) { +func TestFrameworkInfo_CapabilityStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedFrameworkInfo_Capability(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOfferIDGoString(t *testing.T) { +func TestHealthCheckStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOfferID(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedHealthCheck(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestSlaveIDGoString(t *testing.T) { +func TestHealthCheck_HTTPStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedHealthCheck_HTTP(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestTaskIDGoString(t *testing.T) { +func TestCommandInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskID(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedCommandInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestExecutorIDGoString(t *testing.T) { +func TestCommandInfo_URIStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedCommandInfo_URI(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerIDGoString(t *testing.T) { +func TestCommandInfo_ContainerInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerID(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedCommandInfo_ContainerInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAddressGoString(t *testing.T) { +func TestExecutorInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAddress(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedExecutorInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestURLGoString(t *testing.T) { +func TestMasterInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedURL(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedMasterInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestFrameworkInfoGoString(t *testing.T) { +func TestSlaveInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedSlaveInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestFrameworkInfo_CapabilityGoString(t *testing.T) { +func TestValueStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkInfo_Capability(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedValue(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestHealthCheckGoString(t *testing.T) { +func TestValue_ScalarStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedValue_Scalar(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestHealthCheck_HTTPGoString(t *testing.T) { +func TestValue_RangeStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedValue_Range(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCommandInfoGoString(t *testing.T) { +func TestValue_RangesStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedValue_Ranges(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCommandInfo_URIGoString(t *testing.T) { +func TestValue_SetStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedValue_Set(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCommandInfo_ContainerInfoGoString(t *testing.T) { +func TestValue_TextStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedValue_Text(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestExecutorInfoGoString(t *testing.T) { +func TestAttributeStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedAttribute(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestMasterInfoGoString(t *testing.T) { +func TestResourceStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedResource(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestSlaveInfoGoString(t *testing.T) { +func TestResource_ReservationInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedResource_ReservationInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestValueGoString(t *testing.T) { +func TestResource_DiskInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedResource_DiskInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestValue_ScalarGoString(t *testing.T) { +func TestResource_DiskInfo_PersistenceStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestValue_RangeGoString(t *testing.T) { +func TestResource_RevocableInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedResource_RevocableInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestValue_RangesGoString(t *testing.T) { +func TestTrafficControlStatisticsStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedTrafficControlStatistics(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestValue_SetGoString(t *testing.T) { +func TestResourceStatisticsStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedResourceStatistics(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestValue_TextGoString(t *testing.T) { +func TestResourceUsageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedResourceUsage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAttributeGoString(t *testing.T) { +func TestResourceUsage_ExecutorStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAttribute(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedResourceUsage_Executor(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResourceGoString(t *testing.T) { +func TestPerfStatisticsStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedPerfStatistics(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResource_ReservationInfoGoString(t *testing.T) { +func TestRequestStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource_ReservationInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedRequest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResource_DiskInfoGoString(t *testing.T) { +func TestOfferStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource_DiskInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedOffer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResource_DiskInfo_PersistenceGoString(t *testing.T) { +func TestOffer_OperationStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource_DiskInfo_Persistence(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedOffer_Operation(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResource_RevocableInfoGoString(t *testing.T) { +func TestOffer_Operation_LaunchStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResource_RevocableInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedOffer_Operation_Launch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestTrafficControlStatisticsGoString(t *testing.T) { +func TestOffer_Operation_ReserveStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTrafficControlStatistics(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedOffer_Operation_Reserve(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResourceStatisticsGoString(t *testing.T) { +func TestOffer_Operation_UnreserveStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResourceUsageGoString(t *testing.T) { +func TestOffer_Operation_CreateStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedOffer_Operation_Create(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResourceUsage_ExecutorGoString(t *testing.T) { +func TestOffer_Operation_DestroyStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceUsage_Executor(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedOffer_Operation_Destroy(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPerfStatisticsGoString(t *testing.T) { +func TestInverseOfferStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedInverseOffer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRequestGoString(t *testing.T) { +func TestTaskInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedTaskInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOfferGoString(t *testing.T) { +func TestTaskStatusStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedTaskStatus(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOffer_OperationGoString(t *testing.T) { +func TestFiltersStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedFilters(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOffer_Operation_LaunchGoString(t *testing.T) { +func TestEnvironmentStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Launch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedEnvironment(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOffer_Operation_ReserveGoString(t *testing.T) { +func TestEnvironment_VariableStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Reserve(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + p := NewPopulatedEnvironment_Variable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOffer_Operation_UnreserveGoString(t *testing.T) { +func TestParameterStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Unreserve(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedParameter(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOffer_Operation_CreateGoString(t *testing.T) { +func TestParametersStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Create(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedParameters(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOffer_Operation_DestroyGoString(t *testing.T) { +func TestCredentialStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Destroy(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedCredential(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestTaskInfoGoString(t *testing.T) { +func TestCredentialsStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedCredentials(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestTaskStatusGoString(t *testing.T) { +func TestRateLimitStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedRateLimit(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestFiltersGoString(t *testing.T) { +func TestRateLimitsStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFilters(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedRateLimits(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEnvironmentGoString(t *testing.T) { +func TestImageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedImage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEnvironment_VariableGoString(t *testing.T) { +func TestImage_AppcStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedImage_Appc(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestParameterGoString(t *testing.T) { +func TestImage_DockerStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedParameter(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedImage_Docker(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestParametersGoString(t *testing.T) { +func TestVolumeStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedParameters(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedVolume(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCredentialGoString(t *testing.T) { +func TestNetworkInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCredential(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedNetworkInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCredentialsGoString(t *testing.T) { +func TestNetworkInfo_IPAddressStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCredentials(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedNetworkInfo_IPAddress(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRateLimitGoString(t *testing.T) { +func TestContainerInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedContainerInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRateLimitsGoString(t *testing.T) { +func TestContainerInfo_DockerInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedContainerInfo_DockerInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestImageGoString(t *testing.T) { +func TestContainerInfo_DockerInfo_PortMappingStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedImage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestImage_AppCGoString(t *testing.T) { +func TestContainerInfo_MesosInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedImage_AppC(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedContainerInfo_MesosInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestImage_DockerGoString(t *testing.T) { +func TestContainerStatusStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedImage_Docker(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedContainerStatus(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestVolumeGoString(t *testing.T) { +func TestLabelsStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVolume(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + p := NewPopulatedLabels(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerInfoGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainerInfo_DockerInfoGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainerInfo_DockerInfo_PortMappingGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainerInfo_MesosInfoGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_MesosInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLabelsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLabels(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLabelGoString(t *testing.T) { +func TestLabelStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLabel(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPortGoString(t *testing.T) { +func TestPortStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPort(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPortsGoString(t *testing.T) { +func TestPortsStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPorts(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestDiscoveryInfoGoString(t *testing.T) { +func TestDiscoveryInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedDiscoveryInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAppcImageManifestGoString(t *testing.T) { +func TestAppcImageManifestStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAppcImageManifest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAppcImageManifest_LabelGoString(t *testing.T) { +func TestAppcImageManifest_LabelStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAppcImageManifest_Label(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAppcImageManifest_AnnotationGoString(t *testing.T) { +func TestAppcImageManifest_AnnotationStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAppcImageManifest_Annotation(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } func TestFrameworkIDSize(t *testing.T) { @@ -13187,10 +13351,10 @@ func BenchmarkContainerIDSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAddressSize(t *testing.T) { +func TestTimeInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddress(popr, true) + p := NewPopulatedTimeInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13209,12 +13373,12 @@ func TestAddressSize(t *testing.T) { } } -func BenchmarkAddressSize(b *testing.B) { +func BenchmarkTimeInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Address, 1000) + pops := make([]*TimeInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAddress(popr, false) + pops[i] = NewPopulatedTimeInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13223,10 +13387,10 @@ func BenchmarkAddressSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestURLSize(t *testing.T) { +func TestDurationInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedURL(popr, true) + p := NewPopulatedDurationInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13245,12 +13409,12 @@ func TestURLSize(t *testing.T) { } } -func BenchmarkURLSize(b *testing.B) { +func BenchmarkDurationInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*URL, 1000) + pops := make([]*DurationInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedURL(popr, false) + pops[i] = NewPopulatedDurationInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13259,10 +13423,10 @@ func BenchmarkURLSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfoSize(t *testing.T) { +func TestAddressSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo(popr, true) + p := NewPopulatedAddress(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13281,12 +13445,12 @@ func TestFrameworkInfoSize(t *testing.T) { } } -func BenchmarkFrameworkInfoSize(b *testing.B) { +func BenchmarkAddressSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkInfo, 1000) + pops := make([]*Address, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkInfo(popr, false) + pops[i] = NewPopulatedAddress(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13295,10 +13459,10 @@ func BenchmarkFrameworkInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfo_CapabilitySize(t *testing.T) { +func TestURLSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo_Capability(popr, true) + p := NewPopulatedURL(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13317,12 +13481,12 @@ func TestFrameworkInfo_CapabilitySize(t *testing.T) { } } -func BenchmarkFrameworkInfo_CapabilitySize(b *testing.B) { +func BenchmarkURLSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkInfo_Capability, 1000) + pops := make([]*URL, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkInfo_Capability(popr, false) + pops[i] = NewPopulatedURL(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13331,10 +13495,10 @@ func BenchmarkFrameworkInfo_CapabilitySize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestHealthCheckSize(t *testing.T) { +func TestUnavailabilitySize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck(popr, true) + p := NewPopulatedUnavailability(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13353,12 +13517,12 @@ func TestHealthCheckSize(t *testing.T) { } } -func BenchmarkHealthCheckSize(b *testing.B) { +func BenchmarkUnavailabilitySize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*HealthCheck, 1000) + pops := make([]*Unavailability, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedHealthCheck(popr, false) + pops[i] = NewPopulatedUnavailability(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13367,10 +13531,10 @@ func BenchmarkHealthCheckSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestHealthCheck_HTTPSize(t *testing.T) { +func TestMachineIDSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_HTTP(popr, true) + p := NewPopulatedMachineID(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13389,12 +13553,12 @@ func TestHealthCheck_HTTPSize(t *testing.T) { } } -func BenchmarkHealthCheck_HTTPSize(b *testing.B) { +func BenchmarkMachineIDSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*HealthCheck_HTTP, 1000) + pops := make([]*MachineID, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedHealthCheck_HTTP(popr, false) + pops[i] = NewPopulatedMachineID(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13403,10 +13567,10 @@ func BenchmarkHealthCheck_HTTPSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCommandInfoSize(t *testing.T) { +func TestMachineInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo(popr, true) + p := NewPopulatedMachineInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13425,12 +13589,12 @@ func TestCommandInfoSize(t *testing.T) { } } -func BenchmarkCommandInfoSize(b *testing.B) { +func BenchmarkMachineInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CommandInfo, 1000) + pops := make([]*MachineInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCommandInfo(popr, false) + pops[i] = NewPopulatedMachineInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13439,10 +13603,10 @@ func BenchmarkCommandInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_URISize(t *testing.T) { +func TestFrameworkInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_URI(popr, true) + p := NewPopulatedFrameworkInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13461,12 +13625,12 @@ func TestCommandInfo_URISize(t *testing.T) { } } -func BenchmarkCommandInfo_URISize(b *testing.B) { +func BenchmarkFrameworkInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CommandInfo_URI, 1000) + pops := make([]*FrameworkInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCommandInfo_URI(popr, false) + pops[i] = NewPopulatedFrameworkInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13475,10 +13639,10 @@ func BenchmarkCommandInfo_URISize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_ContainerInfoSize(t *testing.T) { +func TestFrameworkInfo_CapabilitySize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_ContainerInfo(popr, true) + p := NewPopulatedFrameworkInfo_Capability(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13497,12 +13661,12 @@ func TestCommandInfo_ContainerInfoSize(t *testing.T) { } } -func BenchmarkCommandInfo_ContainerInfoSize(b *testing.B) { +func BenchmarkFrameworkInfo_CapabilitySize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CommandInfo_ContainerInfo, 1000) + pops := make([]*FrameworkInfo_Capability, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCommandInfo_ContainerInfo(popr, false) + pops[i] = NewPopulatedFrameworkInfo_Capability(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13511,10 +13675,10 @@ func BenchmarkCommandInfo_ContainerInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestExecutorInfoSize(t *testing.T) { +func TestHealthCheckSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorInfo(popr, true) + p := NewPopulatedHealthCheck(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13533,12 +13697,12 @@ func TestExecutorInfoSize(t *testing.T) { } } -func BenchmarkExecutorInfoSize(b *testing.B) { +func BenchmarkHealthCheckSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ExecutorInfo, 1000) + pops := make([]*HealthCheck, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedExecutorInfo(popr, false) + pops[i] = NewPopulatedHealthCheck(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13547,10 +13711,10 @@ func BenchmarkExecutorInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestMasterInfoSize(t *testing.T) { +func TestHealthCheck_HTTPSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterInfo(popr, true) + p := NewPopulatedHealthCheck_HTTP(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13569,12 +13733,12 @@ func TestMasterInfoSize(t *testing.T) { } } -func BenchmarkMasterInfoSize(b *testing.B) { +func BenchmarkHealthCheck_HTTPSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*MasterInfo, 1000) + pops := make([]*HealthCheck_HTTP, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMasterInfo(popr, false) + pops[i] = NewPopulatedHealthCheck_HTTP(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13583,10 +13747,10 @@ func BenchmarkMasterInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestSlaveInfoSize(t *testing.T) { +func TestCommandInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveInfo(popr, true) + p := NewPopulatedCommandInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13605,12 +13769,12 @@ func TestSlaveInfoSize(t *testing.T) { } } -func BenchmarkSlaveInfoSize(b *testing.B) { +func BenchmarkCommandInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*SlaveInfo, 1000) + pops := make([]*CommandInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSlaveInfo(popr, false) + pops[i] = NewPopulatedCommandInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13619,10 +13783,10 @@ func BenchmarkSlaveInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValueSize(t *testing.T) { +func TestCommandInfo_URISize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue(popr, true) + p := NewPopulatedCommandInfo_URI(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13641,12 +13805,12 @@ func TestValueSize(t *testing.T) { } } -func BenchmarkValueSize(b *testing.B) { +func BenchmarkCommandInfo_URISize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value, 1000) + pops := make([]*CommandInfo_URI, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedValue(popr, false) + pops[i] = NewPopulatedCommandInfo_URI(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -13655,10 +13819,10 @@ func BenchmarkValueSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_ScalarSize(t *testing.T) { +func TestCommandInfo_ContainerInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Scalar(popr, true) + p := NewPopulatedCommandInfo_ContainerInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -13677,10 +13841,190 @@ func TestValue_ScalarSize(t *testing.T) { } } -func BenchmarkValue_ScalarSize(b *testing.B) { +func BenchmarkCommandInfo_ContainerInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Scalar, 1000) + pops := make([]*CommandInfo_ContainerInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCommandInfo_ContainerInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestExecutorInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkExecutorInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ExecutorInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedExecutorInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMasterInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMasterInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMasterInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MasterInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMasterInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestSlaveInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkSlaveInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*SlaveInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedSlaveInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestValueSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkValueSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Value, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedValue(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestValue_ScalarSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Scalar(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkValue_ScalarSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Value_Scalar, 1000) for i := 0; i < 1000; i++ { pops[i] = NewPopulatedValue_Scalar(popr, false) } @@ -14519,6 +14863,42 @@ func BenchmarkOffer_Operation_DestroySize(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestInverseOfferSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOffer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkInverseOfferSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*InverseOffer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedInverseOffer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + func TestTaskInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -14951,10 +15331,10 @@ func BenchmarkImageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestImage_AppCSize(t *testing.T) { +func TestImage_AppcSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_AppC(popr, true) + p := NewPopulatedImage_Appc(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -14973,12 +15353,12 @@ func TestImage_AppCSize(t *testing.T) { } } -func BenchmarkImage_AppCSize(b *testing.B) { +func BenchmarkImage_AppcSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Image_AppC, 1000) + pops := make([]*Image_Appc, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedImage_AppC(popr, false) + pops[i] = NewPopulatedImage_Appc(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -15059,10 +15439,10 @@ func BenchmarkVolumeSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfoSize(t *testing.T) { +func TestNetworkInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo(popr, true) + p := NewPopulatedNetworkInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -15081,12 +15461,12 @@ func TestContainerInfoSize(t *testing.T) { } } -func BenchmarkContainerInfoSize(b *testing.B) { +func BenchmarkNetworkInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo, 1000) + pops := make([]*NetworkInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerInfo(popr, false) + pops[i] = NewPopulatedNetworkInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -15095,10 +15475,10 @@ func BenchmarkContainerInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfoSize(t *testing.T) { +func TestNetworkInfo_IPAddressSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo(popr, true) + p := NewPopulatedNetworkInfo_IPAddress(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -15117,12 +15497,12 @@ func TestContainerInfo_DockerInfoSize(t *testing.T) { } } -func BenchmarkContainerInfo_DockerInfoSize(b *testing.B) { +func BenchmarkNetworkInfo_IPAddressSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo_DockerInfo, 1000) + pops := make([]*NetworkInfo_IPAddress, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerInfo_DockerInfo(popr, false) + pops[i] = NewPopulatedNetworkInfo_IPAddress(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -15131,10 +15511,10 @@ func BenchmarkContainerInfo_DockerInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfo_PortMappingSize(t *testing.T) { +func TestContainerInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + p := NewPopulatedContainerInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -15153,12 +15533,12 @@ func TestContainerInfo_DockerInfo_PortMappingSize(t *testing.T) { } } -func BenchmarkContainerInfo_DockerInfo_PortMappingSize(b *testing.B) { +func BenchmarkContainerInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo_DockerInfo_PortMapping, 1000) + pops := make([]*ContainerInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + pops[i] = NewPopulatedContainerInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -15167,10 +15547,10 @@ func BenchmarkContainerInfo_DockerInfo_PortMappingSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_MesosInfoSize(t *testing.T) { +func TestContainerInfo_DockerInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerInfo_MesosInfo(popr, true) + p := NewPopulatedContainerInfo_DockerInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -15189,12 +15569,12 @@ func TestContainerInfo_MesosInfoSize(t *testing.T) { } } -func BenchmarkContainerInfo_MesosInfoSize(b *testing.B) { +func BenchmarkContainerInfo_DockerInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo_MesosInfo, 1000) + pops := make([]*ContainerInfo_DockerInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerInfo_MesosInfo(popr, false) + pops[i] = NewPopulatedContainerInfo_DockerInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -15203,10 +15583,10 @@ func BenchmarkContainerInfo_MesosInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestLabelsSize(t *testing.T) { +func TestContainerInfo_DockerInfo_PortMappingSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabels(popr, true) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -15225,12 +15605,12 @@ func TestLabelsSize(t *testing.T) { } } -func BenchmarkLabelsSize(b *testing.B) { +func BenchmarkContainerInfo_DockerInfo_PortMappingSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Labels, 1000) + pops := make([]*ContainerInfo_DockerInfo_PortMapping, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLabels(popr, false) + pops[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -15239,10 +15619,118 @@ func BenchmarkLabelsSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestLabelSize(t *testing.T) { +func TestContainerInfo_MesosInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLabel(popr, true) + p := NewPopulatedContainerInfo_MesosInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainerInfo_MesosInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerInfo_MesosInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainerInfo_MesosInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainerStatusSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerStatus(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainerStatusSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerStatus, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainerStatus(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLabelsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLabelsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Labels, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLabels(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLabelSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -15416,709 +15904,2291 @@ func BenchmarkAppcImageManifestSize(b *testing.B) { for i := 0; i < b.N; i++ { total += pops[i%1000].Size() } - b.SetBytes(int64(total / b.N)) + b.SetBytes(int64(total / b.N)) +} + +func TestAppcImageManifest_LabelSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAppcImageManifest_Label(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAppcImageManifest_LabelSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AppcImageManifest_Label, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAppcImageManifest_Label(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAppcImageManifest_AnnotationSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAppcImageManifest_Annotation(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAppcImageManifest_AnnotationSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AppcImageManifest_Annotation, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAppcImageManifest_Annotation(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFrameworkIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOfferIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOfferID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSlaveIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTaskIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestExecutorIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTimeInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimeInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDurationInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDurationInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAddressGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAddress(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestURLGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedURL(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnavailabilityGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnavailability(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMachineIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMachineID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMachineInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMachineInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkInfo_CapabilityGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkInfo_Capability(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestHealthCheckGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHealthCheck(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestHealthCheck_HTTPGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHealthCheck_HTTP(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCommandInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCommandInfo_URIGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo_URI(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCommandInfo_ContainerInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo_ContainerInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestExecutorInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMasterInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMasterInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSlaveInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValueGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_ScalarGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Scalar(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_RangeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Range(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_RangesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Ranges(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_SetGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Set(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_TextGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Text(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAttributeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAttribute(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResourceGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResource_ReservationInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_ReservationInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResource_DiskInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_DiskInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResource_DiskInfo_PersistenceGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResource_RevocableInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_RevocableInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTrafficControlStatisticsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTrafficControlStatistics(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResourceStatisticsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceStatistics(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResourceUsageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceUsage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResourceUsage_ExecutorGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceUsage_Executor(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPerfStatisticsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPerfStatistics(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRequestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRequest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOfferGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_OperationGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_LaunchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Launch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_ReserveGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Reserve(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_UnreserveGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_CreateGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Create(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_DestroyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Destroy(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestInverseOfferGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedInverseOffer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTaskInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTaskStatusGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskStatus(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFiltersGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFilters(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEnvironmentGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEnvironment(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEnvironment_VariableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEnvironment_Variable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestParameterGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedParameter(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestParametersGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedParameters(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCredentialGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCredential(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCredentialsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCredentials(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRateLimitGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRateLimit(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRateLimitsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRateLimits(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestImageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedImage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestImage_AppcGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedImage_Appc(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestImage_DockerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedImage_Docker(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestVolumeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedVolume(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNetworkInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNetworkInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNetworkInfo_IPAddressGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNetworkInfo_IPAddress(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerInfo_DockerInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo_DockerInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerInfo_DockerInfo_PortMappingGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerInfo_MesosInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo_MesosInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerStatusGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerStatus(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLabelsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLabels(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLabelGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLabel(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPortGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPort(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPortsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPorts(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDiscoveryInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDiscoveryInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAppcImageManifestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAppcImageManifest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAppcImageManifest_LabelGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAppcImageManifest_Label(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAppcImageManifest_AnnotationGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAppcImageManifest_Annotation(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FrameworkID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } } - -func TestAppcImageManifest_LabelSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Label(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) +func TestOfferIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOfferID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + msg := &OfferID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } - -func BenchmarkAppcImageManifest_LabelSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AppcImageManifest_Label, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAppcImageManifest_Label(popr, false) +func TestSlaveIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + msg := &SlaveID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - b.SetBytes(int64(total / b.N)) } - -func TestAppcImageManifest_AnnotationSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAppcImageManifest_Annotation(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) +func TestTaskIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + msg := &TaskID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } - -func BenchmarkAppcImageManifest_AnnotationSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AppcImageManifest_Annotation, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAppcImageManifest_Annotation(popr, false) +func TestExecutorIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + msg := &ExecutorID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - b.SetBytes(int64(total / b.N)) } - -func TestFrameworkIDStringer(t *testing.T) { +func TestContainerIDVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedContainerID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOfferIDStringer(t *testing.T) { +func TestTimeInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOfferID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedTimeInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TimeInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestSlaveIDStringer(t *testing.T) { +func TestDurationInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedDurationInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DurationInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestTaskIDStringer(t *testing.T) { +func TestAddressVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedAddress(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Address{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestExecutorIDStringer(t *testing.T) { +func TestURLVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedURL(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &URL{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestContainerIDStringer(t *testing.T) { +func TestUnavailabilityVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedUnavailability(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unavailability{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAddressStringer(t *testing.T) { +func TestMachineIDVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAddress(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedMachineID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MachineID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestURLStringer(t *testing.T) { +func TestMachineInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedURL(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedMachineInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MachineInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFrameworkInfoStringer(t *testing.T) { +func TestFrameworkInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FrameworkInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFrameworkInfo_CapabilityStringer(t *testing.T) { +func TestFrameworkInfo_CapabilityVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkInfo_Capability(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FrameworkInfo_Capability{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestHealthCheckStringer(t *testing.T) { +func TestHealthCheckVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedHealthCheck(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &HealthCheck{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestHealthCheck_HTTPStringer(t *testing.T) { +func TestHealthCheck_HTTPVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedHealthCheck_HTTP(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &HealthCheck_HTTP{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCommandInfoStringer(t *testing.T) { +func TestCommandInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCommandInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CommandInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCommandInfo_URIStringer(t *testing.T) { +func TestCommandInfo_URIVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCommandInfo_URI(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CommandInfo_URI{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCommandInfo_ContainerInfoStringer(t *testing.T) { +func TestCommandInfo_ContainerInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCommandInfo_ContainerInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CommandInfo_ContainerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestExecutorInfoStringer(t *testing.T) { +func TestExecutorInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExecutorInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ExecutorInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestMasterInfoStringer(t *testing.T) { +func TestMasterInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMasterInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MasterInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestSlaveInfoStringer(t *testing.T) { +func TestSlaveInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSlaveInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SlaveInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValueStringer(t *testing.T) { +func TestValueVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedValue(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Value{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_ScalarStringer(t *testing.T) { +func TestValue_ScalarVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedValue_Scalar(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Value_Scalar{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_RangeStringer(t *testing.T) { +func TestValue_RangeVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedValue_Range(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Value_Range{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_RangesStringer(t *testing.T) { +func TestValue_RangesVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedValue_Ranges(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Value_Ranges{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_SetStringer(t *testing.T) { +func TestValue_SetVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedValue_Set(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Value_Set{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_TextStringer(t *testing.T) { +func TestValue_TextVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedValue_Text(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Value_Text{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAttributeStringer(t *testing.T) { +func TestAttributeVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAttribute(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Attribute{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceStringer(t *testing.T) { +func TestResourceVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResource(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Resource{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResource_ReservationInfoStringer(t *testing.T) { +func TestResource_ReservationInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResource_ReservationInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Resource_ReservationInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResource_DiskInfoStringer(t *testing.T) { +func TestResource_DiskInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResource_DiskInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Resource_DiskInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResource_DiskInfo_PersistenceStringer(t *testing.T) { +func TestResource_DiskInfo_PersistenceVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResource_DiskInfo_Persistence(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Resource_DiskInfo_Persistence{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResource_RevocableInfoStringer(t *testing.T) { +func TestResource_RevocableInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResource_RevocableInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Resource_RevocableInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestTrafficControlStatisticsStringer(t *testing.T) { +func TestTrafficControlStatisticsVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTrafficControlStatistics(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TrafficControlStatistics{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceStatisticsStringer(t *testing.T) { +func TestResourceStatisticsVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResourceStatistics(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ResourceStatistics{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceUsageStringer(t *testing.T) { +func TestResourceUsageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResourceUsage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ResourceUsage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceUsage_ExecutorStringer(t *testing.T) { +func TestResourceUsage_ExecutorVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResourceUsage_Executor(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ResourceUsage_Executor{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestPerfStatisticsStringer(t *testing.T) { +func TestPerfStatisticsVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPerfStatistics(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &PerfStatistics{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRequestStringer(t *testing.T) { +func TestRequestVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Request{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOfferStringer(t *testing.T) { +func TestOfferVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOffer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Offer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOffer_OperationStringer(t *testing.T) { +func TestOffer_OperationVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOffer_Operation(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Offer_Operation{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOffer_Operation_LaunchStringer(t *testing.T) { +func TestOffer_Operation_LaunchVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOffer_Operation_Launch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Offer_Operation_Launch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOffer_Operation_ReserveStringer(t *testing.T) { +func TestOffer_Operation_ReserveVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOffer_Operation_Reserve(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Offer_Operation_Reserve{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOffer_Operation_UnreserveVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Offer_Operation_Unreserve{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOffer_Operation_CreateVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Create(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Offer_Operation_Create{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) } -} -func TestOffer_Operation_UnreserveStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Unreserve(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOffer_Operation_CreateStringer(t *testing.T) { +func TestOffer_Operation_DestroyVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Create(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedOffer_Operation_Destroy(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Offer_Operation_Destroy{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOffer_Operation_DestroyStringer(t *testing.T) { +func TestInverseOfferVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer_Operation_Destroy(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedInverseOffer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &InverseOffer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestTaskInfoStringer(t *testing.T) { +func TestTaskInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTaskInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TaskInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestTaskStatusStringer(t *testing.T) { +func TestTaskStatusVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTaskStatus(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TaskStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFiltersStringer(t *testing.T) { +func TestFiltersVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFilters(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Filters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEnvironmentStringer(t *testing.T) { +func TestEnvironmentVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEnvironment(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Environment{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEnvironment_VariableStringer(t *testing.T) { +func TestEnvironment_VariableVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEnvironment_Variable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Environment_Variable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestParameterStringer(t *testing.T) { +func TestParameterVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedParameter(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Parameter{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestParametersStringer(t *testing.T) { +func TestParametersVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedParameters(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Parameters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCredentialStringer(t *testing.T) { +func TestCredentialVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCredential(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Credential{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCredentialsStringer(t *testing.T) { +func TestCredentialsVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCredentials(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Credentials{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRateLimitStringer(t *testing.T) { +func TestRateLimitVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRateLimit(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RateLimit{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRateLimitsStringer(t *testing.T) { +func TestRateLimitsVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRateLimits(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RateLimits{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestImageStringer(t *testing.T) { +func TestImageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedImage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Image{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestImage_AppcVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedImage_Appc(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Image_Appc{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestImage_DockerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedImage_Docker(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Image_Docker{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestImage_AppCStringer(t *testing.T) { +func TestVolumeVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedImage_AppC(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedVolume(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Volume{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestImage_DockerStringer(t *testing.T) { +func TestNetworkInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedImage_Docker(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedNetworkInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NetworkInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestVolumeStringer(t *testing.T) { +func TestNetworkInfo_IPAddressVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVolume(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + p := NewPopulatedNetworkInfo_IPAddress(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NetworkInfo_IPAddress{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestContainerInfoStringer(t *testing.T) { +func TestContainerInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainerInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestContainerInfo_DockerInfoStringer(t *testing.T) { +func TestContainerInfo_DockerInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainerInfo_DockerInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerInfo_DockerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestContainerInfo_DockerInfo_PortMappingStringer(t *testing.T) { +func TestContainerInfo_DockerInfo_PortMappingVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerInfo_DockerInfo_PortMapping{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestContainerInfo_MesosInfoStringer(t *testing.T) { +func TestContainerInfo_MesosInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainerInfo_MesosInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerInfo_MesosInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestLabelsStringer(t *testing.T) { +func TestContainerStatusVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerStatus(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLabelsVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLabels(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestLabelStringer(t *testing.T) { +func TestLabelVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLabel(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestPortStringer(t *testing.T) { +func TestPortVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPort(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Port{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestPortsStringer(t *testing.T) { +func TestPortsVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPorts(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestDiscoveryInfoStringer(t *testing.T) { +func TestDiscoveryInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedDiscoveryInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAppcImageManifestStringer(t *testing.T) { +func TestAppcImageManifestVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAppcImageManifest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AppcImageManifest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAppcImageManifest_LabelStringer(t *testing.T) { +func TestAppcImageManifest_LabelVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAppcImageManifest_Label(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AppcImageManifest_Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAppcImageManifest_AnnotationStringer(t *testing.T) { +func TestAppcImageManifest_AnnotationVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAppcImageManifest_Annotation(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AppcImageManifest_Annotation{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } diff --git a/mesosproto/messages.pb.go b/mesosproto/messages.pb.go index 9dd1bc2f..4c10053e 100644 --- a/mesosproto/messages.pb.go +++ b/mesosproto/messages.pb.go @@ -58,17 +58,18 @@ func (x *StatusUpdateRecord_Type) UnmarshalJSON(data []byte) error { return nil } -// TODO(benh): It would be great if this could just be a -// TaskInfo wherever it gets used! However, doing so would -// require adding the framework_id field, the executor_id field, and -// the state field into TaskInfo though (or send them another -// way). Also, one performance reason why we don't do that now is -// because storing whatever data is coupled with a TaskInfo -// could be large and unnecessary. -// TODO(bmahler): Add executor_uuid here, and send it to the master. This will -// allow us to expose executor work directories for tasks in the webui when -// looking from the master level. Currently only the slave knows which run the -// task belongs to. +// * +// Describes a task, similar to `TaskInfo`. +// +// `Task` is used in some of the Mesos messages found below. +// `Task` is used instead of `TaskInfo` if: +// 1) we need additional IDs, such as a specific +// framework, executor, or agent; or +// 2) we do not need the additional data, such as the command run by the +// task, the specific containerization, or health checks. These +// additional fields may be large and unnecessary for some Mesos messages. +// +// `Task` is generally constructed from a `TaskInfo`. See protobuf::createTask. type Task struct { Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` TaskId *TaskID `protobuf:"bytes,2,req,name=task_id" json:"task_id,omitempty"` @@ -179,19 +180,26 @@ func (m *Task) GetDiscovery() *DiscoveryInfo { return nil } -// TODO(vinod): Create a new UUID message type. +// * +// Describes a task's status. +// +// `StatusUpdate` is used in some of the Mesos messages found below. +// The master and agent use `StatusUpdate` to wrap a `TaskStatus` when +// passing it from the agent to the framework that spawned the task. +// +// See protobuf::createStatusUpdate. type StatusUpdate struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` ExecutorId *ExecutorID `protobuf:"bytes,2,opt,name=executor_id" json:"executor_id,omitempty"` SlaveId *SlaveID `protobuf:"bytes,3,opt,name=slave_id" json:"slave_id,omitempty"` - Status *TaskStatus `protobuf:"bytes,4,req,name=status" json:"status,omitempty"` - Timestamp *float64 `protobuf:"fixed64,5,req,name=timestamp" json:"timestamp,omitempty"` - // This is being deprecated in favor of TaskStatus.uuid. In 0.23.0, - // we set the TaskStatus 'uuid' in the executor driver for all - // retryable status updates. + // Since 0.23.0 we set 'status.uuid' in the executor + // driver for all retryable status updates. + Status *TaskStatus `protobuf:"bytes,4,req,name=status" json:"status,omitempty"` + Timestamp *float64 `protobuf:"fixed64,5,req,name=timestamp" json:"timestamp,omitempty"` + // Since 0.26.0 this is deprecated in favor of 'status.uuid'. Uuid []byte `protobuf:"bytes,6,opt,name=uuid" json:"uuid,omitempty"` // This corresponds to the latest state of the task according to the - // slave. Note that this state might be different than the state in + // agent. Note that this state might be different than the state in // 'status' because status update manager queues updates. In other // words, 'status' corresponds to the update at top of the queue and // 'latest_state' corresponds to the update at bottom of the queue. @@ -251,14 +259,17 @@ func (m *StatusUpdate) GetLatestState() TaskState { return TaskState_TASK_STAGING } -// This message encapsulates how we checkpoint a status update to disk. -// NOTE: If type == UPDATE, the 'update' field is required. -// NOTE: If type == ACK, the 'uuid' field is required. +// * +// Encapsulates how we checkpoint a `StatusUpdate` to disk. +// +// See the StatusUpdateManager and slave/state.cpp. type StatusUpdateRecord struct { - Type *StatusUpdateRecord_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.StatusUpdateRecord_Type" json:"type,omitempty"` - Update *StatusUpdate `protobuf:"bytes,2,opt,name=update" json:"update,omitempty"` - Uuid []byte `protobuf:"bytes,3,opt,name=uuid" json:"uuid,omitempty"` - XXX_unrecognized []byte `json:"-"` + Type *StatusUpdateRecord_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.StatusUpdateRecord_Type" json:"type,omitempty"` + // Required if type == UPDATE. + Update *StatusUpdate `protobuf:"bytes,2,opt,name=update" json:"update,omitempty"` + // Required if type == ACK. + Uuid []byte `protobuf:"bytes,3,opt,name=uuid" json:"uuid,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *StatusUpdateRecord) Reset() { *m = StatusUpdateRecord{} } @@ -285,6 +296,8 @@ func (m *StatusUpdateRecord) GetUuid() []byte { return nil } +// TODO(josephw): Check if this can be removed. This appears to be +// for backwards compatibility with very early versions of Mesos. type SubmitSchedulerRequest struct { Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -300,6 +313,7 @@ func (m *SubmitSchedulerRequest) GetName() string { return "" } +// TODO(josephw): Remove for the same reason as `SubmitSchedulerRequest`. type SubmitSchedulerResponse struct { Okay *bool `protobuf:"varint,1,req,name=okay" json:"okay,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -315,6 +329,11 @@ func (m *SubmitSchedulerResponse) GetOkay() bool { return false } +// * +// Sends a free-form message from the executor to the framework. +// Mesos forwards the message, if necessary, via the agents and the master. +// +// See scheduler::Event::Message. type ExecutorToFrameworkMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` FrameworkId *FrameworkID `protobuf:"bytes,2,req,name=framework_id" json:"framework_id,omitempty"` @@ -354,6 +373,11 @@ func (m *ExecutorToFrameworkMessage) GetData() []byte { return nil } +// * +// Sends a free-form message from the framework to the executor. +// Mesos forwards the message, if necessary, via the agents and the master. +// +// See scheduler::Call::Message. type FrameworkToExecutorMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` FrameworkId *FrameworkID `protobuf:"bytes,2,req,name=framework_id" json:"framework_id,omitempty"` @@ -393,6 +417,11 @@ func (m *FrameworkToExecutorMessage) GetData() []byte { return nil } +// * +// Subscribes the framework with the master to receive events. +// +// Used by the pre-Event/Call Mesos scheduler driver. +// See scheduler::Call::Subscribe. type RegisterFrameworkMessage struct { Framework *FrameworkInfo `protobuf:"bytes,1,req,name=framework" json:"framework,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -408,6 +437,13 @@ func (m *RegisterFrameworkMessage) GetFramework() *FrameworkInfo { return nil } +// * +// Subscribes the framework with the master to receive events. +// This is used when the framework has previously registered and +// the master changes to a newly elected master. +// +// Used by the pre-Event/Call Mesos scheduler driver. +// See scheduler::Call::Subscribe. type ReregisterFrameworkMessage struct { Framework *FrameworkInfo `protobuf:"bytes,2,req,name=framework" json:"framework,omitempty"` Failover *bool `protobuf:"varint,3,req,name=failover" json:"failover,omitempty"` @@ -431,6 +467,11 @@ func (m *ReregisterFrameworkMessage) GetFailover() bool { return false } +// * +// Notifies the framework that the master has registered it. +// The `framework_id` holds a unique ID for distinguishing this framework. +// +// See scheduler::Event::Subscribed. type FrameworkRegisteredMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` MasterInfo *MasterInfo `protobuf:"bytes,2,req,name=master_info" json:"master_info,omitempty"` @@ -454,6 +495,11 @@ func (m *FrameworkRegisteredMessage) GetMasterInfo() *MasterInfo { return nil } +// * +// Notifies the framework that the master has reregistered it. +// This message is used in the same conditions as `ReregisterFrameworkMessage`. +// +// See scheduler::Event::Subscribed. type FrameworkReregisteredMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` MasterInfo *MasterInfo `protobuf:"bytes,2,req,name=master_info" json:"master_info,omitempty"` @@ -477,6 +523,11 @@ func (m *FrameworkReregisteredMessage) GetMasterInfo() *MasterInfo { return nil } +// * +// Stops the framework and shuts down all its tasks and executors. +// +// Used by the pre-Event/Call Mesos scheduler driver. +// See scheduler::Call::Teardown. type UnregisterFrameworkMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -492,6 +543,10 @@ func (m *UnregisterFrameworkMessage) GetFrameworkId() *FrameworkID { return nil } +// * +// Aborts the scheduler driver and prevents further callbacks to the driver. +// +// Used exclusively by the pre-Event/Call Mesos scheduler driver. type DeactivateFrameworkMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -507,6 +562,13 @@ func (m *DeactivateFrameworkMessage) GetFrameworkId() *FrameworkID { return nil } +// * +// Requests specific resources from Mesos's allocator. +// If the allocator supports resource requests, any corresponding +// resources will be sent like a normal resource offer. +// +// Used by the pre-Event/Call Mesos scheduler driver. +// See scheduler::Call::Request. type ResourceRequestMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` Requests []*Request `protobuf:"bytes,2,rep,name=requests" json:"requests,omitempty"` @@ -530,10 +592,21 @@ func (m *ResourceRequestMessage) GetRequests() []*Request { return nil } +// * +// Sends resources offers to the scheduler. +// +// See scheduler::Event::Offers. type ResourceOffersMessage struct { - Offers []*Offer `protobuf:"bytes,1,rep,name=offers" json:"offers,omitempty"` - Pids []string `protobuf:"bytes,2,rep,name=pids" json:"pids,omitempty"` - XXX_unrecognized []byte `json:"-"` + Offers []*Offer `protobuf:"bytes,1,rep,name=offers" json:"offers,omitempty"` + Pids []string `protobuf:"bytes,2,rep,name=pids" json:"pids,omitempty"` + // The `inverse_offers` field is added here because we currently use it in + // `master.cpp` when constructing the message to send to schedulers. We use + // the original version of the proto API until we do a full refactor of all + // the messages being sent. + // It is not fully implemented in the old scheduler; only the V1 scheduler + // currently implements inverse offers. + InverseOffers []*InverseOffer `protobuf:"bytes,3,rep,name=inverse_offers" json:"inverse_offers,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *ResourceOffersMessage) Reset() { *m = ResourceOffersMessage{} } @@ -553,6 +626,18 @@ func (m *ResourceOffersMessage) GetPids() []string { return nil } +func (m *ResourceOffersMessage) GetInverseOffers() []*InverseOffer { + if m != nil { + return m.InverseOffers + } + return nil +} + +// * +// Launches tasks using resources from the specified offers. +// +// Used by the pre-Event/Call Mesos scheduler driver. +// See scheduler::Call::Accept and scheduler::Call::Decline. type LaunchTasksMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` Tasks []*TaskInfo `protobuf:"bytes,3,rep,name=tasks" json:"tasks,omitempty"` @@ -592,6 +677,10 @@ func (m *LaunchTasksMessage) GetOfferIds() []*OfferID { return nil } +// * +// Notifies the scheduler that a particular offer is not longer valid. +// +// See scheduler::Event::Rescind. type RescindResourceOfferMessage struct { OfferId *OfferID `protobuf:"bytes,1,req,name=offer_id" json:"offer_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -607,6 +696,11 @@ func (m *RescindResourceOfferMessage) GetOfferId() *OfferID { return nil } +// * +// Removes all filters previously set by the scheduler. +// +// Used by the pre-Event/Call Mesos scheduler driver. +// See scheduler::Call::Revive. type ReviveOffersMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -622,6 +716,13 @@ func (m *ReviveOffersMessage) GetFrameworkId() *FrameworkID { return nil } +// * +// Depending on the `TaskInfo`, this message either notifies an existing +// executor to run the task, or starts a new executor and runs the task. +// This message is sent when scheduler::Call::Accept is sent with +// Offer::Operation::Launch. +// +// See executor::Event::Launch. type RunTaskMessage struct { // TODO(karya): Remove framework_id after MESOS-2559 has shipped. FrameworkId *FrameworkID `protobuf:"bytes,1,opt,name=framework_id" json:"framework_id,omitempty"` @@ -630,7 +731,7 @@ type RunTaskMessage struct { // The pid of the framework. This was moved to 'optional' in // 0.24.0 to support schedulers using the HTTP API. For now, we // continue to always set pid since it was required in 0.23.x. - // When 'pid' is unset, or set to empty string, the slave will + // When 'pid' is unset, or set to empty string, the agent will // forward executor messages through the master. For schedulers // still using the driver, this will remain set. Pid *string `protobuf:"bytes,3,opt,name=pid" json:"pid,omitempty"` @@ -668,9 +769,13 @@ func (m *RunTaskMessage) GetPid() string { return "" } +// * +// Kills a specific task. +// +// See scheduler::Call::Kill and executor::Event::Kill. type KillTaskMessage struct { // TODO(bmahler): Include the SlaveID here to improve the Master's - // ability to respond for non-activated slaves. + // ability to respond for non-activated agents. FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` TaskId *TaskID `protobuf:"bytes,2,req,name=task_id" json:"task_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -693,12 +798,17 @@ func (m *KillTaskMessage) GetTaskId() *TaskID { return nil } -// NOTE: If 'pid' is present, scheduler driver sends an -// acknowledgement to the pid. +// * +// Sends a task status update to the scheduler. +// +// See scheduler::Event::Update. type StatusUpdateMessage struct { - Update *StatusUpdate `protobuf:"bytes,1,req,name=update" json:"update,omitempty"` - Pid *string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"` - XXX_unrecognized []byte `json:"-"` + Update *StatusUpdate `protobuf:"bytes,1,req,name=update" json:"update,omitempty"` + // If present, scheduler driver automatically sends an acknowledgement + // to the `pid`. This only applies to the pre-Event/Call Mesos + // scheduler driver. + Pid *string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *StatusUpdateMessage) Reset() { *m = StatusUpdateMessage{} } @@ -718,6 +828,11 @@ func (m *StatusUpdateMessage) GetPid() string { return "" } +// * +// This message is used by the scheduler to acknowledge the receipt of a status +// update. Mesos forwards the acknowledgement to the executor running the task. +// +// See scheduler::Call::Acknowledge and executor::Event::Acknowledged. type StatusUpdateAcknowledgementMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` FrameworkId *FrameworkID `protobuf:"bytes,2,req,name=framework_id" json:"framework_id,omitempty"` @@ -757,6 +872,10 @@ func (m *StatusUpdateAcknowledgementMessage) GetUuid() []byte { return nil } +// * +// Notifies the scheduler that the agent was lost. +// +// See scheduler::Event::Failure. type LostSlaveMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -772,10 +891,11 @@ func (m *LostSlaveMessage) GetSlaveId() *SlaveID { return nil } -// Allows the framework to query the status for non-terminal tasks. +// * +// Allows the scheduler to query the status for non-terminal tasks. // This causes the master to send back the latest task status for -// each task in 'statuses', if possible. Tasks that are no longer -// known will result in a TASK_LOST update. If statuses is empty, +// each task in `statuses`, if possible. Tasks that are no longer +// known will result in a `TASK_LOST` update. If `statuses` is empty, // then the master will send the latest status for each task // currently known. type ReconcileTasksMessage struct { @@ -801,6 +921,10 @@ func (m *ReconcileTasksMessage) GetStatuses() []*TaskStatus { return nil } +// * +// Notifies the framework about errors during registration. +// +// See scheduler::Event::Error. type FrameworkErrorMessage struct { Message *string `protobuf:"bytes,2,req,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -816,14 +940,19 @@ func (m *FrameworkErrorMessage) GetMessage() string { return "" } +// * +// Registers the agent with the master. +// +// If registration fails, a `ShutdownMessage` is sent to the agent. +// Failure conditions are documented inline in Master::registerSlave. type RegisterSlaveMessage struct { Slave *SlaveInfo `protobuf:"bytes,1,req,name=slave" json:"slave,omitempty"` - // Resources that are checkpointed by the slave (e.g., persistent + // Resources that are checkpointed by the agent (e.g., persistent // volume or dynamic reservation). Frameworks need to release // checkpointed resources explicitly. CheckpointedResources []*Resource `protobuf:"bytes,3,rep,name=checkpointed_resources" json:"checkpointed_resources,omitempty"` - // NOTE: This is a hack for the master to detect the slave's - // version. If unset the slave is < 0.21.0. + // NOTE: This is a hack for the master to detect the agent's + // version. If unset the agent is < 0.21.0. // TODO(bmahler): Do proper versioning: MESOS-986. Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -853,17 +982,24 @@ func (m *RegisterSlaveMessage) GetVersion() string { return "" } +// * +// Registers the agent with the master. +// This is used when the agent has previously registered and +// the master changes to a newly elected master. +// +// If registration fails, a `ShutdownMessage` is sent to the agent. +// Failure conditions are documented inline in Master::reregisterSlave. type ReregisterSlaveMessage struct { Slave *SlaveInfo `protobuf:"bytes,2,req,name=slave" json:"slave,omitempty"` - // Resources that are checkpointed by the slave (e.g., persistent + // Resources that are checkpointed by the agent (e.g., persistent // volume or dynamic reservation). Frameworks need to release // checkpointed resources explicitly. CheckpointedResources []*Resource `protobuf:"bytes,7,rep,name=checkpointed_resources" json:"checkpointed_resources,omitempty"` ExecutorInfos []*ExecutorInfo `protobuf:"bytes,4,rep,name=executor_infos" json:"executor_infos,omitempty"` Tasks []*Task `protobuf:"bytes,3,rep,name=tasks" json:"tasks,omitempty"` CompletedFrameworks []*Archive_Framework `protobuf:"bytes,5,rep,name=completed_frameworks" json:"completed_frameworks,omitempty"` - // NOTE: This is a hack for the master to detect the slave's - // version. If unset the slave is < 0.21.0. + // NOTE: This is a hack for the master to detect the agent's + // version. If unset the agent is < 0.21.0. // TODO(bmahler): Do proper versioning: MESOS-986. Version *string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -914,6 +1050,9 @@ func (m *ReregisterSlaveMessage) GetVersion() string { return "" } +// * +// Notifies the agent that the master has registered it. +// The `slave_id` holds a unique ID for distinguishing this agent. type SlaveRegisteredMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` Connection *MasterSlaveConnection `protobuf:"bytes,2,opt,name=connection" json:"connection,omitempty"` @@ -937,8 +1076,14 @@ func (m *SlaveRegisteredMessage) GetConnection() *MasterSlaveConnection { return nil } +// * +// Notifies the agent that the master has reregistered it. +// This message is used in the same conditions as `ReregisterSlaveMessage`. type SlaveReregisteredMessage struct { - SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` + SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` + // Contains a list of non-terminal tasks that the master believes to + // be running on the agent. The agent should respond `TASK_LOST` to + // any tasks that are unknown, so the master knows to remove those. Reconciliations []*ReconcileTasksMessage `protobuf:"bytes,2,rep,name=reconciliations" json:"reconciliations,omitempty"` Connection *MasterSlaveConnection `protobuf:"bytes,3,opt,name=connection" json:"connection,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -968,6 +1113,9 @@ func (m *SlaveReregisteredMessage) GetConnection() *MasterSlaveConnection { return nil } +// * +// This message is sent by the agent to the master during agent shutdown. +// The master updates its state to reflect the removed agent. type UnregisterSlaveMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -983,10 +1131,12 @@ func (m *UnregisterSlaveMessage) GetSlaveId() *SlaveID { return nil } +// * +// Describes the connection between the master and agent. type MasterSlaveConnection struct { // Product of max_slave_ping_timeouts * slave_ping_timeout. // If no pings are received within the total timeout, - // the master will remove the slave. + // the master will remove the agent. TotalPingTimeoutSeconds *float64 `protobuf:"fixed64,1,opt,name=total_ping_timeout_seconds" json:"total_ping_timeout_seconds,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -1001,8 +1151,9 @@ func (m *MasterSlaveConnection) GetTotalPingTimeoutSeconds() float64 { return 0 } -// This message is periodically sent by the master to the slave. -// If the slave is connected to the master, "connected" is true. +// * +// This message is periodically sent by the master to the agent. +// If the agent is connected to the master, "connected" is true. type PingSlaveMessage struct { Connected *bool `protobuf:"varint,1,req,name=connected" json:"connected,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -1018,8 +1169,9 @@ func (m *PingSlaveMessage) GetConnected() bool { return false } -// This message is sent by the slave to the master in response to the -// PingSlaveMessage. +// * +// This message is sent by the agent to the master in response to the +// `PingSlaveMessage`. type PongSlaveMessage struct { XXX_unrecognized []byte `json:"-"` } @@ -1027,7 +1179,8 @@ type PongSlaveMessage struct { func (m *PongSlaveMessage) Reset() { *m = PongSlaveMessage{} } func (*PongSlaveMessage) ProtoMessage() {} -// Tells a slave to shut down all executors of the given framework. +// * +// Tells an agent to shut down all executors of the given framework. type ShutdownFrameworkMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -1043,10 +1196,11 @@ func (m *ShutdownFrameworkMessage) GetFrameworkId() *FrameworkID { return nil } -// Tells a slave (and consequently executor) to shutdown an executor. +// * +// Tells an agent (and consequently the executor) to shutdown an executor. type ShutdownExecutorMessage struct { // TODO(vinod): Make these fields required. These are made optional - // for backwards compatibility between 0.23.0 slave and pre 0.23.0 + // for backwards compatibility between 0.23.0 agent and pre 0.23.0 // executor driver. ExecutorId *ExecutorID `protobuf:"bytes,1,opt,name=executor_id" json:"executor_id,omitempty"` FrameworkId *FrameworkID `protobuf:"bytes,2,opt,name=framework_id" json:"framework_id,omitempty"` @@ -1070,6 +1224,8 @@ func (m *ShutdownExecutorMessage) GetFrameworkId() *FrameworkID { return nil } +// * +// Broadcasts updated framework information from master to all agents. type UpdateFrameworkMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` // See the comment on RunTaskMessage.pid. @@ -1094,7 +1250,8 @@ func (m *UpdateFrameworkMessage) GetPid() string { return "" } -// This message is sent to the slave whenever there is an update of +// * +// This message is sent to the agent whenever there is an update of // the resources that need to be checkpointed (e.g., persistent volume // or dynamic reservation). type CheckpointResourcesMessage struct { @@ -1112,7 +1269,8 @@ func (m *CheckpointResourcesMessage) GetResources() []*Resource { return nil } -// This message is sent by the slave to the master to inform the +// * +// This message is sent by the agent to the master to inform the // master about the total amount of oversubscribed (allocated and // allocatable) resources. type UpdateSlaveMessage struct { @@ -1138,6 +1296,10 @@ func (m *UpdateSlaveMessage) GetOversubscribedResources() []*Resource { return nil } +// * +// Subscribes the executor with the agent to receive events. +// +// See executor::Call::Subscribe. type RegisterExecutorMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` ExecutorId *ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"` @@ -1161,6 +1323,10 @@ func (m *RegisterExecutorMessage) GetExecutorId() *ExecutorID { return nil } +// * +// Notifies the executor that the agent has registered it. +// +// See executor::Event::Subscribed. type ExecutorRegisteredMessage struct { ExecutorInfo *ExecutorInfo `protobuf:"bytes,2,req,name=executor_info" json:"executor_info,omitempty"` FrameworkId *FrameworkID `protobuf:"bytes,3,req,name=framework_id" json:"framework_id,omitempty"` @@ -1208,6 +1374,10 @@ func (m *ExecutorRegisteredMessage) GetSlaveInfo() *SlaveInfo { return nil } +// * +// Notifies the executor that the agent has reregistered it. +// +// See executor::Event::Subscribed. type ExecutorReregisteredMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` SlaveInfo *SlaveInfo `protobuf:"bytes,2,req,name=slave_info" json:"slave_info,omitempty"` @@ -1231,6 +1401,10 @@ func (m *ExecutorReregisteredMessage) GetSlaveInfo() *SlaveInfo { return nil } +// * +// Notifies the scheduler about terminated executors. +// +// See scheduler::Event::Failure. type ExitedExecutorMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` FrameworkId *FrameworkID `protobuf:"bytes,2,req,name=framework_id" json:"framework_id,omitempty"` @@ -1270,6 +1444,9 @@ func (m *ExitedExecutorMessage) GetStatus() int32 { return 0 } +// * +// Reestablishes the connection between executor and agent after agent failover. +// This message originates from the agent. type ReconnectExecutorMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -1285,6 +1462,12 @@ func (m *ReconnectExecutorMessage) GetSlaveId() *SlaveID { return nil } +// * +// Subscribes the executor with the agent to receive events. +// This is used after a disconnection. The executor must include +// any unacknowledged tasks or updates. +// +// See executor::Call::Subscribe. type ReregisterExecutorMessage struct { ExecutorId *ExecutorID `protobuf:"bytes,1,req,name=executor_id" json:"executor_id,omitempty"` FrameworkId *FrameworkID `protobuf:"bytes,2,req,name=framework_id" json:"framework_id,omitempty"` @@ -1324,6 +1507,10 @@ func (m *ReregisterExecutorMessage) GetUpdates() []*StatusUpdate { return nil } +// * +// Sends a free-form message from the master to an agent. +// The agent should gracefully terminate in response, which includes +// shutting down all executors and tasks on the agent. type ShutdownMessage struct { Message *string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -1387,11 +1574,12 @@ func (m *Archive_Framework) GetTasks() []*Task { return nil } +// * // Message describing task current health status that is sent by // the task health checker to the command executor. // The command executor reports the task status back to the -// on each receive. If the health checker configured faiure -// condition meets, then kill_task flag will be set to true which +// on each receive. If the health checker configured failure +// condition meets, then `kill_task` flag will be set to true which // the executor on message receive will kill the task. type TaskHealthStatus struct { TaskId *TaskID `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"` @@ -2589,6 +2777,14 @@ func (this *ResourceOffersMessage) VerboseEqual(that interface{}) error { return fmt.Errorf("Pids this[%v](%v) Not Equal that[%v](%v)", i, this.Pids[i], i, that1.Pids[i]) } } + if len(this.InverseOffers) != len(that1.InverseOffers) { + return fmt.Errorf("InverseOffers this(%v) Not Equal that(%v)", len(this.InverseOffers), len(that1.InverseOffers)) + } + for i := range this.InverseOffers { + if !this.InverseOffers[i].Equal(that1.InverseOffers[i]) { + return fmt.Errorf("InverseOffers this[%v](%v) Not Equal that[%v](%v)", i, this.InverseOffers[i], i, that1.InverseOffers[i]) + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -2630,6 +2826,14 @@ func (this *ResourceOffersMessage) Equal(that interface{}) bool { return false } } + if len(this.InverseOffers) != len(that1.InverseOffers) { + return false + } + for i := range this.InverseOffers { + if !this.InverseOffers[i].Equal(that1.InverseOffers[i]) { + return false + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -5416,7 +5620,7 @@ func (this *ResourceOffersMessage) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&mesosproto.ResourceOffersMessage{") if this.Offers != nil { s = append(s, "Offers: "+fmt.Sprintf("%#v", this.Offers)+",\n") @@ -5424,6 +5628,9 @@ func (this *ResourceOffersMessage) GoString() string { if this.Pids != nil { s = append(s, "Pids: "+fmt.Sprintf("%#v", this.Pids)+",\n") } + if this.InverseOffers != nil { + s = append(s, "InverseOffers: "+fmt.Sprintf("%#v", this.InverseOffers)+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -6865,6 +7072,18 @@ func (m *ResourceOffersMessage) MarshalTo(data []byte) (int, error) { i += copy(data[i:], s) } } + if len(m.InverseOffers) > 0 { + for _, msg := range m.InverseOffers { + data[i] = 0x1a + i++ + i = encodeVarintMessages(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } @@ -8668,8 +8887,15 @@ func NewPopulatedResourceOffersMessage(r randyMessages, easy bool) *ResourceOffe this.Pids[i] = randStringMessages(r) } } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.InverseOffers = make([]*InverseOffer, v20) + for i := 0; i < v20; i++ { + this.InverseOffers[i] = NewPopulatedInverseOffer(r, easy) + } + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMessages(r, 3) + this.XXX_unrecognized = randUnrecognizedMessages(r, 4) } return this } @@ -8678,17 +8904,17 @@ func NewPopulatedLaunchTasksMessage(r randyMessages, easy bool) *LaunchTasksMess this := &LaunchTasksMessage{} this.FrameworkId = NewPopulatedFrameworkID(r, easy) if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Tasks = make([]*TaskInfo, v20) - for i := 0; i < v20; i++ { + v21 := r.Intn(10) + this.Tasks = make([]*TaskInfo, v21) + for i := 0; i < v21; i++ { this.Tasks[i] = NewPopulatedTaskInfo(r, easy) } } this.Filters = NewPopulatedFilters(r, easy) if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.OfferIds = make([]*OfferID, v21) - for i := 0; i < v21; i++ { + v22 := r.Intn(10) + this.OfferIds = make([]*OfferID, v22) + for i := 0; i < v22; i++ { this.OfferIds[i] = NewPopulatedOfferID(r, easy) } } @@ -8723,8 +8949,8 @@ func NewPopulatedRunTaskMessage(r randyMessages, easy bool) *RunTaskMessage { } this.Framework = NewPopulatedFrameworkInfo(r, easy) if r.Intn(10) != 0 { - v22 := randStringMessages(r) - this.Pid = &v22 + v23 := randStringMessages(r) + this.Pid = &v23 } this.Task = NewPopulatedTaskInfo(r, easy) if !easy && r.Intn(10) != 0 { @@ -8747,8 +8973,8 @@ func NewPopulatedStatusUpdateMessage(r randyMessages, easy bool) *StatusUpdateMe this := &StatusUpdateMessage{} this.Update = NewPopulatedStatusUpdate(r, easy) if r.Intn(10) != 0 { - v23 := randStringMessages(r) - this.Pid = &v23 + v24 := randStringMessages(r) + this.Pid = &v24 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 3) @@ -8761,9 +8987,9 @@ func NewPopulatedStatusUpdateAcknowledgementMessage(r randyMessages, easy bool) this.SlaveId = NewPopulatedSlaveID(r, easy) this.FrameworkId = NewPopulatedFrameworkID(r, easy) this.TaskId = NewPopulatedTaskID(r, easy) - v24 := r.Intn(100) - this.Uuid = make([]byte, v24) - for i := 0; i < v24; i++ { + v25 := r.Intn(100) + this.Uuid = make([]byte, v25) + for i := 0; i < v25; i++ { this.Uuid[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -8785,9 +9011,9 @@ func NewPopulatedReconcileTasksMessage(r randyMessages, easy bool) *ReconcileTas this := &ReconcileTasksMessage{} this.FrameworkId = NewPopulatedFrameworkID(r, easy) if r.Intn(10) != 0 { - v25 := r.Intn(10) - this.Statuses = make([]*TaskStatus, v25) - for i := 0; i < v25; i++ { + v26 := r.Intn(10) + this.Statuses = make([]*TaskStatus, v26) + for i := 0; i < v26; i++ { this.Statuses[i] = NewPopulatedTaskStatus(r, easy) } } @@ -8799,8 +9025,8 @@ func NewPopulatedReconcileTasksMessage(r randyMessages, easy bool) *ReconcileTas func NewPopulatedFrameworkErrorMessage(r randyMessages, easy bool) *FrameworkErrorMessage { this := &FrameworkErrorMessage{} - v26 := randStringMessages(r) - this.Message = &v26 + v27 := randStringMessages(r) + this.Message = &v27 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 3) } @@ -8811,13 +9037,13 @@ func NewPopulatedRegisterSlaveMessage(r randyMessages, easy bool) *RegisterSlave this := &RegisterSlaveMessage{} this.Slave = NewPopulatedSlaveInfo(r, easy) if r.Intn(10) != 0 { - v27 := randStringMessages(r) - this.Version = &v27 + v28 := randStringMessages(r) + this.Version = &v28 } if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.CheckpointedResources = make([]*Resource, v28) - for i := 0; i < v28; i++ { + v29 := r.Intn(10) + this.CheckpointedResources = make([]*Resource, v29) + for i := 0; i < v29; i++ { this.CheckpointedResources[i] = NewPopulatedResource(r, easy) } } @@ -8831,34 +9057,34 @@ func NewPopulatedReregisterSlaveMessage(r randyMessages, easy bool) *ReregisterS this := &ReregisterSlaveMessage{} this.Slave = NewPopulatedSlaveInfo(r, easy) if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.Tasks = make([]*Task, v29) - for i := 0; i < v29; i++ { + v30 := r.Intn(10) + this.Tasks = make([]*Task, v30) + for i := 0; i < v30; i++ { this.Tasks[i] = NewPopulatedTask(r, easy) } } if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.ExecutorInfos = make([]*ExecutorInfo, v30) - for i := 0; i < v30; i++ { + v31 := r.Intn(10) + this.ExecutorInfos = make([]*ExecutorInfo, v31) + for i := 0; i < v31; i++ { this.ExecutorInfos[i] = NewPopulatedExecutorInfo(r, easy) } } if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.CompletedFrameworks = make([]*Archive_Framework, v31) - for i := 0; i < v31; i++ { + v32 := r.Intn(10) + this.CompletedFrameworks = make([]*Archive_Framework, v32) + for i := 0; i < v32; i++ { this.CompletedFrameworks[i] = NewPopulatedArchive_Framework(r, easy) } } if r.Intn(10) != 0 { - v32 := randStringMessages(r) - this.Version = &v32 + v33 := randStringMessages(r) + this.Version = &v33 } if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.CheckpointedResources = make([]*Resource, v33) - for i := 0; i < v33; i++ { + v34 := r.Intn(10) + this.CheckpointedResources = make([]*Resource, v34) + for i := 0; i < v34; i++ { this.CheckpointedResources[i] = NewPopulatedResource(r, easy) } } @@ -8884,9 +9110,9 @@ func NewPopulatedSlaveReregisteredMessage(r randyMessages, easy bool) *SlaveRere this := &SlaveReregisteredMessage{} this.SlaveId = NewPopulatedSlaveID(r, easy) if r.Intn(10) != 0 { - v34 := r.Intn(10) - this.Reconciliations = make([]*ReconcileTasksMessage, v34) - for i := 0; i < v34; i++ { + v35 := r.Intn(10) + this.Reconciliations = make([]*ReconcileTasksMessage, v35) + for i := 0; i < v35; i++ { this.Reconciliations[i] = NewPopulatedReconcileTasksMessage(r, easy) } } @@ -8911,11 +9137,11 @@ func NewPopulatedUnregisterSlaveMessage(r randyMessages, easy bool) *UnregisterS func NewPopulatedMasterSlaveConnection(r randyMessages, easy bool) *MasterSlaveConnection { this := &MasterSlaveConnection{} if r.Intn(10) != 0 { - v35 := float64(r.Float64()) + v36 := float64(r.Float64()) if r.Intn(2) == 0 { - v35 *= -1 + v36 *= -1 } - this.TotalPingTimeoutSeconds = &v35 + this.TotalPingTimeoutSeconds = &v36 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 2) @@ -8925,8 +9151,8 @@ func NewPopulatedMasterSlaveConnection(r randyMessages, easy bool) *MasterSlaveC func NewPopulatedPingSlaveMessage(r randyMessages, easy bool) *PingSlaveMessage { this := &PingSlaveMessage{} - v36 := bool(bool(r.Intn(2) == 0)) - this.Connected = &v36 + v37 := bool(bool(r.Intn(2) == 0)) + this.Connected = &v37 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 2) } @@ -8968,8 +9194,8 @@ func NewPopulatedUpdateFrameworkMessage(r randyMessages, easy bool) *UpdateFrame this := &UpdateFrameworkMessage{} this.FrameworkId = NewPopulatedFrameworkID(r, easy) if r.Intn(10) != 0 { - v37 := randStringMessages(r) - this.Pid = &v37 + v38 := randStringMessages(r) + this.Pid = &v38 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 3) @@ -8980,9 +9206,9 @@ func NewPopulatedUpdateFrameworkMessage(r randyMessages, easy bool) *UpdateFrame func NewPopulatedCheckpointResourcesMessage(r randyMessages, easy bool) *CheckpointResourcesMessage { this := &CheckpointResourcesMessage{} if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.Resources = make([]*Resource, v38) - for i := 0; i < v38; i++ { + v39 := r.Intn(10) + this.Resources = make([]*Resource, v39) + for i := 0; i < v39; i++ { this.Resources[i] = NewPopulatedResource(r, easy) } } @@ -8996,9 +9222,9 @@ func NewPopulatedUpdateSlaveMessage(r randyMessages, easy bool) *UpdateSlaveMess this := &UpdateSlaveMessage{} this.SlaveId = NewPopulatedSlaveID(r, easy) if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.OversubscribedResources = make([]*Resource, v39) - for i := 0; i < v39; i++ { + v40 := r.Intn(10) + this.OversubscribedResources = make([]*Resource, v40) + for i := 0; i < v40; i++ { this.OversubscribedResources[i] = NewPopulatedResource(r, easy) } } @@ -9046,11 +9272,11 @@ func NewPopulatedExitedExecutorMessage(r randyMessages, easy bool) *ExitedExecut this.SlaveId = NewPopulatedSlaveID(r, easy) this.FrameworkId = NewPopulatedFrameworkID(r, easy) this.ExecutorId = NewPopulatedExecutorID(r, easy) - v40 := int32(r.Int31()) + v41 := int32(r.Int31()) if r.Intn(2) == 0 { - v40 *= -1 + v41 *= -1 } - this.Status = &v40 + this.Status = &v41 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 5) } @@ -9071,16 +9297,16 @@ func NewPopulatedReregisterExecutorMessage(r randyMessages, easy bool) *Reregist this.ExecutorId = NewPopulatedExecutorID(r, easy) this.FrameworkId = NewPopulatedFrameworkID(r, easy) if r.Intn(10) != 0 { - v41 := r.Intn(10) - this.Tasks = make([]*TaskInfo, v41) - for i := 0; i < v41; i++ { + v42 := r.Intn(10) + this.Tasks = make([]*TaskInfo, v42) + for i := 0; i < v42; i++ { this.Tasks[i] = NewPopulatedTaskInfo(r, easy) } } if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Updates = make([]*StatusUpdate, v42) - for i := 0; i < v42; i++ { + v43 := r.Intn(10) + this.Updates = make([]*StatusUpdate, v43) + for i := 0; i < v43; i++ { this.Updates[i] = NewPopulatedStatusUpdate(r, easy) } } @@ -9093,8 +9319,8 @@ func NewPopulatedReregisterExecutorMessage(r randyMessages, easy bool) *Reregist func NewPopulatedShutdownMessage(r randyMessages, easy bool) *ShutdownMessage { this := &ShutdownMessage{} if r.Intn(10) != 0 { - v43 := randStringMessages(r) - this.Message = &v43 + v44 := randStringMessages(r) + this.Message = &v44 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 2) @@ -9105,9 +9331,9 @@ func NewPopulatedShutdownMessage(r randyMessages, easy bool) *ShutdownMessage { func NewPopulatedArchive(r randyMessages, easy bool) *Archive { this := &Archive{} if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Frameworks = make([]*Archive_Framework, v44) - for i := 0; i < v44; i++ { + v45 := r.Intn(10) + this.Frameworks = make([]*Archive_Framework, v45) + for i := 0; i < v45; i++ { this.Frameworks[i] = NewPopulatedArchive_Framework(r, easy) } } @@ -9121,13 +9347,13 @@ func NewPopulatedArchive_Framework(r randyMessages, easy bool) *Archive_Framewor this := &Archive_Framework{} this.FrameworkInfo = NewPopulatedFrameworkInfo(r, easy) if r.Intn(10) != 0 { - v45 := randStringMessages(r) - this.Pid = &v45 + v46 := randStringMessages(r) + this.Pid = &v46 } if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Tasks = make([]*Task, v46) - for i := 0; i < v46; i++ { + v47 := r.Intn(10) + this.Tasks = make([]*Task, v47) + for i := 0; i < v47; i++ { this.Tasks[i] = NewPopulatedTask(r, easy) } } @@ -9140,18 +9366,18 @@ func NewPopulatedArchive_Framework(r randyMessages, easy bool) *Archive_Framewor func NewPopulatedTaskHealthStatus(r randyMessages, easy bool) *TaskHealthStatus { this := &TaskHealthStatus{} this.TaskId = NewPopulatedTaskID(r, easy) - v47 := bool(bool(r.Intn(2) == 0)) - this.Healthy = &v47 + v48 := bool(bool(r.Intn(2) == 0)) + this.Healthy = &v48 if r.Intn(10) != 0 { - v48 := bool(bool(r.Intn(2) == 0)) - this.KillTask = &v48 + v49 := bool(bool(r.Intn(2) == 0)) + this.KillTask = &v49 } if r.Intn(10) != 0 { - v49 := int32(r.Int31()) + v50 := int32(r.Int31()) if r.Intn(2) == 0 { - v49 *= -1 + v50 *= -1 } - this.ConsecutiveFailures = &v49 + this.ConsecutiveFailures = &v50 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 5) @@ -9162,8 +9388,8 @@ func NewPopulatedTaskHealthStatus(r randyMessages, easy bool) *TaskHealthStatus func NewPopulatedHookExecuted(r randyMessages, easy bool) *HookExecuted { this := &HookExecuted{} if r.Intn(10) != 0 { - v50 := randStringMessages(r) - this.Module = &v50 + v51 := randStringMessages(r) + this.Module = &v51 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedMessages(r, 2) @@ -9190,9 +9416,9 @@ func randUTF8RuneMessages(r randyMessages) rune { return rune(ru + 61) } func randStringMessages(r randyMessages) string { - v51 := r.Intn(100) - tmps := make([]rune, v51) - for i := 0; i < v51; i++ { + v52 := r.Intn(100) + tmps := make([]rune, v52) + for i := 0; i < v52; i++ { tmps[i] = randUTF8RuneMessages(r) } return string(tmps) @@ -9214,11 +9440,11 @@ func randFieldMessages(data []byte, r randyMessages, fieldNumber int, wire int) switch wire { case 0: data = encodeVarintPopulateMessages(data, uint64(key)) - v52 := r.Int63() + v53 := r.Int63() if r.Intn(2) == 0 { - v52 *= -1 + v53 *= -1 } - data = encodeVarintPopulateMessages(data, uint64(v52)) + data = encodeVarintPopulateMessages(data, uint64(v53)) case 1: data = encodeVarintPopulateMessages(data, uint64(key)) data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -9555,6 +9781,12 @@ func (m *ResourceOffersMessage) Size() (n int) { n += 1 + l + sovMessages(uint64(l)) } } + if len(m.InverseOffers) > 0 { + for _, e := range m.InverseOffers { + l = e.Size() + n += 1 + l + sovMessages(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -10394,6 +10626,7 @@ func (this *ResourceOffersMessage) String() string { s := strings.Join([]string{`&ResourceOffersMessage{`, `Offers:` + strings.Replace(fmt.Sprintf("%v", this.Offers), "Offer", "Offer", 1) + `,`, `Pids:` + fmt.Sprintf("%v", this.Pids) + `,`, + `InverseOffers:` + strings.Replace(fmt.Sprintf("%v", this.InverseOffers), "InverseOffer", "InverseOffer", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -10827,8 +11060,12 @@ func (m *Task) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -10841,6 +11078,12 @@ func (m *Task) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Task: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Task: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -10848,6 +11091,9 @@ func (m *Task) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -10876,6 +11122,9 @@ func (m *Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -10907,6 +11156,9 @@ func (m *Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -10938,6 +11190,9 @@ func (m *Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -10968,6 +11223,9 @@ func (m *Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -10999,6 +11257,9 @@ func (m *Task) Unmarshal(data []byte) error { } var v TaskState for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11017,6 +11278,9 @@ func (m *Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11045,6 +11309,9 @@ func (m *Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11073,6 +11340,9 @@ func (m *Task) Unmarshal(data []byte) error { } var v TaskState for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11090,6 +11360,9 @@ func (m *Task) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11115,6 +11388,9 @@ func (m *Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11145,6 +11421,9 @@ func (m *Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11170,15 +11449,7 @@ func (m *Task) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -11209,6 +11480,9 @@ func (m *Task) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *StatusUpdate) Unmarshal(data []byte) error { @@ -11216,8 +11490,12 @@ func (m *StatusUpdate) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11230,6 +11508,12 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -11237,6 +11521,9 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11268,6 +11555,9 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11298,6 +11588,9 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11328,6 +11621,9 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11379,6 +11675,9 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11404,6 +11703,9 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { } var v TaskState for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11416,15 +11718,7 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { } m.LatestState = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -11449,6 +11743,9 @@ func (m *StatusUpdate) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *StatusUpdateRecord) Unmarshal(data []byte) error { @@ -11456,8 +11753,12 @@ func (m *StatusUpdateRecord) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11470,6 +11771,12 @@ func (m *StatusUpdateRecord) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusUpdateRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusUpdateRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -11477,6 +11784,9 @@ func (m *StatusUpdateRecord) Unmarshal(data []byte) error { } var v StatusUpdateRecord_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11495,6 +11805,9 @@ func (m *StatusUpdateRecord) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11525,6 +11838,9 @@ func (m *StatusUpdateRecord) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11545,15 +11861,7 @@ func (m *StatusUpdateRecord) Unmarshal(data []byte) error { m.Uuid = append([]byte{}, data[iNdEx:postIndex]...) iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -11572,6 +11880,9 @@ func (m *StatusUpdateRecord) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *SubmitSchedulerRequest) Unmarshal(data []byte) error { @@ -11579,8 +11890,12 @@ func (m *SubmitSchedulerRequest) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11593,6 +11908,12 @@ func (m *SubmitSchedulerRequest) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubmitSchedulerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubmitSchedulerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -11600,6 +11921,9 @@ func (m *SubmitSchedulerRequest) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11623,15 +11947,7 @@ func (m *SubmitSchedulerRequest) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -11650,6 +11966,9 @@ func (m *SubmitSchedulerRequest) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *SubmitSchedulerResponse) Unmarshal(data []byte) error { @@ -11657,8 +11976,12 @@ func (m *SubmitSchedulerResponse) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11671,6 +11994,12 @@ func (m *SubmitSchedulerResponse) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubmitSchedulerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubmitSchedulerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -11678,6 +12007,9 @@ func (m *SubmitSchedulerResponse) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11692,15 +12024,7 @@ func (m *SubmitSchedulerResponse) Unmarshal(data []byte) error { m.Okay = &b hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -11719,6 +12043,9 @@ func (m *SubmitSchedulerResponse) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("okay") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ExecutorToFrameworkMessage) Unmarshal(data []byte) error { @@ -11726,8 +12053,12 @@ func (m *ExecutorToFrameworkMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11740,6 +12071,12 @@ func (m *ExecutorToFrameworkMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutorToFrameworkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutorToFrameworkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -11747,6 +12084,9 @@ func (m *ExecutorToFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11778,6 +12118,9 @@ func (m *ExecutorToFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11809,6 +12152,9 @@ func (m *ExecutorToFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11840,6 +12186,9 @@ func (m *ExecutorToFrameworkMessage) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11861,15 +12210,7 @@ func (m *ExecutorToFrameworkMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000008) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -11897,6 +12238,9 @@ func (m *ExecutorToFrameworkMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *FrameworkToExecutorMessage) Unmarshal(data []byte) error { @@ -11904,8 +12248,12 @@ func (m *FrameworkToExecutorMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11918,6 +12266,12 @@ func (m *FrameworkToExecutorMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FrameworkToExecutorMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FrameworkToExecutorMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -11925,6 +12279,9 @@ func (m *FrameworkToExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11956,6 +12313,9 @@ func (m *FrameworkToExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -11987,6 +12347,9 @@ func (m *FrameworkToExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12018,6 +12381,9 @@ func (m *FrameworkToExecutorMessage) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12039,15 +12405,7 @@ func (m *FrameworkToExecutorMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000008) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12075,6 +12433,9 @@ func (m *FrameworkToExecutorMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RegisterFrameworkMessage) Unmarshal(data []byte) error { @@ -12082,8 +12443,12 @@ func (m *RegisterFrameworkMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12096,6 +12461,12 @@ func (m *RegisterFrameworkMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegisterFrameworkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisterFrameworkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -12103,6 +12474,9 @@ func (m *RegisterFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12129,15 +12503,7 @@ func (m *RegisterFrameworkMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12156,6 +12522,9 @@ func (m *RegisterFrameworkMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ReregisterFrameworkMessage) Unmarshal(data []byte) error { @@ -12163,8 +12532,12 @@ func (m *ReregisterFrameworkMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12177,6 +12550,12 @@ func (m *ReregisterFrameworkMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReregisterFrameworkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReregisterFrameworkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 2: if wireType != 2 { @@ -12184,6 +12563,9 @@ func (m *ReregisterFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12215,6 +12597,9 @@ func (m *ReregisterFrameworkMessage) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12229,15 +12614,7 @@ func (m *ReregisterFrameworkMessage) Unmarshal(data []byte) error { m.Failover = &b hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12259,6 +12636,9 @@ func (m *ReregisterFrameworkMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("failover") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *FrameworkRegisteredMessage) Unmarshal(data []byte) error { @@ -12266,8 +12646,12 @@ func (m *FrameworkRegisteredMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12280,6 +12664,12 @@ func (m *FrameworkRegisteredMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FrameworkRegisteredMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FrameworkRegisteredMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -12287,6 +12677,9 @@ func (m *FrameworkRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12318,6 +12711,9 @@ func (m *FrameworkRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12344,15 +12740,7 @@ func (m *FrameworkRegisteredMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12374,6 +12762,9 @@ func (m *FrameworkRegisteredMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("master_info") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *FrameworkReregisteredMessage) Unmarshal(data []byte) error { @@ -12381,8 +12772,12 @@ func (m *FrameworkReregisteredMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12395,6 +12790,12 @@ func (m *FrameworkReregisteredMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FrameworkReregisteredMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FrameworkReregisteredMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -12402,6 +12803,9 @@ func (m *FrameworkReregisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12433,6 +12837,9 @@ func (m *FrameworkReregisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12459,15 +12866,7 @@ func (m *FrameworkReregisteredMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12489,6 +12888,9 @@ func (m *FrameworkReregisteredMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("master_info") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *UnregisterFrameworkMessage) Unmarshal(data []byte) error { @@ -12496,8 +12898,12 @@ func (m *UnregisterFrameworkMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12510,6 +12916,12 @@ func (m *UnregisterFrameworkMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnregisterFrameworkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnregisterFrameworkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -12517,6 +12929,9 @@ func (m *UnregisterFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12543,15 +12958,7 @@ func (m *UnregisterFrameworkMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12570,6 +12977,9 @@ func (m *UnregisterFrameworkMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *DeactivateFrameworkMessage) Unmarshal(data []byte) error { @@ -12577,8 +12987,12 @@ func (m *DeactivateFrameworkMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12591,6 +13005,12 @@ func (m *DeactivateFrameworkMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeactivateFrameworkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeactivateFrameworkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -12598,6 +13018,9 @@ func (m *DeactivateFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12624,15 +13047,7 @@ func (m *DeactivateFrameworkMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12651,6 +13066,9 @@ func (m *DeactivateFrameworkMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ResourceRequestMessage) Unmarshal(data []byte) error { @@ -12658,8 +13076,12 @@ func (m *ResourceRequestMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12672,6 +13094,12 @@ func (m *ResourceRequestMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceRequestMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceRequestMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -12679,6 +13107,9 @@ func (m *ResourceRequestMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12710,6 +13141,9 @@ func (m *ResourceRequestMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12733,15 +13167,7 @@ func (m *ResourceRequestMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12760,14 +13186,21 @@ func (m *ResourceRequestMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ResourceOffersMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12780,6 +13213,12 @@ func (m *ResourceOffersMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceOffersMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceOffersMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -12787,6 +13226,9 @@ func (m *ResourceOffersMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12815,6 +13257,9 @@ func (m *ResourceOffersMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12835,16 +13280,39 @@ func (m *ResourceOffersMessage) Unmarshal(data []byte) error { } m.Pids = append(m.Pids, string(data[iNdEx:postIndex])) iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InverseOffers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InverseOffers = append(m.InverseOffers, &InverseOffer{}) + if err := m.InverseOffers[len(m.InverseOffers)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -12860,6 +13328,9 @@ func (m *ResourceOffersMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *LaunchTasksMessage) Unmarshal(data []byte) error { @@ -12867,8 +13338,12 @@ func (m *LaunchTasksMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12881,6 +13356,12 @@ func (m *LaunchTasksMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LaunchTasksMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LaunchTasksMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -12888,6 +13369,9 @@ func (m *LaunchTasksMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12919,6 +13403,9 @@ func (m *LaunchTasksMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12947,6 +13434,9 @@ func (m *LaunchTasksMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -12978,6 +13468,9 @@ func (m *LaunchTasksMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13001,15 +13494,7 @@ func (m *LaunchTasksMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13031,6 +13516,9 @@ func (m *LaunchTasksMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("filters") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RescindResourceOfferMessage) Unmarshal(data []byte) error { @@ -13038,8 +13526,12 @@ func (m *RescindResourceOfferMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13052,6 +13544,12 @@ func (m *RescindResourceOfferMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RescindResourceOfferMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RescindResourceOfferMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -13059,6 +13557,9 @@ func (m *RescindResourceOfferMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13085,15 +13586,7 @@ func (m *RescindResourceOfferMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13112,6 +13605,9 @@ func (m *RescindResourceOfferMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("offer_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ReviveOffersMessage) Unmarshal(data []byte) error { @@ -13119,8 +13615,12 @@ func (m *ReviveOffersMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13133,6 +13633,12 @@ func (m *ReviveOffersMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReviveOffersMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReviveOffersMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -13140,6 +13646,9 @@ func (m *ReviveOffersMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13166,15 +13675,7 @@ func (m *ReviveOffersMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13193,6 +13694,9 @@ func (m *ReviveOffersMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RunTaskMessage) Unmarshal(data []byte) error { @@ -13200,8 +13704,12 @@ func (m *RunTaskMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13214,6 +13722,12 @@ func (m *RunTaskMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RunTaskMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RunTaskMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -13221,6 +13735,9 @@ func (m *RunTaskMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13251,6 +13768,9 @@ func (m *RunTaskMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13282,6 +13802,9 @@ func (m *RunTaskMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13309,6 +13832,9 @@ func (m *RunTaskMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13335,15 +13861,7 @@ func (m *RunTaskMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13365,6 +13883,9 @@ func (m *RunTaskMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *KillTaskMessage) Unmarshal(data []byte) error { @@ -13372,8 +13893,12 @@ func (m *KillTaskMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13386,6 +13911,12 @@ func (m *KillTaskMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KillTaskMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KillTaskMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -13393,6 +13924,9 @@ func (m *KillTaskMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13424,6 +13958,9 @@ func (m *KillTaskMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13450,15 +13987,7 @@ func (m *KillTaskMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13480,6 +14009,9 @@ func (m *KillTaskMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *StatusUpdateMessage) Unmarshal(data []byte) error { @@ -13487,8 +14019,12 @@ func (m *StatusUpdateMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13501,6 +14037,12 @@ func (m *StatusUpdateMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusUpdateMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusUpdateMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -13508,6 +14050,9 @@ func (m *StatusUpdateMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13539,6 +14084,9 @@ func (m *StatusUpdateMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13561,15 +14109,7 @@ func (m *StatusUpdateMessage) Unmarshal(data []byte) error { m.Pid = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13588,6 +14128,9 @@ func (m *StatusUpdateMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("update") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *StatusUpdateAcknowledgementMessage) Unmarshal(data []byte) error { @@ -13595,8 +14138,12 @@ func (m *StatusUpdateAcknowledgementMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13609,6 +14156,12 @@ func (m *StatusUpdateAcknowledgementMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusUpdateAcknowledgementMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusUpdateAcknowledgementMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -13616,6 +14169,9 @@ func (m *StatusUpdateAcknowledgementMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13647,6 +14203,9 @@ func (m *StatusUpdateAcknowledgementMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13678,6 +14237,9 @@ func (m *StatusUpdateAcknowledgementMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13709,6 +14271,9 @@ func (m *StatusUpdateAcknowledgementMessage) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13730,15 +14295,7 @@ func (m *StatusUpdateAcknowledgementMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000008) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13766,6 +14323,9 @@ func (m *StatusUpdateAcknowledgementMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *LostSlaveMessage) Unmarshal(data []byte) error { @@ -13773,8 +14333,12 @@ func (m *LostSlaveMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13787,6 +14351,12 @@ func (m *LostSlaveMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LostSlaveMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LostSlaveMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -13794,6 +14364,9 @@ func (m *LostSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13820,15 +14393,7 @@ func (m *LostSlaveMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13847,6 +14412,9 @@ func (m *LostSlaveMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ReconcileTasksMessage) Unmarshal(data []byte) error { @@ -13854,8 +14422,12 @@ func (m *ReconcileTasksMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13868,6 +14440,12 @@ func (m *ReconcileTasksMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReconcileTasksMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReconcileTasksMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -13875,6 +14453,9 @@ func (m *ReconcileTasksMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13906,6 +14487,9 @@ func (m *ReconcileTasksMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13929,15 +14513,7 @@ func (m *ReconcileTasksMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -13956,6 +14532,9 @@ func (m *ReconcileTasksMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *FrameworkErrorMessage) Unmarshal(data []byte) error { @@ -13963,8 +14542,12 @@ func (m *FrameworkErrorMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -13977,6 +14560,12 @@ func (m *FrameworkErrorMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FrameworkErrorMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FrameworkErrorMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 2: if wireType != 2 { @@ -13984,6 +14573,9 @@ func (m *FrameworkErrorMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14007,15 +14599,7 @@ func (m *FrameworkErrorMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14034,6 +14618,9 @@ func (m *FrameworkErrorMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RegisterSlaveMessage) Unmarshal(data []byte) error { @@ -14041,8 +14628,12 @@ func (m *RegisterSlaveMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14055,6 +14646,12 @@ func (m *RegisterSlaveMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegisterSlaveMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisterSlaveMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -14062,6 +14659,9 @@ func (m *RegisterSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14093,6 +14693,9 @@ func (m *RegisterSlaveMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14120,6 +14723,9 @@ func (m *RegisterSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14143,15 +14749,7 @@ func (m *RegisterSlaveMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14170,6 +14768,9 @@ func (m *RegisterSlaveMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { @@ -14177,8 +14778,12 @@ func (m *ReregisterSlaveMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14191,6 +14796,12 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReregisterSlaveMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReregisterSlaveMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 2: if wireType != 2 { @@ -14198,6 +14809,9 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14229,6 +14843,9 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14257,6 +14874,9 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14285,6 +14905,9 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14313,6 +14936,9 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14340,6 +14966,9 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14363,15 +14992,7 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14390,6 +15011,9 @@ func (m *ReregisterSlaveMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *SlaveRegisteredMessage) Unmarshal(data []byte) error { @@ -14397,8 +15021,12 @@ func (m *SlaveRegisteredMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14411,6 +15039,12 @@ func (m *SlaveRegisteredMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SlaveRegisteredMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SlaveRegisteredMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -14418,6 +15052,9 @@ func (m *SlaveRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14449,6 +15086,9 @@ func (m *SlaveRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14474,15 +15114,7 @@ func (m *SlaveRegisteredMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14501,6 +15133,9 @@ func (m *SlaveRegisteredMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *SlaveReregisteredMessage) Unmarshal(data []byte) error { @@ -14508,8 +15143,12 @@ func (m *SlaveReregisteredMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14522,6 +15161,12 @@ func (m *SlaveReregisteredMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SlaveReregisteredMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SlaveReregisteredMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -14529,6 +15174,9 @@ func (m *SlaveReregisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14560,6 +15208,9 @@ func (m *SlaveReregisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14588,6 +15239,9 @@ func (m *SlaveReregisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14613,15 +15267,7 @@ func (m *SlaveReregisteredMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14640,6 +15286,9 @@ func (m *SlaveReregisteredMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *UnregisterSlaveMessage) Unmarshal(data []byte) error { @@ -14647,8 +15296,12 @@ func (m *UnregisterSlaveMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14661,6 +15314,12 @@ func (m *UnregisterSlaveMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnregisterSlaveMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnregisterSlaveMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -14668,6 +15327,9 @@ func (m *UnregisterSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14694,15 +15356,7 @@ func (m *UnregisterSlaveMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14721,14 +15375,21 @@ func (m *UnregisterSlaveMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *MasterSlaveConnection) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14741,6 +15402,12 @@ func (m *MasterSlaveConnection) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MasterSlaveConnection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MasterSlaveConnection: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 1 { @@ -14762,15 +15429,7 @@ func (m *MasterSlaveConnection) Unmarshal(data []byte) error { v2 := float64(math.Float64frombits(v)) m.TotalPingTimeoutSeconds = &v2 default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14786,6 +15445,9 @@ func (m *MasterSlaveConnection) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *PingSlaveMessage) Unmarshal(data []byte) error { @@ -14793,8 +15455,12 @@ func (m *PingSlaveMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14807,6 +15473,12 @@ func (m *PingSlaveMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PingSlaveMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PingSlaveMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -14814,6 +15486,9 @@ func (m *PingSlaveMessage) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14828,15 +15503,7 @@ func (m *PingSlaveMessage) Unmarshal(data []byte) error { m.Connected = &b hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14855,14 +15522,21 @@ func (m *PingSlaveMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("connected") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *PongSlaveMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14874,17 +15548,16 @@ func (m *PongSlaveMessage) Unmarshal(data []byte) error { } } fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PongSlaveMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PongSlaveMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14900,6 +15573,9 @@ func (m *PongSlaveMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ShutdownFrameworkMessage) Unmarshal(data []byte) error { @@ -14907,8 +15583,12 @@ func (m *ShutdownFrameworkMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14921,6 +15601,12 @@ func (m *ShutdownFrameworkMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ShutdownFrameworkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShutdownFrameworkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -14928,6 +15614,9 @@ func (m *ShutdownFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -14954,15 +15643,7 @@ func (m *ShutdownFrameworkMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -14981,14 +15662,21 @@ func (m *ShutdownFrameworkMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ShutdownExecutorMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15001,6 +15689,12 @@ func (m *ShutdownExecutorMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ShutdownExecutorMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShutdownExecutorMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -15008,6 +15702,9 @@ func (m *ShutdownExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15038,6 +15735,9 @@ func (m *ShutdownExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15063,15 +15763,7 @@ func (m *ShutdownExecutorMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -15087,6 +15779,9 @@ func (m *ShutdownExecutorMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *UpdateFrameworkMessage) Unmarshal(data []byte) error { @@ -15094,8 +15789,12 @@ func (m *UpdateFrameworkMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15108,6 +15807,12 @@ func (m *UpdateFrameworkMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateFrameworkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateFrameworkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -15115,6 +15820,9 @@ func (m *UpdateFrameworkMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15146,6 +15854,9 @@ func (m *UpdateFrameworkMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15168,15 +15879,7 @@ func (m *UpdateFrameworkMessage) Unmarshal(data []byte) error { m.Pid = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -15195,14 +15898,21 @@ func (m *UpdateFrameworkMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *CheckpointResourcesMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15215,6 +15925,12 @@ func (m *CheckpointResourcesMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CheckpointResourcesMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckpointResourcesMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -15222,6 +15938,9 @@ func (m *CheckpointResourcesMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15245,15 +15964,7 @@ func (m *CheckpointResourcesMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -15269,6 +15980,9 @@ func (m *CheckpointResourcesMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *UpdateSlaveMessage) Unmarshal(data []byte) error { @@ -15276,8 +15990,12 @@ func (m *UpdateSlaveMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15290,6 +16008,12 @@ func (m *UpdateSlaveMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateSlaveMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateSlaveMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -15297,6 +16021,9 @@ func (m *UpdateSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15328,6 +16055,9 @@ func (m *UpdateSlaveMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15351,15 +16081,7 @@ func (m *UpdateSlaveMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -15378,6 +16100,9 @@ func (m *UpdateSlaveMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *RegisterExecutorMessage) Unmarshal(data []byte) error { @@ -15385,8 +16110,12 @@ func (m *RegisterExecutorMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15399,6 +16128,12 @@ func (m *RegisterExecutorMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegisterExecutorMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisterExecutorMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -15406,6 +16141,9 @@ func (m *RegisterExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15437,6 +16175,9 @@ func (m *RegisterExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15463,15 +16204,7 @@ func (m *RegisterExecutorMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -15493,6 +16226,9 @@ func (m *RegisterExecutorMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { @@ -15500,8 +16236,12 @@ func (m *ExecutorRegisteredMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15514,6 +16254,12 @@ func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutorRegisteredMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutorRegisteredMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 2: if wireType != 2 { @@ -15521,6 +16267,9 @@ func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15552,6 +16301,9 @@ func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15583,6 +16335,9 @@ func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15614,6 +16369,9 @@ func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15645,6 +16403,9 @@ func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15671,15 +16432,7 @@ func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000010) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -15710,6 +16463,9 @@ func (m *ExecutorRegisteredMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_info") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ExecutorReregisteredMessage) Unmarshal(data []byte) error { @@ -15717,8 +16473,12 @@ func (m *ExecutorReregisteredMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15731,6 +16491,12 @@ func (m *ExecutorReregisteredMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutorReregisteredMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutorReregisteredMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -15738,6 +16504,9 @@ func (m *ExecutorReregisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15769,6 +16538,9 @@ func (m *ExecutorReregisteredMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15795,15 +16567,7 @@ func (m *ExecutorReregisteredMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -15825,6 +16589,9 @@ func (m *ExecutorReregisteredMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_info") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ExitedExecutorMessage) Unmarshal(data []byte) error { @@ -15832,8 +16599,12 @@ func (m *ExitedExecutorMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15846,6 +16617,12 @@ func (m *ExitedExecutorMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExitedExecutorMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExitedExecutorMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -15853,6 +16630,9 @@ func (m *ExitedExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15884,6 +16664,9 @@ func (m *ExitedExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15915,6 +16698,9 @@ func (m *ExitedExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15946,6 +16732,9 @@ func (m *ExitedExecutorMessage) Unmarshal(data []byte) error { } var v int32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -15959,15 +16748,7 @@ func (m *ExitedExecutorMessage) Unmarshal(data []byte) error { m.Status = &v hasFields[0] |= uint64(0x00000008) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -15995,6 +16776,9 @@ func (m *ExitedExecutorMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ReconnectExecutorMessage) Unmarshal(data []byte) error { @@ -16002,8 +16786,12 @@ func (m *ReconnectExecutorMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16016,6 +16804,12 @@ func (m *ReconnectExecutorMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReconnectExecutorMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReconnectExecutorMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -16023,6 +16817,9 @@ func (m *ReconnectExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16049,15 +16846,7 @@ func (m *ReconnectExecutorMessage) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -16076,6 +16865,9 @@ func (m *ReconnectExecutorMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ReregisterExecutorMessage) Unmarshal(data []byte) error { @@ -16083,8 +16875,12 @@ func (m *ReregisterExecutorMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16097,6 +16893,12 @@ func (m *ReregisterExecutorMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReregisterExecutorMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReregisterExecutorMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -16104,6 +16906,9 @@ func (m *ReregisterExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16135,6 +16940,9 @@ func (m *ReregisterExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16166,6 +16974,9 @@ func (m *ReregisterExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16194,6 +17005,9 @@ func (m *ReregisterExecutorMessage) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16217,15 +17031,7 @@ func (m *ReregisterExecutorMessage) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -16247,14 +17053,21 @@ func (m *ReregisterExecutorMessage) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *ShutdownMessage) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16267,6 +17080,12 @@ func (m *ShutdownMessage) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ShutdownMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShutdownMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -16274,6 +17093,9 @@ func (m *ShutdownMessage) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16296,15 +17118,7 @@ func (m *ShutdownMessage) Unmarshal(data []byte) error { m.Message = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -16320,14 +17134,21 @@ func (m *ShutdownMessage) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Archive) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16340,6 +17161,12 @@ func (m *Archive) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Archive: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Archive: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -16347,6 +17174,9 @@ func (m *Archive) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16370,15 +17200,7 @@ func (m *Archive) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -16394,6 +17216,9 @@ func (m *Archive) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Archive_Framework) Unmarshal(data []byte) error { @@ -16401,8 +17226,12 @@ func (m *Archive_Framework) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16415,6 +17244,12 @@ func (m *Archive_Framework) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Framework: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Framework: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -16422,6 +17257,9 @@ func (m *Archive_Framework) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16453,6 +17291,9 @@ func (m *Archive_Framework) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16480,6 +17321,9 @@ func (m *Archive_Framework) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16503,15 +17347,7 @@ func (m *Archive_Framework) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -16530,6 +17366,9 @@ func (m *Archive_Framework) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_info") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *TaskHealthStatus) Unmarshal(data []byte) error { @@ -16537,8 +17376,12 @@ func (m *TaskHealthStatus) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16551,6 +17394,12 @@ func (m *TaskHealthStatus) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskHealthStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskHealthStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -16558,6 +17407,9 @@ func (m *TaskHealthStatus) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16589,6 +17441,9 @@ func (m *TaskHealthStatus) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16608,6 +17463,9 @@ func (m *TaskHealthStatus) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16626,6 +17484,9 @@ func (m *TaskHealthStatus) Unmarshal(data []byte) error { } var v int32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16638,15 +17499,7 @@ func (m *TaskHealthStatus) Unmarshal(data []byte) error { } m.ConsecutiveFailures = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -16668,14 +17521,21 @@ func (m *TaskHealthStatus) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("healthy") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *HookExecuted) 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 ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16688,6 +17548,12 @@ func (m *HookExecuted) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HookExecuted: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HookExecuted: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -16695,6 +17561,9 @@ func (m *HookExecuted) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -16717,15 +17586,7 @@ func (m *HookExecuted) Unmarshal(data []byte) error { m.Module = &s iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipMessages(data[iNdEx:]) if err != nil { return err @@ -16741,6 +17602,9 @@ func (m *HookExecuted) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipMessages(data []byte) (n int, err error) { @@ -16749,6 +17613,9 @@ func skipMessages(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -16762,7 +17629,10 @@ func skipMessages(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -16778,6 +17648,9 @@ func skipMessages(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -16798,6 +17671,9 @@ func skipMessages(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -16833,4 +17709,5 @@ func skipMessages(data []byte) (n int, err error) { var ( ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/messages.proto b/mesosproto/messages.proto index 49c57ccb..b2db3e88 100644 --- a/mesosproto/messages.proto +++ b/mesosproto/messages.proto @@ -33,24 +33,28 @@ option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; -// TODO(benh): Provide comments for each of these messages. Also, -// consider splitting these messages into different "packages" which -// represent which messages get handled by which components (e.g., the -// "mesos.executor" package includes messages that the -// executor handles). - - -// TODO(benh): It would be great if this could just be a -// TaskInfo wherever it gets used! However, doing so would -// require adding the framework_id field, the executor_id field, and -// the state field into TaskInfo though (or send them another -// way). Also, one performance reason why we don't do that now is -// because storing whatever data is coupled with a TaskInfo -// could be large and unnecessary. +// TODO(benh): Consider splitting these messages into different "packages" +// which represent which messages get handled by which components (e.g., the +// "mesos.executor" package includes messages that the executor handles). + + // TODO(bmahler): Add executor_uuid here, and send it to the master. This will // allow us to expose executor work directories for tasks in the webui when // looking from the master level. Currently only the slave knows which run the // task belongs to. +/** + * Describes a task, similar to `TaskInfo`. + * + * `Task` is used in some of the Mesos messages found below. + * `Task` is used instead of `TaskInfo` if: + * 1) we need additional IDs, such as a specific + * framework, executor, or agent; or + * 2) we do not need the additional data, such as the command run by the + * task, the specific containerization, or health checks. These + * additional fields may be large and unnecessary for some Mesos messages. + * + * `Task` is generally constructed from a `TaskInfo`. See protobuf::createTask. + */ message Task { required string name = 1; required TaskID task_id = 2; @@ -78,20 +82,31 @@ message Task { // TODO(vinod): Create a new UUID message type. +/** + * Describes a task's status. + * + * `StatusUpdate` is used in some of the Mesos messages found below. + * The master and agent use `StatusUpdate` to wrap a `TaskStatus` when + * passing it from the agent to the framework that spawned the task. + * + * See protobuf::createStatusUpdate. + */ message StatusUpdate { required FrameworkID framework_id = 1; optional ExecutorID executor_id = 2; optional SlaveID slave_id = 3; + + // Since 0.23.0 we set 'status.uuid' in the executor + // driver for all retryable status updates. required TaskStatus status = 4; + required double timestamp = 5; - // This is being deprecated in favor of TaskStatus.uuid. In 0.23.0, - // we set the TaskStatus 'uuid' in the executor driver for all - // retryable status updates. + // Since 0.26.0 this is deprecated in favor of 'status.uuid'. optional bytes uuid = 6; // This corresponds to the latest state of the task according to the - // slave. Note that this state might be different than the state in + // agent. Note that this state might be different than the state in // 'status' because status update manager queues updates. In other // words, 'status' corresponds to the update at top of the queue and // 'latest_state' corresponds to the update at bottom of the queue. @@ -99,32 +114,48 @@ message StatusUpdate { } -// This message encapsulates how we checkpoint a status update to disk. -// NOTE: If type == UPDATE, the 'update' field is required. -// NOTE: If type == ACK, the 'uuid' field is required. +/** + * Encapsulates how we checkpoint a `StatusUpdate` to disk. + * + * See the StatusUpdateManager and slave/state.cpp. + */ message StatusUpdateRecord { enum Type { UPDATE = 0; ACK = 1; } + required Type type = 1; + + // Required if type == UPDATE. optional StatusUpdate update = 2; + + // Required if type == ACK. optional bytes uuid = 3; } +// TODO(josephw): Check if this can be removed. This appears to be +// for backwards compatibility with very early versions of Mesos. message SubmitSchedulerRequest { required string name = 1; } +// TODO(josephw): Remove for the same reason as `SubmitSchedulerRequest`. message SubmitSchedulerResponse { required bool okay = 1; } +/** + * Sends a free-form message from the executor to the framework. + * Mesos forwards the message, if necessary, via the agents and the master. + * + * See scheduler::Event::Message. + */ message ExecutorToFrameworkMessage { required SlaveID slave_id = 1; required FrameworkID framework_id = 2; @@ -133,6 +164,12 @@ message ExecutorToFrameworkMessage { } +/** + * Sends a free-form message from the framework to the executor. + * Mesos forwards the message, if necessary, via the agents and the master. + * + * See scheduler::Call::Message. + */ message FrameworkToExecutorMessage { required SlaveID slave_id = 1; required FrameworkID framework_id = 2; @@ -141,49 +178,115 @@ message FrameworkToExecutorMessage { } +/** + * Subscribes the framework with the master to receive events. + * + * Used by the pre-Event/Call Mesos scheduler driver. + * See scheduler::Call::Subscribe. + */ message RegisterFrameworkMessage { required FrameworkInfo framework = 1; } +/** + * Subscribes the framework with the master to receive events. + * This is used when the framework has previously registered and + * the master changes to a newly elected master. + * + * Used by the pre-Event/Call Mesos scheduler driver. + * See scheduler::Call::Subscribe. + */ message ReregisterFrameworkMessage { required FrameworkInfo framework = 2; required bool failover = 3; } +/** + * Notifies the framework that the master has registered it. + * The `framework_id` holds a unique ID for distinguishing this framework. + * + * See scheduler::Event::Subscribed. + */ message FrameworkRegisteredMessage { required FrameworkID framework_id = 1; required MasterInfo master_info = 2; } + +/** + * Notifies the framework that the master has reregistered it. + * This message is used in the same conditions as `ReregisterFrameworkMessage`. + * + * See scheduler::Event::Subscribed. + */ message FrameworkReregisteredMessage { required FrameworkID framework_id = 1; required MasterInfo master_info = 2; } + +/** + * Stops the framework and shuts down all its tasks and executors. + * + * Used by the pre-Event/Call Mesos scheduler driver. + * See scheduler::Call::Teardown. + */ message UnregisterFrameworkMessage { required FrameworkID framework_id = 1; } +/** + * Aborts the scheduler driver and prevents further callbacks to the driver. + * + * Used exclusively by the pre-Event/Call Mesos scheduler driver. + */ message DeactivateFrameworkMessage { required FrameworkID framework_id = 1; } +/** + * Requests specific resources from Mesos's allocator. + * If the allocator supports resource requests, any corresponding + * resources will be sent like a normal resource offer. + * + * Used by the pre-Event/Call Mesos scheduler driver. + * See scheduler::Call::Request. + */ message ResourceRequestMessage { required FrameworkID framework_id = 1; repeated Request requests = 2; } +/** + * Sends resources offers to the scheduler. + * + * See scheduler::Event::Offers. + */ message ResourceOffersMessage { repeated Offer offers = 1; repeated string pids = 2; + + // The `inverse_offers` field is added here because we currently use it in + // `master.cpp` when constructing the message to send to schedulers. We use + // the original version of the proto API until we do a full refactor of all + // the messages being sent. + // It is not fully implemented in the old scheduler; only the V1 scheduler + // currently implements inverse offers. + repeated InverseOffer inverse_offers = 3; } +/** + * Launches tasks using resources from the specified offers. + * + * Used by the pre-Event/Call Mesos scheduler driver. + * See scheduler::Call::Accept and scheduler::Call::Decline. + */ message LaunchTasksMessage { required FrameworkID framework_id = 1; repeated TaskInfo tasks = 3; @@ -192,16 +295,35 @@ message LaunchTasksMessage { } +/** + * Notifies the scheduler that a particular offer is not longer valid. + * + * See scheduler::Event::Rescind. + */ message RescindResourceOfferMessage { required OfferID offer_id = 1; } +/** + * Removes all filters previously set by the scheduler. + * + * Used by the pre-Event/Call Mesos scheduler driver. + * See scheduler::Call::Revive. + */ message ReviveOffersMessage { required FrameworkID framework_id = 1; } +/** + * Depending on the `TaskInfo`, this message either notifies an existing + * executor to run the task, or starts a new executor and runs the task. + * This message is sent when scheduler::Call::Accept is sent with + * Offer::Operation::Launch. + * + * See executor::Event::Launch. + */ message RunTaskMessage { // TODO(karya): Remove framework_id after MESOS-2559 has shipped. optional FrameworkID framework_id = 1 [deprecated = true]; @@ -211,29 +333,47 @@ message RunTaskMessage { // The pid of the framework. This was moved to 'optional' in // 0.24.0 to support schedulers using the HTTP API. For now, we // continue to always set pid since it was required in 0.23.x. - // When 'pid' is unset, or set to empty string, the slave will + // When 'pid' is unset, or set to empty string, the agent will // forward executor messages through the master. For schedulers // still using the driver, this will remain set. optional string pid = 3; } +/** + * Kills a specific task. + * + * See scheduler::Call::Kill and executor::Event::Kill. + */ message KillTaskMessage { // TODO(bmahler): Include the SlaveID here to improve the Master's - // ability to respond for non-activated slaves. + // ability to respond for non-activated agents. required FrameworkID framework_id = 1; required TaskID task_id = 2; } -// NOTE: If 'pid' is present, scheduler driver sends an -// acknowledgement to the pid. +/** + * Sends a task status update to the scheduler. + * + * See scheduler::Event::Update. + */ message StatusUpdateMessage { required StatusUpdate update = 1; + + // If present, scheduler driver automatically sends an acknowledgement + // to the `pid`. This only applies to the pre-Event/Call Mesos + // scheduler driver. optional string pid = 2; } +/** + * This message is used by the scheduler to acknowledge the receipt of a status + * update. Mesos forwards the acknowledgement to the executor running the task. + * + * See scheduler::Call::Acknowledge and executor::Event::Acknowledged. + */ message StatusUpdateAcknowledgementMessage { required SlaveID slave_id = 1; required FrameworkID framework_id = 2; @@ -242,47 +382,73 @@ message StatusUpdateAcknowledgementMessage { } +/** + * Notifies the scheduler that the agent was lost. + * + * See scheduler::Event::Failure. + */ message LostSlaveMessage { required SlaveID slave_id = 1; } -// Allows the framework to query the status for non-terminal tasks. -// This causes the master to send back the latest task status for -// each task in 'statuses', if possible. Tasks that are no longer -// known will result in a TASK_LOST update. If statuses is empty, -// then the master will send the latest status for each task -// currently known. +/** + * Allows the scheduler to query the status for non-terminal tasks. + * This causes the master to send back the latest task status for + * each task in `statuses`, if possible. Tasks that are no longer + * known will result in a `TASK_LOST` update. If `statuses` is empty, + * then the master will send the latest status for each task + * currently known. + */ message ReconcileTasksMessage { required FrameworkID framework_id = 1; repeated TaskStatus statuses = 2; // Should be non-terminal only. } +/** + * Notifies the framework about errors during registration. + * + * See scheduler::Event::Error. + */ message FrameworkErrorMessage { required string message = 2; } +/** + * Registers the agent with the master. + * + * If registration fails, a `ShutdownMessage` is sent to the agent. + * Failure conditions are documented inline in Master::registerSlave. + */ message RegisterSlaveMessage { required SlaveInfo slave = 1; - // Resources that are checkpointed by the slave (e.g., persistent + // Resources that are checkpointed by the agent (e.g., persistent // volume or dynamic reservation). Frameworks need to release // checkpointed resources explicitly. repeated Resource checkpointed_resources = 3; - // NOTE: This is a hack for the master to detect the slave's - // version. If unset the slave is < 0.21.0. + // NOTE: This is a hack for the master to detect the agent's + // version. If unset the agent is < 0.21.0. // TODO(bmahler): Do proper versioning: MESOS-986. optional string version = 2; } +/** + * Registers the agent with the master. + * This is used when the agent has previously registered and + * the master changes to a newly elected master. + * + * If registration fails, a `ShutdownMessage` is sent to the agent. + * Failure conditions are documented inline in Master::reregisterSlave. + */ message ReregisterSlaveMessage { required SlaveInfo slave = 2; - // Resources that are checkpointed by the slave (e.g., persistent + // Resources that are checkpointed by the agent (e.g., persistent // volume or dynamic reservation). Frameworks need to release // checkpointed resources explicitly. repeated Resource checkpointed_resources = 7; @@ -291,68 +457,98 @@ message ReregisterSlaveMessage { repeated Task tasks = 3; repeated Archive.Framework completed_frameworks = 5; - // NOTE: This is a hack for the master to detect the slave's - // version. If unset the slave is < 0.21.0. + // NOTE: This is a hack for the master to detect the agent's + // version. If unset the agent is < 0.21.0. // TODO(bmahler): Do proper versioning: MESOS-986. optional string version = 6; } +/** + * Notifies the agent that the master has registered it. + * The `slave_id` holds a unique ID for distinguishing this agent. + */ message SlaveRegisteredMessage { required SlaveID slave_id = 1; optional MasterSlaveConnection connection = 2; } +/** + * Notifies the agent that the master has reregistered it. + * This message is used in the same conditions as `ReregisterSlaveMessage`. + */ message SlaveReregisteredMessage { required SlaveID slave_id = 1; + // Contains a list of non-terminal tasks that the master believes to + // be running on the agent. The agent should respond `TASK_LOST` to + // any tasks that are unknown, so the master knows to remove those. repeated ReconcileTasksMessage reconciliations = 2; + optional MasterSlaveConnection connection = 3; } +/** + * This message is sent by the agent to the master during agent shutdown. + * The master updates its state to reflect the removed agent. + */ message UnregisterSlaveMessage { required SlaveID slave_id = 1; } +/** + * Describes the connection between the master and agent. + */ message MasterSlaveConnection { // Product of max_slave_ping_timeouts * slave_ping_timeout. // If no pings are received within the total timeout, - // the master will remove the slave. + // the master will remove the agent. optional double total_ping_timeout_seconds = 1; } -// This message is periodically sent by the master to the slave. -// If the slave is connected to the master, "connected" is true. +/** + * This message is periodically sent by the master to the agent. + * If the agent is connected to the master, "connected" is true. + */ message PingSlaveMessage { required bool connected = 1; } -// This message is sent by the slave to the master in response to the -// PingSlaveMessage. +/** + * This message is sent by the agent to the master in response to the + * `PingSlaveMessage`. + */ message PongSlaveMessage {} -// Tells a slave to shut down all executors of the given framework. +/** + * Tells an agent to shut down all executors of the given framework. + */ message ShutdownFrameworkMessage { required FrameworkID framework_id = 1; } -// Tells a slave (and consequently executor) to shutdown an executor. +/** + * Tells an agent (and consequently the executor) to shutdown an executor. + */ message ShutdownExecutorMessage { // TODO(vinod): Make these fields required. These are made optional - // for backwards compatibility between 0.23.0 slave and pre 0.23.0 + // for backwards compatibility between 0.23.0 agent and pre 0.23.0 // executor driver. optional ExecutorID executor_id = 1; optional FrameworkID framework_id = 2; } +/** + * Broadcasts updated framework information from master to all agents. + */ message UpdateFrameworkMessage { required FrameworkID framework_id = 1; @@ -361,29 +557,43 @@ message UpdateFrameworkMessage { } -// This message is sent to the slave whenever there is an update of -// the resources that need to be checkpointed (e.g., persistent volume -// or dynamic reservation). +/** + * This message is sent to the agent whenever there is an update of + * the resources that need to be checkpointed (e.g., persistent volume + * or dynamic reservation). + */ message CheckpointResourcesMessage { repeated Resource resources = 1; } -// This message is sent by the slave to the master to inform the -// master about the total amount of oversubscribed (allocated and -// allocatable) resources. +/** + * This message is sent by the agent to the master to inform the + * master about the total amount of oversubscribed (allocated and + * allocatable) resources. + */ message UpdateSlaveMessage { required SlaveID slave_id = 1; repeated Resource oversubscribed_resources = 2; } +/** + * Subscribes the executor with the agent to receive events. + * + * See executor::Call::Subscribe. + */ message RegisterExecutorMessage { required FrameworkID framework_id = 1; required ExecutorID executor_id = 2; } +/** + * Notifies the executor that the agent has registered it. + * + * See executor::Event::Subscribed. + */ message ExecutorRegisteredMessage { required ExecutorInfo executor_info = 2; required FrameworkID framework_id = 3; @@ -393,12 +603,22 @@ message ExecutorRegisteredMessage { } +/** + * Notifies the executor that the agent has reregistered it. + * + * See executor::Event::Subscribed. + */ message ExecutorReregisteredMessage { required SlaveID slave_id = 1; required SlaveInfo slave_info = 2; } +/** + * Notifies the scheduler about terminated executors. + * + * See scheduler::Event::Failure. + */ message ExitedExecutorMessage { required SlaveID slave_id = 1; required FrameworkID framework_id = 2; @@ -407,11 +627,22 @@ message ExitedExecutorMessage { } +/** + * Reestablishes the connection between executor and agent after agent failover. + * This message originates from the agent. + */ message ReconnectExecutorMessage { required SlaveID slave_id = 1; } +/** + * Subscribes the executor with the agent to receive events. + * This is used after a disconnection. The executor must include + * any unacknowledged tasks or updates. + * + * See executor::Call::Subscribe. + */ message ReregisterExecutorMessage { required ExecutorID executor_id = 1; required FrameworkID framework_id = 2; @@ -420,6 +651,11 @@ message ReregisterExecutorMessage { } +/** + * Sends a free-form message from the master to an agent. + * The agent should gracefully terminate in response, which includes + * shutting down all executors and tasks on the agent. + */ message ShutdownMessage { optional string message = 1; } @@ -438,12 +674,15 @@ message Archive { repeated Framework frameworks = 1; } -// Message describing task current health status that is sent by -// the task health checker to the command executor. -// The command executor reports the task status back to the -// on each receive. If the health checker configured faiure -// condition meets, then kill_task flag will be set to true which -// the executor on message receive will kill the task. + +/** + * Message describing task current health status that is sent by + * the task health checker to the command executor. + * The command executor reports the task status back to the + * on each receive. If the health checker configured failure + * condition meets, then `kill_task` flag will be set to true which + * the executor on message receive will kill the task. + */ message TaskHealthStatus { required TaskID task_id = 1; diff --git a/mesosproto/messagespb_test.go b/mesosproto/messagespb_test.go index f2735a85..d740438a 100644 --- a/mesosproto/messagespb_test.go +++ b/mesosproto/messagespb_test.go @@ -7714,1382 +7714,919 @@ func TestHookExecutedProtoCompactText(t *testing.T) { } } -func TestTaskVerboseEqual(t *testing.T) { +func TestTaskStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTask(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Task{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestStatusUpdateVerboseEqual(t *testing.T) { +func TestStatusUpdateStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedStatusUpdate(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StatusUpdate{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestStatusUpdateRecordVerboseEqual(t *testing.T) { +func TestStatusUpdateRecordStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedStatusUpdateRecord(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StatusUpdateRecord{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestSubmitSchedulerRequestVerboseEqual(t *testing.T) { +func TestSubmitSchedulerRequestStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSubmitSchedulerRequest(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SubmitSchedulerRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestSubmitSchedulerResponseVerboseEqual(t *testing.T) { +func TestSubmitSchedulerResponseStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSubmitSchedulerResponse(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SubmitSchedulerResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestExecutorToFrameworkMessageVerboseEqual(t *testing.T) { +func TestExecutorToFrameworkMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExecutorToFrameworkMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ExecutorToFrameworkMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestFrameworkToExecutorMessageVerboseEqual(t *testing.T) { +func TestFrameworkToExecutorMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkToExecutorMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FrameworkToExecutorMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRegisterFrameworkMessageVerboseEqual(t *testing.T) { +func TestRegisterFrameworkMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegisterFrameworkMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RegisterFrameworkMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestReregisterFrameworkMessageVerboseEqual(t *testing.T) { +func TestReregisterFrameworkMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReregisterFrameworkMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ReregisterFrameworkMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestFrameworkRegisteredMessageVerboseEqual(t *testing.T) { +func TestFrameworkRegisteredMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkRegisteredMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FrameworkRegisteredMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestFrameworkReregisteredMessageVerboseEqual(t *testing.T) { +func TestFrameworkReregisteredMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkReregisteredMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FrameworkReregisteredMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestUnregisterFrameworkMessageVerboseEqual(t *testing.T) { +func TestUnregisterFrameworkMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUnregisterFrameworkMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnregisterFrameworkMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestDeactivateFrameworkMessageVerboseEqual(t *testing.T) { +func TestDeactivateFrameworkMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedDeactivateFrameworkMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeactivateFrameworkMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResourceRequestMessageVerboseEqual(t *testing.T) { +func TestResourceRequestMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResourceRequestMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ResourceRequestMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestResourceOffersMessageVerboseEqual(t *testing.T) { +func TestResourceOffersMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResourceOffersMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ResourceOffersMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestLaunchTasksMessageVerboseEqual(t *testing.T) { +func TestLaunchTasksMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLaunchTasksMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &LaunchTasksMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRescindResourceOfferMessageVerboseEqual(t *testing.T) { +func TestRescindResourceOfferMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRescindResourceOfferMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RescindResourceOfferMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestReviveOffersMessageVerboseEqual(t *testing.T) { +func TestReviveOffersMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReviveOffersMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ReviveOffersMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRunTaskMessageVerboseEqual(t *testing.T) { +func TestRunTaskMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRunTaskMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RunTaskMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestKillTaskMessageVerboseEqual(t *testing.T) { +func TestKillTaskMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedKillTaskMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KillTaskMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestStatusUpdateMessageVerboseEqual(t *testing.T) { +func TestStatusUpdateMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedStatusUpdateMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StatusUpdateMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestStatusUpdateAcknowledgementMessageVerboseEqual(t *testing.T) { +func TestStatusUpdateAcknowledgementMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedStatusUpdateAcknowledgementMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StatusUpdateAcknowledgementMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestLostSlaveMessageVerboseEqual(t *testing.T) { +func TestLostSlaveMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLostSlaveMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &LostSlaveMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestReconcileTasksMessageVerboseEqual(t *testing.T) { +func TestReconcileTasksMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReconcileTasksMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ReconcileTasksMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestFrameworkErrorMessageVerboseEqual(t *testing.T) { +func TestFrameworkErrorMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkErrorMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FrameworkErrorMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRegisterSlaveMessageVerboseEqual(t *testing.T) { +func TestRegisterSlaveMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegisterSlaveMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RegisterSlaveMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestReregisterSlaveMessageVerboseEqual(t *testing.T) { +func TestReregisterSlaveMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReregisterSlaveMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ReregisterSlaveMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestSlaveRegisteredMessageVerboseEqual(t *testing.T) { +func TestSlaveRegisteredMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSlaveRegisteredMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SlaveRegisteredMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestSlaveReregisteredMessageVerboseEqual(t *testing.T) { +func TestSlaveReregisteredMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSlaveReregisteredMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SlaveReregisteredMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestUnregisterSlaveMessageVerboseEqual(t *testing.T) { +func TestUnregisterSlaveMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUnregisterSlaveMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnregisterSlaveMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestMasterSlaveConnectionVerboseEqual(t *testing.T) { +func TestMasterSlaveConnectionStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMasterSlaveConnection(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MasterSlaveConnection{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPingSlaveMessageVerboseEqual(t *testing.T) { +func TestPingSlaveMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPingSlaveMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PingSlaveMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPongSlaveMessageVerboseEqual(t *testing.T) { +func TestPongSlaveMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPongSlaveMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PongSlaveMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestShutdownFrameworkMessageVerboseEqual(t *testing.T) { +func TestShutdownFrameworkMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedShutdownFrameworkMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ShutdownFrameworkMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestShutdownExecutorMessageVerboseEqual(t *testing.T) { +func TestShutdownExecutorMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedShutdownExecutorMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ShutdownExecutorMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestUpdateFrameworkMessageVerboseEqual(t *testing.T) { +func TestUpdateFrameworkMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUpdateFrameworkMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UpdateFrameworkMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCheckpointResourcesMessageVerboseEqual(t *testing.T) { +func TestCheckpointResourcesMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCheckpointResourcesMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CheckpointResourcesMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestUpdateSlaveMessageVerboseEqual(t *testing.T) { +func TestUpdateSlaveMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUpdateSlaveMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UpdateSlaveMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRegisterExecutorMessageVerboseEqual(t *testing.T) { +func TestRegisterExecutorMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegisterExecutorMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RegisterExecutorMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestExecutorRegisteredMessageVerboseEqual(t *testing.T) { +func TestExecutorRegisteredMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExecutorRegisteredMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ExecutorRegisteredMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestExecutorReregisteredMessageVerboseEqual(t *testing.T) { +func TestExecutorReregisteredMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExecutorReregisteredMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ExecutorReregisteredMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestExitedExecutorMessageVerboseEqual(t *testing.T) { +func TestExitedExecutorMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExitedExecutorMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ExitedExecutorMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestReconnectExecutorMessageVerboseEqual(t *testing.T) { +func TestReconnectExecutorMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReconnectExecutorMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ReconnectExecutorMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestReregisterExecutorMessageVerboseEqual(t *testing.T) { +func TestReregisterExecutorMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReregisterExecutorMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ReregisterExecutorMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestShutdownMessageVerboseEqual(t *testing.T) { +func TestShutdownMessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedShutdownMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ShutdownMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestArchiveVerboseEqual(t *testing.T) { +func TestArchiveStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedArchive(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Archive{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestArchive_FrameworkVerboseEqual(t *testing.T) { +func TestArchive_FrameworkStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedArchive_Framework(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Archive_Framework{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestTaskHealthStatusVerboseEqual(t *testing.T) { +func TestTaskHealthStatusStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTaskHealthStatus(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TaskHealthStatus{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestHookExecutedVerboseEqual(t *testing.T) { +func TestHookExecutedStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedHookExecuted(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTaskSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTask(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } - msg := &HookExecuted{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestTaskGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTask(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestStatusUpdateGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStatusUpdate(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkTaskSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Task, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTask(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestStatusUpdateRecordGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStatusUpdateRecord(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestStatusUpdateSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStatusUpdate(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestSubmitSchedulerRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubmitSchedulerRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestSubmitSchedulerResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubmitSchedulerResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkStatusUpdateSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StatusUpdate, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStatusUpdate(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestExecutorToFrameworkMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExecutorToFrameworkMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestStatusUpdateRecordSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStatusUpdateRecord(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestFrameworkToExecutorMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkToExecutorMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestRegisterFrameworkMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRegisterFrameworkMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkStatusUpdateRecordSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StatusUpdateRecord, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStatusUpdateRecord(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestReregisterFrameworkMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedReregisterFrameworkMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestSubmitSchedulerRequestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubmitSchedulerRequest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestFrameworkRegisteredMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkRegisteredMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestFrameworkReregisteredMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkReregisteredMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkSubmitSchedulerRequestSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*SubmitSchedulerRequest, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedSubmitSchedulerRequest(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestUnregisterFrameworkMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnregisterFrameworkMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestSubmitSchedulerResponseSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubmitSchedulerResponse(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestDeactivateFrameworkMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeactivateFrameworkMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestResourceRequestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceRequestMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestResourceOffersMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceOffersMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLaunchTasksMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLaunchTasksMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestRescindResourceOfferMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRescindResourceOfferMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestReviveOffersMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedReviveOffersMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestRunTaskMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRunTaskMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestKillTaskMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKillTaskMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestStatusUpdateMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStatusUpdateMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkSubmitSchedulerResponseSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*SubmitSchedulerResponse, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedSubmitSchedulerResponse(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestStatusUpdateAcknowledgementMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStatusUpdateAcknowledgementMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestExecutorToFrameworkMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorToFrameworkMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } -} -func TestLostSlaveMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLostSlaveMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestReconcileTasksMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedReconcileTasksMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestFrameworkErrorMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFrameworkErrorMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkExecutorToFrameworkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ExecutorToFrameworkMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedExecutorToFrameworkMessage(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestRegisterSlaveMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRegisterSlaveMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestFrameworkToExecutorMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkToExecutorMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } -} -func TestReregisterSlaveMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedReregisterSlaveMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestSlaveRegisteredMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSlaveRegisteredMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestSlaveReregisteredMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSlaveReregisteredMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkFrameworkToExecutorMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FrameworkToExecutorMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFrameworkToExecutorMessage(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestUnregisterSlaveMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnregisterSlaveMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestRegisterFrameworkMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegisterFrameworkMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } -} -func TestMasterSlaveConnectionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMasterSlaveConnection(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestPingSlaveMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPingSlaveMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestPongSlaveMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPongSlaveMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkRegisterFrameworkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RegisterFrameworkMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRegisterFrameworkMessage(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestShutdownFrameworkMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedShutdownFrameworkMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestReregisterFrameworkMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedReregisterFrameworkMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } -} -func TestShutdownExecutorMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedShutdownExecutorMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestUpdateFrameworkMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUpdateFrameworkMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestCheckpointResourcesMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCheckpointResourcesMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkReregisterFrameworkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ReregisterFrameworkMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedReregisterFrameworkMessage(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestUpdateSlaveMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUpdateSlaveMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestFrameworkRegisteredMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkRegisteredMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestRegisterExecutorMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRegisterExecutorMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestExecutorRegisteredMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExecutorRegisteredMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkFrameworkRegisteredMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FrameworkRegisteredMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFrameworkRegisteredMessage(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestExecutorReregisteredMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExecutorReregisteredMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestFrameworkReregisteredMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkReregisteredMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestExitedExecutorMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExitedExecutorMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestReconnectExecutorMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedReconnectExecutorMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkFrameworkReregisteredMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FrameworkReregisteredMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFrameworkReregisteredMessage(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestReregisterExecutorMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedReregisterExecutorMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestUnregisterFrameworkMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnregisterFrameworkMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestShutdownMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedShutdownMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestArchiveGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedArchive(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkUnregisterFrameworkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnregisterFrameworkMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnregisterFrameworkMessage(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestArchive_FrameworkGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedArchive_Framework(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestDeactivateFrameworkMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeactivateFrameworkMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestTaskHealthStatusGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskHealthStatus(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestHookExecutedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHookExecuted(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkDeactivateFrameworkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeactivateFrameworkMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeactivateFrameworkMessage(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestTaskSize(t *testing.T) { + +func TestResourceRequestMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTask(popr, true) + p := NewPopulatedResourceRequestMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9108,12 +8645,12 @@ func TestTaskSize(t *testing.T) { } } -func BenchmarkTaskSize(b *testing.B) { +func BenchmarkResourceRequestMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Task, 1000) + pops := make([]*ResourceRequestMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTask(popr, false) + pops[i] = NewPopulatedResourceRequestMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9122,10 +8659,10 @@ func BenchmarkTaskSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestStatusUpdateSize(t *testing.T) { +func TestResourceOffersMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusUpdate(popr, true) + p := NewPopulatedResourceOffersMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9144,12 +8681,12 @@ func TestStatusUpdateSize(t *testing.T) { } } -func BenchmarkStatusUpdateSize(b *testing.B) { +func BenchmarkResourceOffersMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*StatusUpdate, 1000) + pops := make([]*ResourceOffersMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStatusUpdate(popr, false) + pops[i] = NewPopulatedResourceOffersMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9158,10 +8695,10 @@ func BenchmarkStatusUpdateSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestStatusUpdateRecordSize(t *testing.T) { +func TestLaunchTasksMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusUpdateRecord(popr, true) + p := NewPopulatedLaunchTasksMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9180,12 +8717,12 @@ func TestStatusUpdateRecordSize(t *testing.T) { } } -func BenchmarkStatusUpdateRecordSize(b *testing.B) { +func BenchmarkLaunchTasksMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*StatusUpdateRecord, 1000) + pops := make([]*LaunchTasksMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStatusUpdateRecord(popr, false) + pops[i] = NewPopulatedLaunchTasksMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9194,10 +8731,10 @@ func BenchmarkStatusUpdateRecordSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestSubmitSchedulerRequestSize(t *testing.T) { +func TestRescindResourceOfferMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubmitSchedulerRequest(popr, true) + p := NewPopulatedRescindResourceOfferMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9216,12 +8753,12 @@ func TestSubmitSchedulerRequestSize(t *testing.T) { } } -func BenchmarkSubmitSchedulerRequestSize(b *testing.B) { +func BenchmarkRescindResourceOfferMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*SubmitSchedulerRequest, 1000) + pops := make([]*RescindResourceOfferMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSubmitSchedulerRequest(popr, false) + pops[i] = NewPopulatedRescindResourceOfferMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9230,10 +8767,10 @@ func BenchmarkSubmitSchedulerRequestSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestSubmitSchedulerResponseSize(t *testing.T) { +func TestReviveOffersMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubmitSchedulerResponse(popr, true) + p := NewPopulatedReviveOffersMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9252,12 +8789,12 @@ func TestSubmitSchedulerResponseSize(t *testing.T) { } } -func BenchmarkSubmitSchedulerResponseSize(b *testing.B) { +func BenchmarkReviveOffersMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*SubmitSchedulerResponse, 1000) + pops := make([]*ReviveOffersMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSubmitSchedulerResponse(popr, false) + pops[i] = NewPopulatedReviveOffersMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9266,10 +8803,10 @@ func BenchmarkSubmitSchedulerResponseSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestExecutorToFrameworkMessageSize(t *testing.T) { +func TestRunTaskMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorToFrameworkMessage(popr, true) + p := NewPopulatedRunTaskMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9288,12 +8825,12 @@ func TestExecutorToFrameworkMessageSize(t *testing.T) { } } -func BenchmarkExecutorToFrameworkMessageSize(b *testing.B) { +func BenchmarkRunTaskMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ExecutorToFrameworkMessage, 1000) + pops := make([]*RunTaskMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedExecutorToFrameworkMessage(popr, false) + pops[i] = NewPopulatedRunTaskMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9302,10 +8839,10 @@ func BenchmarkExecutorToFrameworkMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkToExecutorMessageSize(t *testing.T) { +func TestKillTaskMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkToExecutorMessage(popr, true) + p := NewPopulatedKillTaskMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9324,12 +8861,12 @@ func TestFrameworkToExecutorMessageSize(t *testing.T) { } } -func BenchmarkFrameworkToExecutorMessageSize(b *testing.B) { +func BenchmarkKillTaskMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkToExecutorMessage, 1000) + pops := make([]*KillTaskMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkToExecutorMessage(popr, false) + pops[i] = NewPopulatedKillTaskMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9338,10 +8875,10 @@ func BenchmarkFrameworkToExecutorMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRegisterFrameworkMessageSize(t *testing.T) { +func TestStatusUpdateMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRegisterFrameworkMessage(popr, true) + p := NewPopulatedStatusUpdateMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9360,12 +8897,12 @@ func TestRegisterFrameworkMessageSize(t *testing.T) { } } -func BenchmarkRegisterFrameworkMessageSize(b *testing.B) { +func BenchmarkStatusUpdateMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RegisterFrameworkMessage, 1000) + pops := make([]*StatusUpdateMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRegisterFrameworkMessage(popr, false) + pops[i] = NewPopulatedStatusUpdateMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9374,10 +8911,10 @@ func BenchmarkRegisterFrameworkMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestReregisterFrameworkMessageSize(t *testing.T) { +func TestStatusUpdateAcknowledgementMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedReregisterFrameworkMessage(popr, true) + p := NewPopulatedStatusUpdateAcknowledgementMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9396,12 +8933,12 @@ func TestReregisterFrameworkMessageSize(t *testing.T) { } } -func BenchmarkReregisterFrameworkMessageSize(b *testing.B) { +func BenchmarkStatusUpdateAcknowledgementMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ReregisterFrameworkMessage, 1000) + pops := make([]*StatusUpdateAcknowledgementMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedReregisterFrameworkMessage(popr, false) + pops[i] = NewPopulatedStatusUpdateAcknowledgementMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9410,10 +8947,10 @@ func BenchmarkReregisterFrameworkMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkRegisteredMessageSize(t *testing.T) { +func TestLostSlaveMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkRegisteredMessage(popr, true) + p := NewPopulatedLostSlaveMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9432,12 +8969,12 @@ func TestFrameworkRegisteredMessageSize(t *testing.T) { } } -func BenchmarkFrameworkRegisteredMessageSize(b *testing.B) { +func BenchmarkLostSlaveMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkRegisteredMessage, 1000) + pops := make([]*LostSlaveMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkRegisteredMessage(popr, false) + pops[i] = NewPopulatedLostSlaveMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9446,10 +8983,10 @@ func BenchmarkFrameworkRegisteredMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkReregisteredMessageSize(t *testing.T) { +func TestReconcileTasksMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkReregisteredMessage(popr, true) + p := NewPopulatedReconcileTasksMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9468,12 +9005,12 @@ func TestFrameworkReregisteredMessageSize(t *testing.T) { } } -func BenchmarkFrameworkReregisteredMessageSize(b *testing.B) { +func BenchmarkReconcileTasksMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkReregisteredMessage, 1000) + pops := make([]*ReconcileTasksMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkReregisteredMessage(popr, false) + pops[i] = NewPopulatedReconcileTasksMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9482,10 +9019,10 @@ func BenchmarkFrameworkReregisteredMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestUnregisterFrameworkMessageSize(t *testing.T) { +func TestFrameworkErrorMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnregisterFrameworkMessage(popr, true) + p := NewPopulatedFrameworkErrorMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9504,12 +9041,12 @@ func TestUnregisterFrameworkMessageSize(t *testing.T) { } } -func BenchmarkUnregisterFrameworkMessageSize(b *testing.B) { +func BenchmarkFrameworkErrorMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*UnregisterFrameworkMessage, 1000) + pops := make([]*FrameworkErrorMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnregisterFrameworkMessage(popr, false) + pops[i] = NewPopulatedFrameworkErrorMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9518,10 +9055,10 @@ func BenchmarkUnregisterFrameworkMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestDeactivateFrameworkMessageSize(t *testing.T) { +func TestRegisterSlaveMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeactivateFrameworkMessage(popr, true) + p := NewPopulatedRegisterSlaveMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9540,12 +9077,12 @@ func TestDeactivateFrameworkMessageSize(t *testing.T) { } } -func BenchmarkDeactivateFrameworkMessageSize(b *testing.B) { +func BenchmarkRegisterSlaveMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*DeactivateFrameworkMessage, 1000) + pops := make([]*RegisterSlaveMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeactivateFrameworkMessage(popr, false) + pops[i] = NewPopulatedRegisterSlaveMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9554,10 +9091,10 @@ func BenchmarkDeactivateFrameworkMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceRequestMessageSize(t *testing.T) { +func TestReregisterSlaveMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceRequestMessage(popr, true) + p := NewPopulatedReregisterSlaveMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9576,12 +9113,12 @@ func TestResourceRequestMessageSize(t *testing.T) { } } -func BenchmarkResourceRequestMessageSize(b *testing.B) { +func BenchmarkReregisterSlaveMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceRequestMessage, 1000) + pops := make([]*ReregisterSlaveMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedResourceRequestMessage(popr, false) + pops[i] = NewPopulatedReregisterSlaveMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9590,10 +9127,10 @@ func BenchmarkResourceRequestMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceOffersMessageSize(t *testing.T) { +func TestSlaveRegisteredMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceOffersMessage(popr, true) + p := NewPopulatedSlaveRegisteredMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9612,12 +9149,12 @@ func TestResourceOffersMessageSize(t *testing.T) { } } -func BenchmarkResourceOffersMessageSize(b *testing.B) { +func BenchmarkSlaveRegisteredMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceOffersMessage, 1000) + pops := make([]*SlaveRegisteredMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedResourceOffersMessage(popr, false) + pops[i] = NewPopulatedSlaveRegisteredMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9626,10 +9163,10 @@ func BenchmarkResourceOffersMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestLaunchTasksMessageSize(t *testing.T) { +func TestSlaveReregisteredMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLaunchTasksMessage(popr, true) + p := NewPopulatedSlaveReregisteredMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9648,12 +9185,12 @@ func TestLaunchTasksMessageSize(t *testing.T) { } } -func BenchmarkLaunchTasksMessageSize(b *testing.B) { +func BenchmarkSlaveReregisteredMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*LaunchTasksMessage, 1000) + pops := make([]*SlaveReregisteredMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLaunchTasksMessage(popr, false) + pops[i] = NewPopulatedSlaveReregisteredMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9662,10 +9199,10 @@ func BenchmarkLaunchTasksMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRescindResourceOfferMessageSize(t *testing.T) { +func TestUnregisterSlaveMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRescindResourceOfferMessage(popr, true) + p := NewPopulatedUnregisterSlaveMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9684,12 +9221,12 @@ func TestRescindResourceOfferMessageSize(t *testing.T) { } } -func BenchmarkRescindResourceOfferMessageSize(b *testing.B) { +func BenchmarkUnregisterSlaveMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RescindResourceOfferMessage, 1000) + pops := make([]*UnregisterSlaveMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRescindResourceOfferMessage(popr, false) + pops[i] = NewPopulatedUnregisterSlaveMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9698,10 +9235,10 @@ func BenchmarkRescindResourceOfferMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestReviveOffersMessageSize(t *testing.T) { +func TestMasterSlaveConnectionSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedReviveOffersMessage(popr, true) + p := NewPopulatedMasterSlaveConnection(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9720,12 +9257,12 @@ func TestReviveOffersMessageSize(t *testing.T) { } } -func BenchmarkReviveOffersMessageSize(b *testing.B) { +func BenchmarkMasterSlaveConnectionSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ReviveOffersMessage, 1000) + pops := make([]*MasterSlaveConnection, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedReviveOffersMessage(popr, false) + pops[i] = NewPopulatedMasterSlaveConnection(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9734,10 +9271,10 @@ func BenchmarkReviveOffersMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRunTaskMessageSize(t *testing.T) { +func TestPingSlaveMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRunTaskMessage(popr, true) + p := NewPopulatedPingSlaveMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9756,12 +9293,12 @@ func TestRunTaskMessageSize(t *testing.T) { } } -func BenchmarkRunTaskMessageSize(b *testing.B) { +func BenchmarkPingSlaveMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RunTaskMessage, 1000) + pops := make([]*PingSlaveMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRunTaskMessage(popr, false) + pops[i] = NewPopulatedPingSlaveMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9770,10 +9307,10 @@ func BenchmarkRunTaskMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestKillTaskMessageSize(t *testing.T) { +func TestPongSlaveMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKillTaskMessage(popr, true) + p := NewPopulatedPongSlaveMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9792,12 +9329,12 @@ func TestKillTaskMessageSize(t *testing.T) { } } -func BenchmarkKillTaskMessageSize(b *testing.B) { +func BenchmarkPongSlaveMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*KillTaskMessage, 1000) + pops := make([]*PongSlaveMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedKillTaskMessage(popr, false) + pops[i] = NewPopulatedPongSlaveMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9806,10 +9343,10 @@ func BenchmarkKillTaskMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestStatusUpdateMessageSize(t *testing.T) { +func TestShutdownFrameworkMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusUpdateMessage(popr, true) + p := NewPopulatedShutdownFrameworkMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9828,12 +9365,12 @@ func TestStatusUpdateMessageSize(t *testing.T) { } } -func BenchmarkStatusUpdateMessageSize(b *testing.B) { +func BenchmarkShutdownFrameworkMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*StatusUpdateMessage, 1000) + pops := make([]*ShutdownFrameworkMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStatusUpdateMessage(popr, false) + pops[i] = NewPopulatedShutdownFrameworkMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9842,10 +9379,10 @@ func BenchmarkStatusUpdateMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestStatusUpdateAcknowledgementMessageSize(t *testing.T) { +func TestShutdownExecutorMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusUpdateAcknowledgementMessage(popr, true) + p := NewPopulatedShutdownExecutorMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9864,12 +9401,12 @@ func TestStatusUpdateAcknowledgementMessageSize(t *testing.T) { } } -func BenchmarkStatusUpdateAcknowledgementMessageSize(b *testing.B) { +func BenchmarkShutdownExecutorMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*StatusUpdateAcknowledgementMessage, 1000) + pops := make([]*ShutdownExecutorMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStatusUpdateAcknowledgementMessage(popr, false) + pops[i] = NewPopulatedShutdownExecutorMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9878,10 +9415,10 @@ func BenchmarkStatusUpdateAcknowledgementMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestLostSlaveMessageSize(t *testing.T) { +func TestUpdateFrameworkMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLostSlaveMessage(popr, true) + p := NewPopulatedUpdateFrameworkMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9900,12 +9437,12 @@ func TestLostSlaveMessageSize(t *testing.T) { } } -func BenchmarkLostSlaveMessageSize(b *testing.B) { +func BenchmarkUpdateFrameworkMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*LostSlaveMessage, 1000) + pops := make([]*UpdateFrameworkMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLostSlaveMessage(popr, false) + pops[i] = NewPopulatedUpdateFrameworkMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9914,10 +9451,10 @@ func BenchmarkLostSlaveMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestReconcileTasksMessageSize(t *testing.T) { +func TestCheckpointResourcesMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedReconcileTasksMessage(popr, true) + p := NewPopulatedCheckpointResourcesMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9936,12 +9473,12 @@ func TestReconcileTasksMessageSize(t *testing.T) { } } -func BenchmarkReconcileTasksMessageSize(b *testing.B) { +func BenchmarkCheckpointResourcesMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ReconcileTasksMessage, 1000) + pops := make([]*CheckpointResourcesMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedReconcileTasksMessage(popr, false) + pops[i] = NewPopulatedCheckpointResourcesMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9950,10 +9487,10 @@ func BenchmarkReconcileTasksMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkErrorMessageSize(t *testing.T) { +func TestUpdateSlaveMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkErrorMessage(popr, true) + p := NewPopulatedUpdateSlaveMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -9972,12 +9509,12 @@ func TestFrameworkErrorMessageSize(t *testing.T) { } } -func BenchmarkFrameworkErrorMessageSize(b *testing.B) { +func BenchmarkUpdateSlaveMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkErrorMessage, 1000) + pops := make([]*UpdateSlaveMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkErrorMessage(popr, false) + pops[i] = NewPopulatedUpdateSlaveMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -9986,10 +9523,10 @@ func BenchmarkFrameworkErrorMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRegisterSlaveMessageSize(t *testing.T) { +func TestRegisterExecutorMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRegisterSlaveMessage(popr, true) + p := NewPopulatedRegisterExecutorMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10008,12 +9545,12 @@ func TestRegisterSlaveMessageSize(t *testing.T) { } } -func BenchmarkRegisterSlaveMessageSize(b *testing.B) { +func BenchmarkRegisterExecutorMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RegisterSlaveMessage, 1000) + pops := make([]*RegisterExecutorMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRegisterSlaveMessage(popr, false) + pops[i] = NewPopulatedRegisterExecutorMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10022,10 +9559,10 @@ func BenchmarkRegisterSlaveMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestReregisterSlaveMessageSize(t *testing.T) { +func TestExecutorRegisteredMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedReregisterSlaveMessage(popr, true) + p := NewPopulatedExecutorRegisteredMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10044,12 +9581,12 @@ func TestReregisterSlaveMessageSize(t *testing.T) { } } -func BenchmarkReregisterSlaveMessageSize(b *testing.B) { +func BenchmarkExecutorRegisteredMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ReregisterSlaveMessage, 1000) + pops := make([]*ExecutorRegisteredMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedReregisterSlaveMessage(popr, false) + pops[i] = NewPopulatedExecutorRegisteredMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10058,10 +9595,10 @@ func BenchmarkReregisterSlaveMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestSlaveRegisteredMessageSize(t *testing.T) { +func TestExecutorReregisteredMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveRegisteredMessage(popr, true) + p := NewPopulatedExecutorReregisteredMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10080,12 +9617,12 @@ func TestSlaveRegisteredMessageSize(t *testing.T) { } } -func BenchmarkSlaveRegisteredMessageSize(b *testing.B) { +func BenchmarkExecutorReregisteredMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*SlaveRegisteredMessage, 1000) + pops := make([]*ExecutorReregisteredMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSlaveRegisteredMessage(popr, false) + pops[i] = NewPopulatedExecutorReregisteredMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10094,10 +9631,10 @@ func BenchmarkSlaveRegisteredMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestSlaveReregisteredMessageSize(t *testing.T) { +func TestExitedExecutorMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSlaveReregisteredMessage(popr, true) + p := NewPopulatedExitedExecutorMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10116,12 +9653,12 @@ func TestSlaveReregisteredMessageSize(t *testing.T) { } } -func BenchmarkSlaveReregisteredMessageSize(b *testing.B) { +func BenchmarkExitedExecutorMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*SlaveReregisteredMessage, 1000) + pops := make([]*ExitedExecutorMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSlaveReregisteredMessage(popr, false) + pops[i] = NewPopulatedExitedExecutorMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10130,10 +9667,10 @@ func BenchmarkSlaveReregisteredMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestUnregisterSlaveMessageSize(t *testing.T) { +func TestReconnectExecutorMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnregisterSlaveMessage(popr, true) + p := NewPopulatedReconnectExecutorMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10152,12 +9689,12 @@ func TestUnregisterSlaveMessageSize(t *testing.T) { } } -func BenchmarkUnregisterSlaveMessageSize(b *testing.B) { +func BenchmarkReconnectExecutorMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*UnregisterSlaveMessage, 1000) + pops := make([]*ReconnectExecutorMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnregisterSlaveMessage(popr, false) + pops[i] = NewPopulatedReconnectExecutorMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10166,10 +9703,10 @@ func BenchmarkUnregisterSlaveMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestMasterSlaveConnectionSize(t *testing.T) { +func TestReregisterExecutorMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterSlaveConnection(popr, true) + p := NewPopulatedReregisterExecutorMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10188,12 +9725,12 @@ func TestMasterSlaveConnectionSize(t *testing.T) { } } -func BenchmarkMasterSlaveConnectionSize(b *testing.B) { +func BenchmarkReregisterExecutorMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*MasterSlaveConnection, 1000) + pops := make([]*ReregisterExecutorMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMasterSlaveConnection(popr, false) + pops[i] = NewPopulatedReregisterExecutorMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10202,10 +9739,10 @@ func BenchmarkMasterSlaveConnectionSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestPingSlaveMessageSize(t *testing.T) { +func TestShutdownMessageSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPingSlaveMessage(popr, true) + p := NewPopulatedShutdownMessage(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10224,12 +9761,12 @@ func TestPingSlaveMessageSize(t *testing.T) { } } -func BenchmarkPingSlaveMessageSize(b *testing.B) { +func BenchmarkShutdownMessageSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*PingSlaveMessage, 1000) + pops := make([]*ShutdownMessage, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedPingSlaveMessage(popr, false) + pops[i] = NewPopulatedShutdownMessage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10238,10 +9775,10 @@ func BenchmarkPingSlaveMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestPongSlaveMessageSize(t *testing.T) { +func TestArchiveSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPongSlaveMessage(popr, true) + p := NewPopulatedArchive(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10260,12 +9797,12 @@ func TestPongSlaveMessageSize(t *testing.T) { } } -func BenchmarkPongSlaveMessageSize(b *testing.B) { +func BenchmarkArchiveSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*PongSlaveMessage, 1000) + pops := make([]*Archive, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedPongSlaveMessage(popr, false) + pops[i] = NewPopulatedArchive(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10274,10 +9811,10 @@ func BenchmarkPongSlaveMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestShutdownFrameworkMessageSize(t *testing.T) { +func TestArchive_FrameworkSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedShutdownFrameworkMessage(popr, true) + p := NewPopulatedArchive_Framework(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10296,12 +9833,12 @@ func TestShutdownFrameworkMessageSize(t *testing.T) { } } -func BenchmarkShutdownFrameworkMessageSize(b *testing.B) { +func BenchmarkArchive_FrameworkSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ShutdownFrameworkMessage, 1000) + pops := make([]*Archive_Framework, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedShutdownFrameworkMessage(popr, false) + pops[i] = NewPopulatedArchive_Framework(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10310,10 +9847,10 @@ func BenchmarkShutdownFrameworkMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestShutdownExecutorMessageSize(t *testing.T) { +func TestTaskHealthStatusSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedShutdownExecutorMessage(popr, true) + p := NewPopulatedTaskHealthStatus(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10332,12 +9869,12 @@ func TestShutdownExecutorMessageSize(t *testing.T) { } } -func BenchmarkShutdownExecutorMessageSize(b *testing.B) { +func BenchmarkTaskHealthStatusSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ShutdownExecutorMessage, 1000) + pops := make([]*TaskHealthStatus, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedShutdownExecutorMessage(popr, false) + pops[i] = NewPopulatedTaskHealthStatus(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10346,10 +9883,10 @@ func BenchmarkShutdownExecutorMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestUpdateFrameworkMessageSize(t *testing.T) { +func TestHookExecutedSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUpdateFrameworkMessage(popr, true) + p := NewPopulatedHookExecuted(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -10368,12 +9905,12 @@ func TestUpdateFrameworkMessageSize(t *testing.T) { } } -func BenchmarkUpdateFrameworkMessageSize(b *testing.B) { +func BenchmarkHookExecutedSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*UpdateFrameworkMessage, 1000) + pops := make([]*HookExecuted, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUpdateFrameworkMessage(popr, false) + pops[i] = NewPopulatedHookExecuted(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -10382,913 +9919,1376 @@ func BenchmarkUpdateFrameworkMessageSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCheckpointResourcesMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckpointResourcesMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) +func TestTaskGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTask(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) + panic(err) + } +} +func TestStatusUpdateGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStatusUpdate(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestStatusUpdateRecordGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStatusUpdateRecord(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubmitSchedulerRequestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubmitSchedulerRequest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubmitSchedulerResponseGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubmitSchedulerResponse(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestExecutorToFrameworkMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorToFrameworkMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkToExecutorMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkToExecutorMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRegisterFrameworkMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegisterFrameworkMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestReregisterFrameworkMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedReregisterFrameworkMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkRegisteredMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkRegisteredMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkReregisteredMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkReregisteredMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestUnregisterFrameworkMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnregisterFrameworkMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkCheckpointResourcesMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CheckpointResourcesMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCheckpointResourcesMessage(popr, false) +func TestDeactivateFrameworkMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeactivateFrameworkMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestUpdateSlaveMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUpdateSlaveMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestResourceRequestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceRequestMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestResourceOffersMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceOffersMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkUpdateSlaveMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UpdateSlaveMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUpdateSlaveMessage(popr, false) +func TestLaunchTasksMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLaunchTasksMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestRegisterExecutorMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRegisterExecutorMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestRescindResourceOfferMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRescindResourceOfferMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestReviveOffersMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedReviveOffersMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkRegisterExecutorMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*RegisterExecutorMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRegisterExecutorMessage(popr, false) +func TestRunTaskMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRunTaskMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestExecutorRegisteredMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorRegisteredMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestKillTaskMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKillTaskMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestStatusUpdateMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStatusUpdateMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkExecutorRegisteredMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ExecutorRegisteredMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedExecutorRegisteredMessage(popr, false) +func TestStatusUpdateAcknowledgementMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStatusUpdateAcknowledgementMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestExecutorReregisteredMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorReregisteredMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestLostSlaveMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLostSlaveMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestReconcileTasksMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedReconcileTasksMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkExecutorReregisteredMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ExecutorReregisteredMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedExecutorReregisteredMessage(popr, false) +func TestFrameworkErrorMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkErrorMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestExitedExecutorMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExitedExecutorMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestRegisterSlaveMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegisterSlaveMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestReregisterSlaveMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedReregisterSlaveMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkExitedExecutorMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ExitedExecutorMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedExitedExecutorMessage(popr, false) +func TestSlaveRegisteredMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveRegisteredMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestReconnectExecutorMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedReconnectExecutorMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestSlaveReregisteredMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveReregisteredMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestUnregisterSlaveMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnregisterSlaveMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkReconnectExecutorMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ReconnectExecutorMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedReconnectExecutorMessage(popr, false) +func TestMasterSlaveConnectionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMasterSlaveConnection(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestReregisterExecutorMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedReregisterExecutorMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestPingSlaveMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPingSlaveMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestPongSlaveMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPongSlaveMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkReregisterExecutorMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ReregisterExecutorMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedReregisterExecutorMessage(popr, false) +func TestShutdownFrameworkMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedShutdownFrameworkMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestShutdownMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedShutdownMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestShutdownExecutorMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedShutdownExecutorMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestUpdateFrameworkMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUpdateFrameworkMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkShutdownMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ShutdownMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedShutdownMessage(popr, false) +func TestCheckpointResourcesMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckpointResourcesMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestArchiveSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedArchive(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestUpdateSlaveMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUpdateSlaveMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestRegisterExecutorMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegisterExecutorMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkArchiveSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Archive, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedArchive(popr, false) +func TestExecutorRegisteredMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorRegisteredMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestArchive_FrameworkSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedArchive_Framework(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestExecutorReregisteredMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorReregisteredMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestExitedExecutorMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExitedExecutorMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkArchive_FrameworkSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Archive_Framework, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedArchive_Framework(popr, false) +func TestReconnectExecutorMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedReconnectExecutorMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestTaskHealthStatusSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskHealthStatus(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestReregisterExecutorMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedReregisterExecutorMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestShutdownMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedShutdownMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkTaskHealthStatusSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*TaskHealthStatus, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTaskHealthStatus(popr, false) +func TestArchiveGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedArchive(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestHookExecutedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookExecuted(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) +func TestArchive_FrameworkGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedArchive_Framework(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) +} +func TestTaskHealthStatusGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskHealthStatus(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } - -func BenchmarkHookExecutedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*HookExecuted, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedHookExecuted(popr, false) +func TestHookExecutedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHookExecuted(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } - b.SetBytes(int64(total / b.N)) } - -func TestTaskStringer(t *testing.T) { +func TestTaskVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTask(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Task{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestStatusUpdateStringer(t *testing.T) { +func TestStatusUpdateVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedStatusUpdate(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StatusUpdate{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestStatusUpdateRecordStringer(t *testing.T) { +func TestStatusUpdateRecordVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedStatusUpdateRecord(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StatusUpdateRecord{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestSubmitSchedulerRequestStringer(t *testing.T) { +func TestSubmitSchedulerRequestVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSubmitSchedulerRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SubmitSchedulerRequest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestSubmitSchedulerResponseStringer(t *testing.T) { +func TestSubmitSchedulerResponseVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSubmitSchedulerResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SubmitSchedulerResponse{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestExecutorToFrameworkMessageStringer(t *testing.T) { +func TestExecutorToFrameworkMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExecutorToFrameworkMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ExecutorToFrameworkMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFrameworkToExecutorMessageStringer(t *testing.T) { +func TestFrameworkToExecutorMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkToExecutorMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FrameworkToExecutorMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRegisterFrameworkMessageStringer(t *testing.T) { +func TestRegisterFrameworkMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegisterFrameworkMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RegisterFrameworkMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestReregisterFrameworkMessageStringer(t *testing.T) { +func TestReregisterFrameworkMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReregisterFrameworkMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ReregisterFrameworkMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFrameworkRegisteredMessageStringer(t *testing.T) { +func TestFrameworkRegisteredMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkRegisteredMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FrameworkRegisteredMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFrameworkReregisteredMessageStringer(t *testing.T) { +func TestFrameworkReregisteredMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkReregisteredMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FrameworkReregisteredMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestUnregisterFrameworkMessageStringer(t *testing.T) { +func TestUnregisterFrameworkMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUnregisterFrameworkMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnregisterFrameworkMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestDeactivateFrameworkMessageStringer(t *testing.T) { +func TestDeactivateFrameworkMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedDeactivateFrameworkMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeactivateFrameworkMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceRequestMessageStringer(t *testing.T) { +func TestResourceRequestMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResourceRequestMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ResourceRequestMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceOffersMessageStringer(t *testing.T) { +func TestResourceOffersMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResourceOffersMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ResourceOffersMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestLaunchTasksMessageStringer(t *testing.T) { +func TestLaunchTasksMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLaunchTasksMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &LaunchTasksMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRescindResourceOfferMessageStringer(t *testing.T) { +func TestRescindResourceOfferMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRescindResourceOfferMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RescindResourceOfferMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestReviveOffersMessageStringer(t *testing.T) { +func TestReviveOffersMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReviveOffersMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ReviveOffersMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRunTaskMessageStringer(t *testing.T) { +func TestRunTaskMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRunTaskMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RunTaskMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestKillTaskMessageStringer(t *testing.T) { +func TestKillTaskMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedKillTaskMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KillTaskMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestStatusUpdateMessageStringer(t *testing.T) { +func TestStatusUpdateMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedStatusUpdateMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StatusUpdateMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestStatusUpdateAcknowledgementMessageStringer(t *testing.T) { +func TestStatusUpdateAcknowledgementMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedStatusUpdateAcknowledgementMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StatusUpdateAcknowledgementMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestLostSlaveMessageStringer(t *testing.T) { +func TestLostSlaveMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLostSlaveMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &LostSlaveMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestReconcileTasksMessageStringer(t *testing.T) { +func TestReconcileTasksMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReconcileTasksMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ReconcileTasksMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFrameworkErrorMessageStringer(t *testing.T) { +func TestFrameworkErrorMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFrameworkErrorMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FrameworkErrorMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRegisterSlaveMessageStringer(t *testing.T) { +func TestRegisterSlaveMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegisterSlaveMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RegisterSlaveMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestReregisterSlaveMessageStringer(t *testing.T) { +func TestReregisterSlaveMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReregisterSlaveMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ReregisterSlaveMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestSlaveRegisteredMessageStringer(t *testing.T) { +func TestSlaveRegisteredMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSlaveRegisteredMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SlaveRegisteredMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestSlaveReregisteredMessageStringer(t *testing.T) { +func TestSlaveReregisteredMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedSlaveReregisteredMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SlaveReregisteredMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestUnregisterSlaveMessageStringer(t *testing.T) { +func TestUnregisterSlaveMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUnregisterSlaveMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnregisterSlaveMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestMasterSlaveConnectionStringer(t *testing.T) { +func TestMasterSlaveConnectionVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMasterSlaveConnection(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MasterSlaveConnection{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestPingSlaveMessageStringer(t *testing.T) { +func TestPingSlaveMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPingSlaveMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &PingSlaveMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestPongSlaveMessageStringer(t *testing.T) { +func TestPongSlaveMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPongSlaveMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &PongSlaveMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestShutdownFrameworkMessageStringer(t *testing.T) { +func TestShutdownFrameworkMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedShutdownFrameworkMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ShutdownFrameworkMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestShutdownExecutorMessageStringer(t *testing.T) { +func TestShutdownExecutorMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedShutdownExecutorMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ShutdownExecutorMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestUpdateFrameworkMessageStringer(t *testing.T) { +func TestUpdateFrameworkMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUpdateFrameworkMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UpdateFrameworkMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCheckpointResourcesMessageStringer(t *testing.T) { +func TestCheckpointResourcesMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCheckpointResourcesMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CheckpointResourcesMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestUpdateSlaveMessageStringer(t *testing.T) { +func TestUpdateSlaveMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedUpdateSlaveMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UpdateSlaveMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRegisterExecutorMessageStringer(t *testing.T) { +func TestRegisterExecutorMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegisterExecutorMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RegisterExecutorMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestExecutorRegisteredMessageStringer(t *testing.T) { +func TestExecutorRegisteredMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExecutorRegisteredMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ExecutorRegisteredMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestExecutorReregisteredMessageStringer(t *testing.T) { +func TestExecutorReregisteredMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExecutorReregisteredMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ExecutorReregisteredMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestExitedExecutorMessageStringer(t *testing.T) { +func TestExitedExecutorMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedExitedExecutorMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ExitedExecutorMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestReconnectExecutorMessageStringer(t *testing.T) { +func TestReconnectExecutorMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReconnectExecutorMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ReconnectExecutorMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestReregisterExecutorMessageStringer(t *testing.T) { +func TestReregisterExecutorMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedReregisterExecutorMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ReregisterExecutorMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestShutdownMessageStringer(t *testing.T) { +func TestShutdownMessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedShutdownMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ShutdownMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestArchiveStringer(t *testing.T) { +func TestArchiveVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedArchive(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Archive{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestArchive_FrameworkStringer(t *testing.T) { +func TestArchive_FrameworkVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedArchive_Framework(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Archive_Framework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestTaskHealthStatusStringer(t *testing.T) { +func TestTaskHealthStatusVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTaskHealthStatus(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TaskHealthStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestHookExecutedStringer(t *testing.T) { +func TestHookExecutedVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedHookExecuted(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &HookExecuted{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } diff --git a/mesosproto/registry.pb.go b/mesosproto/registry.pb.go index c0a60c79..3f95b859 100644 --- a/mesosproto/registry.pb.go +++ b/mesosproto/registry.pb.go @@ -25,12 +25,23 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// * +// A top level object that is managed by the Registrar and persisted in a +// replicated log. This object is recovered upon master startup and failover. type Registry struct { // Most recent leading master. Master *Registry_Master `protobuf:"bytes,1,opt,name=master" json:"master,omitempty"` // All admitted slaves. - Slaves *Registry_Slaves `protobuf:"bytes,2,opt,name=slaves" json:"slaves,omitempty"` - XXX_unrecognized []byte `json:"-"` + Slaves *Registry_Slaves `protobuf:"bytes,2,opt,name=slaves" json:"slaves,omitempty"` + // Holds a list of machines and some status information about each. + // See comments in `MachineInfo` for more information. + Machines *Registry_Machines `protobuf:"bytes,3,opt,name=machines" json:"machines,omitempty"` + // Describes a schedule for taking down specific machines for maintenance. + // The schedule is meant to give hints to frameworks about potential + // unavailability of resources. The `schedules` are related to the status + // information found in `machines`. + Schedules []*Schedule `protobuf:"bytes,4,rep,name=schedules" json:"schedules,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Registry) Reset() { *m = Registry{} } @@ -50,6 +61,20 @@ func (m *Registry) GetSlaves() *Registry_Slaves { return nil } +func (m *Registry) GetMachines() *Registry_Machines { + if m != nil { + return m.Machines + } + return nil +} + +func (m *Registry) GetSchedules() []*Schedule { + if m != nil { + return m.Schedules + } + return nil +} + type Registry_Master struct { Info *MasterInfo `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -95,6 +120,36 @@ func (m *Registry_Slaves) GetSlaves() []*Registry_Slave { return nil } +type Registry_Machine struct { + Info *MachineInfo `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Registry_Machine) Reset() { *m = Registry_Machine{} } +func (*Registry_Machine) ProtoMessage() {} + +func (m *Registry_Machine) GetInfo() *MachineInfo { + if m != nil { + return m.Info + } + return nil +} + +type Registry_Machines struct { + Machines []*Registry_Machine `protobuf:"bytes,1,rep,name=machines" json:"machines,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Registry_Machines) Reset() { *m = Registry_Machines{} } +func (*Registry_Machines) ProtoMessage() {} + +func (m *Registry_Machines) GetMachines() []*Registry_Machine { + if m != nil { + return m.Machines + } + return nil +} + func (this *Registry) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -121,6 +176,17 @@ func (this *Registry) VerboseEqual(that interface{}) error { if !this.Slaves.Equal(that1.Slaves) { return fmt.Errorf("Slaves this(%v) Not Equal that(%v)", this.Slaves, that1.Slaves) } + if !this.Machines.Equal(that1.Machines) { + return fmt.Errorf("Machines this(%v) Not Equal that(%v)", this.Machines, that1.Machines) + } + if len(this.Schedules) != len(that1.Schedules) { + return fmt.Errorf("Schedules this(%v) Not Equal that(%v)", len(this.Schedules), len(that1.Schedules)) + } + for i := range this.Schedules { + if !this.Schedules[i].Equal(that1.Schedules[i]) { + return fmt.Errorf("Schedules this[%v](%v) Not Equal that[%v](%v)", i, this.Schedules[i], i, that1.Schedules[i]) + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -152,6 +218,17 @@ func (this *Registry) Equal(that interface{}) bool { if !this.Slaves.Equal(that1.Slaves) { return false } + if !this.Machines.Equal(that1.Machines) { + return false + } + if len(this.Schedules) != len(that1.Schedules) { + return false + } + for i := range this.Schedules { + if !this.Schedules[i].Equal(that1.Schedules[i]) { + return false + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -335,11 +412,133 @@ func (this *Registry_Slaves) Equal(that interface{}) bool { } return true } +func (this *Registry_Machine) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Registry_Machine) + if !ok { + return fmt.Errorf("that is not of type *Registry_Machine") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Registry_Machine but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Registry_Machinebut is not nil && this == nil") + } + if !this.Info.Equal(that1.Info) { + return fmt.Errorf("Info this(%v) Not Equal that(%v)", this.Info, that1.Info) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Registry_Machine) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Registry_Machine) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Info.Equal(that1.Info) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Registry_Machines) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Registry_Machines) + if !ok { + return fmt.Errorf("that is not of type *Registry_Machines") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Registry_Machines but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Registry_Machinesbut is not nil && this == nil") + } + if len(this.Machines) != len(that1.Machines) { + return fmt.Errorf("Machines this(%v) Not Equal that(%v)", len(this.Machines), len(that1.Machines)) + } + for i := range this.Machines { + if !this.Machines[i].Equal(that1.Machines[i]) { + return fmt.Errorf("Machines this[%v](%v) Not Equal that[%v](%v)", i, this.Machines[i], i, that1.Machines[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Registry_Machines) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Registry_Machines) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Machines) != len(that1.Machines) { + return false + } + for i := range this.Machines { + if !this.Machines[i].Equal(that1.Machines[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *Registry) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 8) s = append(s, "&mesosproto.Registry{") if this.Master != nil { s = append(s, "Master: "+fmt.Sprintf("%#v", this.Master)+",\n") @@ -347,6 +546,12 @@ func (this *Registry) GoString() string { if this.Slaves != nil { s = append(s, "Slaves: "+fmt.Sprintf("%#v", this.Slaves)+",\n") } + if this.Machines != nil { + s = append(s, "Machines: "+fmt.Sprintf("%#v", this.Machines)+",\n") + } + if this.Schedules != nil { + s = append(s, "Schedules: "+fmt.Sprintf("%#v", this.Schedules)+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -398,6 +603,36 @@ func (this *Registry_Slaves) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *Registry_Machine) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Registry_Machine{") + if this.Info != nil { + s = append(s, "Info: "+fmt.Sprintf("%#v", this.Info)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Registry_Machines) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Registry_Machines{") + if this.Machines != nil { + s = append(s, "Machines: "+fmt.Sprintf("%#v", this.Machines)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func valueToGoStringRegistry(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -458,6 +693,28 @@ func (m *Registry) MarshalTo(data []byte) (int, error) { } i += n2 } + if m.Machines != nil { + data[i] = 0x1a + i++ + i = encodeVarintRegistry(data, i, uint64(m.Machines.Size())) + n3, err := m.Machines.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if len(m.Schedules) > 0 { + for _, msg := range m.Schedules { + data[i] = 0x22 + i++ + i = encodeVarintRegistry(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } @@ -485,11 +742,11 @@ func (m *Registry_Master) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintRegistry(data, i, uint64(m.Info.Size())) - n3, err := m.Info.MarshalTo(data[i:]) + n4, err := m.Info.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n3 + i += n4 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -518,11 +775,11 @@ func (m *Registry_Slave) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintRegistry(data, i, uint64(m.Info.Size())) - n4, err := m.Info.MarshalTo(data[i:]) + n5, err := m.Info.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n4 + i += n5 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -563,6 +820,72 @@ func (m *Registry_Slaves) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *Registry_Machine) 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 *Registry_Machine) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Info == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("info") + } else { + data[i] = 0xa + i++ + i = encodeVarintRegistry(data, i, uint64(m.Info.Size())) + n6, err := m.Info.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Registry_Machines) 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 *Registry_Machines) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Machines) > 0 { + for _, msg := range m.Machines { + data[i] = 0xa + i++ + i = encodeVarintRegistry(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + func encodeFixed64Registry(data []byte, offset int, v uint64) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) @@ -598,8 +921,18 @@ func NewPopulatedRegistry(r randyRegistry, easy bool) *Registry { if r.Intn(10) != 0 { this.Slaves = NewPopulatedRegistry_Slaves(r, easy) } + if r.Intn(10) != 0 { + this.Machines = NewPopulatedRegistry_Machines(r, easy) + } + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.Schedules = make([]*Schedule, v1) + for i := 0; i < v1; i++ { + this.Schedules[i] = NewPopulatedSchedule(r, easy) + } + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRegistry(r, 3) + this.XXX_unrecognized = randUnrecognizedRegistry(r, 5) } return this } @@ -625,9 +958,9 @@ func NewPopulatedRegistry_Slave(r randyRegistry, easy bool) *Registry_Slave { func NewPopulatedRegistry_Slaves(r randyRegistry, easy bool) *Registry_Slaves { this := &Registry_Slaves{} if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.Slaves = make([]*Registry_Slave, v1) - for i := 0; i < v1; i++ { + v2 := r.Intn(10) + this.Slaves = make([]*Registry_Slave, v2) + for i := 0; i < v2; i++ { this.Slaves[i] = NewPopulatedRegistry_Slave(r, easy) } } @@ -637,10 +970,34 @@ func NewPopulatedRegistry_Slaves(r randyRegistry, easy bool) *Registry_Slaves { return this } -type randyRegistry interface { - Float32() float32 - Float64() float64 - Int63() int64 +func NewPopulatedRegistry_Machine(r randyRegistry, easy bool) *Registry_Machine { + this := &Registry_Machine{} + this.Info = NewPopulatedMachineInfo(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRegistry(r, 2) + } + return this +} + +func NewPopulatedRegistry_Machines(r randyRegistry, easy bool) *Registry_Machines { + this := &Registry_Machines{} + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Machines = make([]*Registry_Machine, v3) + for i := 0; i < v3; i++ { + this.Machines[i] = NewPopulatedRegistry_Machine(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRegistry(r, 2) + } + return this +} + +type randyRegistry interface { + Float32() float32 + Float64() float64 + Int63() int64 Int31() int32 Uint32() uint32 Intn(n int) int @@ -656,9 +1013,9 @@ func randUTF8RuneRegistry(r randyRegistry) rune { return rune(ru + 61) } func randStringRegistry(r randyRegistry) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { tmps[i] = randUTF8RuneRegistry(r) } return string(tmps) @@ -680,11 +1037,11 @@ func randFieldRegistry(data []byte, r randyRegistry, fieldNumber int, wire int) switch wire { case 0: data = encodeVarintPopulateRegistry(data, uint64(key)) - v3 := r.Int63() + v5 := r.Int63() if r.Intn(2) == 0 { - v3 *= -1 + v5 *= -1 } - data = encodeVarintPopulateRegistry(data, uint64(v3)) + data = encodeVarintPopulateRegistry(data, uint64(v5)) case 1: data = encodeVarintPopulateRegistry(data, uint64(key)) data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -720,6 +1077,16 @@ func (m *Registry) Size() (n int) { l = m.Slaves.Size() n += 1 + l + sovRegistry(uint64(l)) } + if m.Machines != nil { + l = m.Machines.Size() + n += 1 + l + sovRegistry(uint64(l)) + } + if len(m.Schedules) > 0 { + for _, e := range m.Schedules { + l = e.Size() + n += 1 + l + sovRegistry(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -767,6 +1134,34 @@ func (m *Registry_Slaves) Size() (n int) { return n } +func (m *Registry_Machine) Size() (n int) { + var l int + _ = l + if m.Info != nil { + l = m.Info.Size() + n += 1 + l + sovRegistry(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Registry_Machines) Size() (n int) { + var l int + _ = l + if len(m.Machines) > 0 { + for _, e := range m.Machines { + l = e.Size() + n += 1 + l + sovRegistry(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func sovRegistry(x uint64) (n int) { for { n++ @@ -787,6 +1182,8 @@ func (this *Registry) String() string { s := strings.Join([]string{`&Registry{`, `Master:` + strings.Replace(fmt.Sprintf("%v", this.Master), "Registry_Master", "Registry_Master", 1) + `,`, `Slaves:` + strings.Replace(fmt.Sprintf("%v", this.Slaves), "Registry_Slaves", "Registry_Slaves", 1) + `,`, + `Machines:` + strings.Replace(fmt.Sprintf("%v", this.Machines), "Registry_Machines", "Registry_Machines", 1) + `,`, + `Schedules:` + strings.Replace(fmt.Sprintf("%v", this.Schedules), "Schedule", "Schedule", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -825,6 +1222,28 @@ func (this *Registry_Slaves) String() string { }, "") return s } +func (this *Registry_Machine) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Registry_Machine{`, + `Info:` + strings.Replace(fmt.Sprintf("%v", this.Info), "MachineInfo", "MachineInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Registry_Machines) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Registry_Machines{`, + `Machines:` + strings.Replace(fmt.Sprintf("%v", this.Machines), "Registry_Machine", "Registry_Machine", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} func valueToStringRegistry(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -837,8 +1256,12 @@ func (m *Registry) 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 ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -851,6 +1274,12 @@ func (m *Registry) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Registry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Registry: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -858,6 +1287,9 @@ func (m *Registry) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -888,6 +1320,9 @@ func (m *Registry) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -912,16 +1347,72 @@ func (m *Registry) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Machines", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Machines == nil { + m.Machines = &Registry_Machines{} + } + if err := m.Machines.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Schedules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Schedules = append(m.Schedules, &Schedule{}) + if err := m.Schedules[len(m.Schedules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipRegistry(data[iNdEx:]) if err != nil { return err @@ -937,6 +1428,9 @@ func (m *Registry) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Registry_Master) Unmarshal(data []byte) error { @@ -944,8 +1438,12 @@ func (m *Registry_Master) 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 ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -958,6 +1456,12 @@ func (m *Registry_Master) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Master: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Master: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -965,6 +1469,9 @@ func (m *Registry_Master) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -991,15 +1498,7 @@ func (m *Registry_Master) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipRegistry(data[iNdEx:]) if err != nil { return err @@ -1018,6 +1517,9 @@ func (m *Registry_Master) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("info") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Registry_Slave) Unmarshal(data []byte) error { @@ -1025,8 +1527,12 @@ func (m *Registry_Slave) 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 ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1039,6 +1545,12 @@ func (m *Registry_Slave) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Slave: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Slave: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1046,6 +1558,9 @@ func (m *Registry_Slave) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1072,15 +1587,7 @@ func (m *Registry_Slave) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipRegistry(data[iNdEx:]) if err != nil { return err @@ -1099,14 +1606,21 @@ func (m *Registry_Slave) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("info") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Registry_Slaves) 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 ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1119,6 +1633,12 @@ func (m *Registry_Slaves) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Slaves: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Slaves: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1126,6 +1646,9 @@ func (m *Registry_Slaves) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1149,15 +1672,178 @@ func (m *Registry_Slaves) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + iNdEx = preIndex + skippy, err := skipRegistry(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRegistry + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Registry_Machine) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + 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: Machine: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Machine: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Info == nil { + m.Info = &MachineInfo{} + } + if err := m.Info.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipRegistry(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRegistry + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("info") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Registry_Machines) 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 ErrIntOverflowRegistry + } + 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: Machines: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Machines: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Machines", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Machines = append(m.Machines, &Registry_Machine{}) + if err := m.Machines[len(m.Machines)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipRegistry(data[iNdEx:]) if err != nil { return err @@ -1173,6 +1859,9 @@ func (m *Registry_Slaves) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipRegistry(data []byte) (n int, err error) { @@ -1181,6 +1870,9 @@ func skipRegistry(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegistry + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1194,7 +1886,10 @@ func skipRegistry(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegistry + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1210,6 +1905,9 @@ func skipRegistry(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegistry + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1230,6 +1928,9 @@ func skipRegistry(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegistry + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1265,4 +1966,5 @@ func skipRegistry(data []byte) (n int, err error) { var ( ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRegistry = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/registry.proto b/mesosproto/registry.proto index e9bc34b1..964cd4cd 100644 --- a/mesosproto/registry.proto +++ b/mesosproto/registry.proto @@ -19,6 +19,7 @@ package mesosproto; import "mesos.proto"; +import "maintenance.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; @@ -33,7 +34,15 @@ option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; +/** + * A top level object that is managed by the Registrar and persisted in a + * replicated log. This object is recovered upon master startup and failover. + */ message Registry { + // NOTE: This object defines wrappers around existing objects in case + // the Registry wishes to store more information about the wrapped objects + // in the future. + message Master { required MasterInfo info = 1; } @@ -46,9 +55,27 @@ message Registry { repeated Slave slaves = 1; } + message Machine { + required MachineInfo info = 1; + } + + message Machines { + repeated Machine machines = 1; + } + // Most recent leading master. optional Master master = 1; // All admitted slaves. optional Slaves slaves = 2; + + // Holds a list of machines and some status information about each. + // See comments in `MachineInfo` for more information. + optional Machines machines = 3; + + // Describes a schedule for taking down specific machines for maintenance. + // The schedule is meant to give hints to frameworks about potential + // unavailability of resources. The `schedules` are related to the status + // information found in `machines`. + repeated Schedule schedules = 4; } diff --git a/mesosproto/registrypb_test.go b/mesosproto/registrypb_test.go index 198f3a95..8528cdda 100644 --- a/mesosproto/registrypb_test.go +++ b/mesosproto/registrypb_test.go @@ -429,6 +429,210 @@ func BenchmarkRegistry_SlavesProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestRegistry_MachineProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machine(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Registry_Machine{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRegistry_MachineMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machine(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Registry_Machine{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRegistry_MachineProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Registry_Machine, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRegistry_Machine(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRegistry_MachineProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRegistry_Machine(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Registry_Machine{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRegistry_MachinesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machines(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Registry_Machines{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRegistry_MachinesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machines(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Registry_Machines{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRegistry_MachinesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Registry_Machines, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRegistry_Machines(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRegistry_MachinesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRegistry_Machines(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Registry_Machines{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + func TestRegistryJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -513,6 +717,48 @@ func TestRegistry_SlavesJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestRegistry_MachineJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machine(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Registry_Machine{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRegistry_MachinesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machines(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Registry_Machines{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestRegistryProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -649,116 +895,126 @@ func TestRegistry_SlavesProtoCompactText(t *testing.T) { } } -func TestRegistryVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRegistry(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Registry{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +func TestRegistry_MachineProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machine(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Registry_Machine{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestRegistry_MasterVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRegistry_Master(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Registry_Master{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestRegistry_MachineProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machine(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Registry_Machine{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestRegistry_SlaveVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRegistry_Slave(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Registry_Slave{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestRegistry_MachinesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machines(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Registry_Machines{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestRegistry_SlavesVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRegistry_Slaves(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - msg := &Registry_Slaves{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) +} + +func TestRegistry_MachinesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machines(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Registry_Machines{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRegistryGoString(t *testing.T) { + +func TestRegistryStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegistry(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRegistry_MasterGoString(t *testing.T) { +func TestRegistry_MasterStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegistry_Master(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRegistry_SlaveGoString(t *testing.T) { +func TestRegistry_SlaveStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegistry_Slave(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRegistry_SlavesGoString(t *testing.T) { +func TestRegistry_SlavesStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegistry_Slaves(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + t.Fatalf("String want %v got %v", s1, s2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) +} +func TestRegistry_MachineStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Machine(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestRegistry_MachinesStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Machines(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } func TestRegistrySize(t *testing.T) { @@ -905,40 +1161,244 @@ func BenchmarkRegistry_SlavesSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRegistryStringer(t *testing.T) { +func TestRegistry_MachineSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machine(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRegistry_MachineSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Registry_Machine, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRegistry_Machine(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRegistry_MachinesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRegistry_Machines(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRegistry_MachinesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Registry_Machines, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRegistry_Machines(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRegistryGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegistry(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestRegistry_MasterStringer(t *testing.T) { +func TestRegistry_MasterGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegistry_Master(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestRegistry_SlaveStringer(t *testing.T) { +func TestRegistry_SlaveGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegistry_Slave(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestRegistry_SlavesStringer(t *testing.T) { +func TestRegistry_SlavesGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRegistry_Slaves(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRegistry_MachineGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Machine(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRegistry_MachinesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Machines(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRegistryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Registry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRegistry_MasterVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Master(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Registry_Master{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRegistry_SlaveVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Slave(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Registry_Slave{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRegistry_SlavesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Slaves(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Registry_Slaves{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRegistry_MachineVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Machine(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Registry_Machine{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRegistry_MachinesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRegistry_Machines(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Registry_Machines{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } diff --git a/mesosproto/scheduler.pb.go b/mesosproto/scheduler.pb.go index 06718346..bb9183fe 100644 --- a/mesosproto/scheduler.pb.go +++ b/mesosproto/scheduler.pb.go @@ -101,6 +101,7 @@ const ( Call_RECONCILE Call_Type = 9 Call_MESSAGE Call_Type = 10 Call_REQUEST Call_Type = 11 + Call_SUPPRESS Call_Type = 12 ) var Call_Type_name = map[int32]string{ @@ -115,6 +116,7 @@ var Call_Type_name = map[int32]string{ 9: "RECONCILE", 10: "MESSAGE", 11: "REQUEST", + 12: "SUPPRESS", } var Call_Type_value = map[string]int32{ "SUBSCRIBE": 1, @@ -128,6 +130,7 @@ var Call_Type_value = map[string]int32{ "RECONCILE": 9, "MESSAGE": 10, "REQUEST": 11, + "SUPPRESS": 12, } func (x Call_Type) Enum() *Call_Type { @@ -231,8 +234,6 @@ type Event_Subscribed struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` // This value will be set if the master is sending heartbeats. See // the comment above on 'HEARTBEAT' for more details. - // TODO(vinod): Implement heartbeats in the master once the master - // can send HTTP events. HeartbeatIntervalSeconds *float64 `protobuf:"fixed64,2,opt,name=heartbeat_interval_seconds" json:"heartbeat_interval_seconds,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -255,12 +256,16 @@ func (m *Event_Subscribed) GetHeartbeatIntervalSeconds() float64 { } // Received whenever there are new resources that are offered to the -// scheduler. Each offer corresponds to a set of resources on a -// slave. Until the scheduler accepts or declines an offer the -// resources are considered allocated to the scheduler. +// scheduler or resources requested back from the scheduler. Each +// offer corresponds to a set of resources on a slave. Until the +// scheduler accepts or declines an offer the resources are +// considered allocated to the scheduler. Accepting or Declining an +// inverse offer informs the allocator of the scheduler's ability to +// release the resources without violating an SLA. type Event_Offers struct { - Offers []*Offer `protobuf:"bytes,1,rep,name=offers" json:"offers,omitempty"` - XXX_unrecognized []byte `json:"-"` + Offers []*Offer `protobuf:"bytes,1,rep,name=offers" json:"offers,omitempty"` + InverseOffers []*InverseOffer `protobuf:"bytes,2,rep,name=inverse_offers" json:"inverse_offers,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Event_Offers) Reset() { *m = Event_Offers{} } @@ -273,6 +278,13 @@ func (m *Event_Offers) GetOffers() []*Offer { return nil } +func (m *Event_Offers) GetInverseOffers() []*InverseOffer { + if m != nil { + return m.InverseOffers + } + return nil +} + // Received when a particular offer is no longer valid (e.g., the // slave corresponding to the offer has been removed) and hence // needs to be rescinded. Any future calls ('Accept' / 'Decline') made @@ -828,14 +840,14 @@ func (m *Call_Message) GetData() []byte { // NOTE: The built-in hierarchical allocator doesn't have support // for this call and hence simply ignores it. type Call_Request struct { - Requests []*Request `protobuf:"bytes,1,rep,name=requests" json:"requests,omitempty"` - XXX_unrecognized []byte `json:"-"` + Requests []*Call_Request `protobuf:"bytes,1,rep,name=requests" json:"requests,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Request) Reset() { *m = Call_Request{} } func (*Call_Request) ProtoMessage() {} -func (m *Call_Request) GetRequests() []*Request { +func (m *Call_Request) GetRequests() []*Call_Request { if m != nil { return m.Requests } @@ -1058,6 +1070,14 @@ func (this *Event_Offers) VerboseEqual(that interface{}) error { return fmt.Errorf("Offers this[%v](%v) Not Equal that[%v](%v)", i, this.Offers[i], i, that1.Offers[i]) } } + if len(this.InverseOffers) != len(that1.InverseOffers) { + return fmt.Errorf("InverseOffers this(%v) Not Equal that(%v)", len(this.InverseOffers), len(that1.InverseOffers)) + } + for i := range this.InverseOffers { + if !this.InverseOffers[i].Equal(that1.InverseOffers[i]) { + return fmt.Errorf("InverseOffers this[%v](%v) Not Equal that[%v](%v)", i, this.InverseOffers[i], i, that1.InverseOffers[i]) + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } @@ -1091,6 +1111,14 @@ func (this *Event_Offers) Equal(that interface{}) bool { return false } } + if len(this.InverseOffers) != len(that1.InverseOffers) { + return false + } + for i := range this.InverseOffers { + if !this.InverseOffers[i].Equal(that1.InverseOffers[i]) { + return false + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -2298,11 +2326,14 @@ func (this *Event_Offers) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 5) + s := make([]string, 0, 6) s = append(s, "&mesosproto.Event_Offers{") if this.Offers != nil { s = append(s, "Offers: "+fmt.Sprintf("%#v", this.Offers)+",\n") } + if this.InverseOffers != nil { + s = append(s, "InverseOffers: "+fmt.Sprintf("%#v", this.InverseOffers)+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -2812,6 +2843,18 @@ func (m *Event_Offers) MarshalTo(data []byte) (int, error) { i += n } } + if len(m.InverseOffers) > 0 { + for _, msg := range m.InverseOffers { + data[i] = 0x12 + i++ + i = encodeVarintScheduler(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } @@ -3667,8 +3710,15 @@ func NewPopulatedEvent_Offers(r randyScheduler, easy bool) *Event_Offers { this.Offers[i] = NewPopulatedOffer(r, easy) } } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.InverseOffers = make([]*InverseOffer, v4) + for i := 0; i < v4; i++ { + this.InverseOffers[i] = NewPopulatedInverseOffer(r, easy) + } + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedScheduler(r, 2) + this.XXX_unrecognized = randUnrecognizedScheduler(r, 3) } return this } @@ -3695,9 +3745,9 @@ func NewPopulatedEvent_Message(r randyScheduler, easy bool) *Event_Message { this := &Event_Message{} this.SlaveId = NewPopulatedSlaveID(r, easy) this.ExecutorId = NewPopulatedExecutorID(r, easy) - v4 := r.Intn(100) - this.Data = make([]byte, v4) - for i := 0; i < v4; i++ { + v5 := r.Intn(100) + this.Data = make([]byte, v5) + for i := 0; i < v5; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -3715,11 +3765,11 @@ func NewPopulatedEvent_Failure(r randyScheduler, easy bool) *Event_Failure { this.ExecutorId = NewPopulatedExecutorID(r, easy) } if r.Intn(10) != 0 { - v5 := int32(r.Int31()) + v6 := int32(r.Int31()) if r.Intn(2) == 0 { - v5 *= -1 + v6 *= -1 } - this.Status = &v5 + this.Status = &v6 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 4) @@ -3729,8 +3779,8 @@ func NewPopulatedEvent_Failure(r randyScheduler, easy bool) *Event_Failure { func NewPopulatedEvent_Error(r randyScheduler, easy bool) *Event_Error { this := &Event_Error{} - v6 := randStringScheduler(r) - this.Message = &v6 + v7 := randStringScheduler(r) + this.Message = &v7 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 2) } @@ -3742,8 +3792,8 @@ func NewPopulatedCall(r randyScheduler, easy bool) *Call { if r.Intn(10) != 0 { this.FrameworkId = NewPopulatedFrameworkID(r, easy) } - v7 := Call_Type([]int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)]) - this.Type = &v7 + v8 := Call_Type([]int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}[r.Intn(12)]) + this.Type = &v8 if r.Intn(10) != 0 { this.Subscribe = NewPopulatedCall_Subscribe(r, easy) } @@ -3781,8 +3831,8 @@ func NewPopulatedCall_Subscribe(r randyScheduler, easy bool) *Call_Subscribe { this := &Call_Subscribe{} this.FrameworkInfo = NewPopulatedFrameworkInfo(r, easy) if r.Intn(10) != 0 { - v8 := bool(bool(r.Intn(2) == 0)) - this.Force = &v8 + v9 := bool(bool(r.Intn(2) == 0)) + this.Force = &v9 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 3) @@ -3793,16 +3843,16 @@ func NewPopulatedCall_Subscribe(r randyScheduler, easy bool) *Call_Subscribe { func NewPopulatedCall_Accept(r randyScheduler, easy bool) *Call_Accept { this := &Call_Accept{} if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.OfferIds = make([]*OfferID, v9) - for i := 0; i < v9; i++ { + v10 := r.Intn(10) + this.OfferIds = make([]*OfferID, v10) + for i := 0; i < v10; i++ { this.OfferIds[i] = NewPopulatedOfferID(r, easy) } } if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Operations = make([]*Offer_Operation, v10) - for i := 0; i < v10; i++ { + v11 := r.Intn(10) + this.Operations = make([]*Offer_Operation, v11) + for i := 0; i < v11; i++ { this.Operations[i] = NewPopulatedOffer_Operation(r, easy) } } @@ -3818,9 +3868,9 @@ func NewPopulatedCall_Accept(r randyScheduler, easy bool) *Call_Accept { func NewPopulatedCall_Decline(r randyScheduler, easy bool) *Call_Decline { this := &Call_Decline{} if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.OfferIds = make([]*OfferID, v11) - for i := 0; i < v11; i++ { + v12 := r.Intn(10) + this.OfferIds = make([]*OfferID, v12) + for i := 0; i < v12; i++ { this.OfferIds[i] = NewPopulatedOfferID(r, easy) } } @@ -3859,9 +3909,9 @@ func NewPopulatedCall_Acknowledge(r randyScheduler, easy bool) *Call_Acknowledge this := &Call_Acknowledge{} this.SlaveId = NewPopulatedSlaveID(r, easy) this.TaskId = NewPopulatedTaskID(r, easy) - v12 := r.Intn(100) - this.Uuid = make([]byte, v12) - for i := 0; i < v12; i++ { + v13 := r.Intn(100) + this.Uuid = make([]byte, v13) + for i := 0; i < v13; i++ { this.Uuid[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -3873,9 +3923,9 @@ func NewPopulatedCall_Acknowledge(r randyScheduler, easy bool) *Call_Acknowledge func NewPopulatedCall_Reconcile(r randyScheduler, easy bool) *Call_Reconcile { this := &Call_Reconcile{} if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.Tasks = make([]*Call_Reconcile_Task, v13) - for i := 0; i < v13; i++ { + v14 := r.Intn(10) + this.Tasks = make([]*Call_Reconcile_Task, v14) + for i := 0; i < v14; i++ { this.Tasks[i] = NewPopulatedCall_Reconcile_Task(r, easy) } } @@ -3901,9 +3951,9 @@ func NewPopulatedCall_Message(r randyScheduler, easy bool) *Call_Message { this := &Call_Message{} this.SlaveId = NewPopulatedSlaveID(r, easy) this.ExecutorId = NewPopulatedExecutorID(r, easy) - v14 := r.Intn(100) - this.Data = make([]byte, v14) - for i := 0; i < v14; i++ { + v15 := r.Intn(100) + this.Data = make([]byte, v15) + for i := 0; i < v15; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -3915,10 +3965,10 @@ func NewPopulatedCall_Message(r randyScheduler, easy bool) *Call_Message { func NewPopulatedCall_Request(r randyScheduler, easy bool) *Call_Request { this := &Call_Request{} if r.Intn(10) != 0 { - v15 := r.Intn(10) - this.Requests = make([]*Request, v15) - for i := 0; i < v15; i++ { - this.Requests[i] = NewPopulatedRequest(r, easy) + v16 := r.Intn(10) + this.Requests = make([]*Call_Request, v16) + for i := 0; i < v16; i++ { + this.Requests[i] = NewPopulatedCall_Request(r, easy) } } if !easy && r.Intn(10) != 0 { @@ -3946,9 +3996,9 @@ func randUTF8RuneScheduler(r randyScheduler) rune { return rune(ru + 61) } func randStringScheduler(r randyScheduler) string { - v16 := r.Intn(100) - tmps := make([]rune, v16) - for i := 0; i < v16; i++ { + v17 := r.Intn(100) + tmps := make([]rune, v17) + for i := 0; i < v17; i++ { tmps[i] = randUTF8RuneScheduler(r) } return string(tmps) @@ -3970,11 +4020,11 @@ func randFieldScheduler(data []byte, r randyScheduler, fieldNumber int, wire int switch wire { case 0: data = encodeVarintPopulateScheduler(data, uint64(key)) - v17 := r.Int63() + v18 := r.Int63() if r.Intn(2) == 0 { - v17 *= -1 + v18 *= -1 } - data = encodeVarintPopulateScheduler(data, uint64(v17)) + data = encodeVarintPopulateScheduler(data, uint64(v18)) case 1: data = encodeVarintPopulateScheduler(data, uint64(key)) data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -4064,6 +4114,12 @@ func (m *Event_Offers) Size() (n int) { n += 1 + l + sovScheduler(uint64(l)) } } + if len(m.InverseOffers) > 0 { + for _, e := range m.InverseOffers { + l = e.Size() + n += 1 + l + sovScheduler(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -4434,6 +4490,7 @@ func (this *Event_Offers) String() string { } s := strings.Join([]string{`&Event_Offers{`, `Offers:` + strings.Replace(fmt.Sprintf("%v", this.Offers), "Offer", "Offer", 1) + `,`, + `InverseOffers:` + strings.Replace(fmt.Sprintf("%v", this.InverseOffers), "InverseOffer", "InverseOffer", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4634,7 +4691,7 @@ func (this *Call_Request) String() string { return "nil" } s := strings.Join([]string{`&Call_Request{`, - `Requests:` + strings.Replace(fmt.Sprintf("%v", this.Requests), "Request", "Request", 1) + `,`, + `Requests:` + strings.Replace(fmt.Sprintf("%v", this.Requests), "Call_Request", "Call_Request", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4653,8 +4710,12 @@ func (m *Event) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4667,6 +4728,12 @@ func (m *Event) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -4674,6 +4741,9 @@ func (m *Event) Unmarshal(data []byte) error { } var v Event_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4692,6 +4762,9 @@ func (m *Event) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4722,6 +4795,9 @@ func (m *Event) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4752,6 +4828,9 @@ func (m *Event) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4782,6 +4861,9 @@ func (m *Event) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4812,6 +4894,9 @@ func (m *Event) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4842,6 +4927,9 @@ func (m *Event) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4872,6 +4960,9 @@ func (m *Event) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4897,15 +4988,7 @@ func (m *Event) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -4924,6 +5007,9 @@ func (m *Event) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Event_Subscribed) Unmarshal(data []byte) error { @@ -4931,8 +5017,12 @@ func (m *Event_Subscribed) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4945,6 +5035,12 @@ func (m *Event_Subscribed) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Subscribed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subscribed: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -4952,6 +5048,9 @@ func (m *Event_Subscribed) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -4997,15 +5096,7 @@ func (m *Event_Subscribed) Unmarshal(data []byte) error { v2 := float64(math.Float64frombits(v)) m.HeartbeatIntervalSeconds = &v2 default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -5024,14 +5115,21 @@ func (m *Event_Subscribed) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Event_Offers) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5044,6 +5142,12 @@ func (m *Event_Offers) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Offers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Offers: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -5051,6 +5155,9 @@ func (m *Event_Offers) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5073,16 +5180,39 @@ func (m *Event_Offers) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InverseOffers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { break } } - iNdEx -= sizeOfWire + if msglen < 0 { + return ErrInvalidLengthScheduler + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InverseOffers = append(m.InverseOffers, &InverseOffer{}) + if err := m.InverseOffers[len(m.InverseOffers)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -5098,6 +5228,9 @@ func (m *Event_Offers) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Event_Rescind) Unmarshal(data []byte) error { @@ -5105,8 +5238,12 @@ func (m *Event_Rescind) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5119,6 +5256,12 @@ func (m *Event_Rescind) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Rescind: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Rescind: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -5126,6 +5269,9 @@ func (m *Event_Rescind) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5152,15 +5298,7 @@ func (m *Event_Rescind) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -5179,6 +5317,9 @@ func (m *Event_Rescind) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("offer_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Event_Update) Unmarshal(data []byte) error { @@ -5186,8 +5327,12 @@ func (m *Event_Update) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5200,6 +5345,12 @@ func (m *Event_Update) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Update: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Update: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -5207,6 +5358,9 @@ func (m *Event_Update) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5233,15 +5387,7 @@ func (m *Event_Update) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -5260,6 +5406,9 @@ func (m *Event_Update) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Event_Message) Unmarshal(data []byte) error { @@ -5267,8 +5416,12 @@ func (m *Event_Message) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5281,6 +5434,12 @@ func (m *Event_Message) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -5288,6 +5447,9 @@ func (m *Event_Message) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5319,6 +5481,9 @@ func (m *Event_Message) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5350,6 +5515,9 @@ func (m *Event_Message) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5371,15 +5539,7 @@ func (m *Event_Message) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000004) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -5404,14 +5564,21 @@ func (m *Event_Message) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Event_Failure) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5424,6 +5591,12 @@ func (m *Event_Failure) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Failure: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Failure: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -5431,6 +5604,9 @@ func (m *Event_Failure) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5461,6 +5637,9 @@ func (m *Event_Failure) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5491,6 +5670,9 @@ func (m *Event_Failure) Unmarshal(data []byte) error { } var v int32 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5503,15 +5685,7 @@ func (m *Event_Failure) Unmarshal(data []byte) error { } m.Status = &v default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -5527,6 +5701,9 @@ func (m *Event_Failure) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Event_Error) Unmarshal(data []byte) error { @@ -5534,8 +5711,12 @@ func (m *Event_Error) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5548,6 +5729,12 @@ func (m *Event_Error) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -5555,6 +5742,9 @@ func (m *Event_Error) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5578,15 +5768,7 @@ func (m *Event_Error) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -5605,6 +5787,9 @@ func (m *Event_Error) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call) Unmarshal(data []byte) error { @@ -5612,8 +5797,12 @@ func (m *Call) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5626,6 +5815,12 @@ func (m *Call) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Call: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Call: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -5633,6 +5828,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5663,6 +5861,9 @@ func (m *Call) Unmarshal(data []byte) error { } var v Call_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5681,6 +5882,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5711,6 +5915,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5741,6 +5948,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5771,6 +5981,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5801,6 +6014,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5831,6 +6047,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5861,6 +6080,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5891,6 +6113,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5921,6 +6146,9 @@ func (m *Call) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5946,15 +6174,7 @@ func (m *Call) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -5973,6 +6193,9 @@ func (m *Call) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Subscribe) Unmarshal(data []byte) error { @@ -5980,8 +6203,12 @@ func (m *Call_Subscribe) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -5994,6 +6221,12 @@ func (m *Call_Subscribe) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Subscribe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subscribe: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6001,6 +6234,9 @@ func (m *Call_Subscribe) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6032,6 +6268,9 @@ func (m *Call_Subscribe) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6045,15 +6284,7 @@ func (m *Call_Subscribe) Unmarshal(data []byte) error { b := bool(v != 0) m.Force = &b default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -6072,14 +6303,21 @@ func (m *Call_Subscribe) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_info") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Accept) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6092,6 +6330,12 @@ func (m *Call_Accept) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Accept: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Accept: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6099,6 +6343,9 @@ func (m *Call_Accept) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6127,6 +6374,9 @@ func (m *Call_Accept) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6155,6 +6405,9 @@ func (m *Call_Accept) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6180,15 +6433,7 @@ func (m *Call_Accept) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -6204,14 +6449,21 @@ func (m *Call_Accept) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Decline) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6224,6 +6476,12 @@ func (m *Call_Decline) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Decline: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Decline: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6231,6 +6489,9 @@ func (m *Call_Decline) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6259,6 +6520,9 @@ func (m *Call_Decline) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6284,15 +6548,7 @@ func (m *Call_Decline) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -6308,6 +6564,9 @@ func (m *Call_Decline) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Kill) Unmarshal(data []byte) error { @@ -6315,8 +6574,12 @@ func (m *Call_Kill) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6329,6 +6592,12 @@ func (m *Call_Kill) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Kill: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Kill: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6336,6 +6605,9 @@ func (m *Call_Kill) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6367,6 +6639,9 @@ func (m *Call_Kill) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6392,15 +6667,7 @@ func (m *Call_Kill) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -6419,6 +6686,9 @@ func (m *Call_Kill) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Shutdown) Unmarshal(data []byte) error { @@ -6426,8 +6696,12 @@ func (m *Call_Shutdown) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6440,6 +6714,12 @@ func (m *Call_Shutdown) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Shutdown: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Shutdown: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6447,6 +6727,9 @@ func (m *Call_Shutdown) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6478,6 +6761,9 @@ func (m *Call_Shutdown) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6504,15 +6790,7 @@ func (m *Call_Shutdown) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000002) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -6534,6 +6812,9 @@ func (m *Call_Shutdown) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Acknowledge) Unmarshal(data []byte) error { @@ -6541,8 +6822,12 @@ func (m *Call_Acknowledge) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6555,6 +6840,12 @@ func (m *Call_Acknowledge) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Acknowledge: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Acknowledge: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6562,6 +6853,9 @@ func (m *Call_Acknowledge) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6593,6 +6887,9 @@ func (m *Call_Acknowledge) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6624,6 +6921,9 @@ func (m *Call_Acknowledge) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6645,15 +6945,7 @@ func (m *Call_Acknowledge) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000004) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -6678,14 +6970,21 @@ func (m *Call_Acknowledge) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Reconcile) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6698,6 +6997,12 @@ func (m *Call_Reconcile) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Reconcile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Reconcile: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6705,6 +7010,9 @@ func (m *Call_Reconcile) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6728,15 +7036,7 @@ func (m *Call_Reconcile) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -6752,6 +7052,9 @@ func (m *Call_Reconcile) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Reconcile_Task) Unmarshal(data []byte) error { @@ -6759,8 +7062,12 @@ func (m *Call_Reconcile_Task) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6773,6 +7080,12 @@ func (m *Call_Reconcile_Task) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Task: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Task: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6780,6 +7093,9 @@ func (m *Call_Reconcile_Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6811,6 +7127,9 @@ func (m *Call_Reconcile_Task) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6836,15 +7155,7 @@ func (m *Call_Reconcile_Task) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -6863,6 +7174,9 @@ func (m *Call_Reconcile_Task) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Message) Unmarshal(data []byte) error { @@ -6870,8 +7184,12 @@ func (m *Call_Message) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6884,6 +7202,12 @@ func (m *Call_Message) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -6891,6 +7215,9 @@ func (m *Call_Message) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6922,6 +7249,9 @@ func (m *Call_Message) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6953,6 +7283,9 @@ func (m *Call_Message) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -6974,15 +7307,7 @@ func (m *Call_Message) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000004) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -7007,14 +7332,21 @@ func (m *Call_Message) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Call_Request) 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 ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -7027,6 +7359,12 @@ func (m *Call_Request) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -7034,6 +7372,9 @@ func (m *Call_Request) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -7051,21 +7392,13 @@ func (m *Call_Request) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Requests = append(m.Requests, &Request{}) + m.Requests = append(m.Requests, &Call_Request{}) if err := m.Requests[len(m.Requests)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) if err != nil { return err @@ -7081,6 +7414,9 @@ func (m *Call_Request) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipScheduler(data []byte) (n int, err error) { @@ -7089,6 +7425,9 @@ func skipScheduler(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowScheduler + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -7102,7 +7441,10 @@ func skipScheduler(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowScheduler + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -7118,6 +7460,9 @@ func skipScheduler(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowScheduler + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -7138,6 +7483,9 @@ func skipScheduler(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowScheduler + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -7173,4 +7521,5 @@ func skipScheduler(data []byte) (n int, err error) { var ( ErrInvalidLengthScheduler = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowScheduler = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/scheduler.proto b/mesosproto/scheduler.proto index 6f9a07e0..52046ad8 100644 --- a/mesosproto/scheduler.proto +++ b/mesosproto/scheduler.proto @@ -68,17 +68,19 @@ message Event { // This value will be set if the master is sending heartbeats. See // the comment above on 'HEARTBEAT' for more details. - // TODO(vinod): Implement heartbeats in the master once the master - // can send HTTP events. optional double heartbeat_interval_seconds = 2; } // Received whenever there are new resources that are offered to the - // scheduler. Each offer corresponds to a set of resources on a - // slave. Until the scheduler accepts or declines an offer the - // resources are considered allocated to the scheduler. + // scheduler or resources requested back from the scheduler. Each + // offer corresponds to a set of resources on a slave. Until the + // scheduler accepts or declines an offer the resources are + // considered allocated to the scheduler. Accepting or Declining an + // inverse offer informs the allocator of the scheduler's ability to + // release the resources without violating an SLA. message Offers { repeated Offer offers = 1; + repeated InverseOffer inverse_offers = 2; } // Received when a particular offer is no longer valid (e.g., the @@ -179,6 +181,7 @@ message Call { RECONCILE = 9; // See 'Reconcile' below. MESSAGE = 10; // See 'Message' below. REQUEST = 11; // See 'Request' below. + SUPPRESS = 12; // Inform master to stop sending offers to the framework. // TODO(benh): Consider adding an 'ACTIVATE' and 'DEACTIVATE' for // already subscribed frameworks as a way of stopping offers from @@ -316,7 +319,7 @@ message Call { // NOTE: The built-in hierarchical allocator doesn't have support // for this call and hence simply ignores it. message Request { - repeated mesosproto.Request requests = 1; + repeated Request requests = 1; } // Identifies who generated this call. Master assigns a framework id diff --git a/mesosproto/schedulerpb_test.go b/mesosproto/schedulerpb_test.go index 19ec88ca..77cf1fad 100644 --- a/mesosproto/schedulerpb_test.go +++ b/mesosproto/schedulerpb_test.go @@ -3004,661 +3004,300 @@ func TestCall_RequestProtoCompactText(t *testing.T) { } } -func TestEventVerboseEqual(t *testing.T) { +func TestEventStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Event{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEvent_SubscribedVerboseEqual(t *testing.T) { +func TestEvent_SubscribedStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Subscribed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Event_Subscribed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEvent_OffersVerboseEqual(t *testing.T) { +func TestEvent_OffersStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Offers(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Event_Offers{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEvent_RescindVerboseEqual(t *testing.T) { +func TestEvent_RescindStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Rescind(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Event_Rescind{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEvent_UpdateVerboseEqual(t *testing.T) { +func TestEvent_UpdateStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Update(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Event_Update{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEvent_MessageVerboseEqual(t *testing.T) { +func TestEvent_MessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Message(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Event_Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEvent_FailureVerboseEqual(t *testing.T) { +func TestEvent_FailureStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Failure(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Event_Failure{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestEvent_ErrorVerboseEqual(t *testing.T) { +func TestEvent_ErrorStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Error(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Event_Error{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCallVerboseEqual(t *testing.T) { +func TestCallStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_SubscribeVerboseEqual(t *testing.T) { +func TestCall_SubscribeStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Subscribe(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Subscribe{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_AcceptVerboseEqual(t *testing.T) { +func TestCall_AcceptStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Accept(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Accept{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_DeclineVerboseEqual(t *testing.T) { +func TestCall_DeclineStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Decline(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Decline{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_KillVerboseEqual(t *testing.T) { +func TestCall_KillStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Kill(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Kill{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_ShutdownVerboseEqual(t *testing.T) { +func TestCall_ShutdownStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Shutdown(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Shutdown{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_AcknowledgeVerboseEqual(t *testing.T) { +func TestCall_AcknowledgeStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Acknowledge(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Acknowledge{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_ReconcileVerboseEqual(t *testing.T) { +func TestCall_ReconcileStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Reconcile(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Reconcile{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_Reconcile_TaskVerboseEqual(t *testing.T) { +func TestCall_Reconcile_TaskStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Reconcile_Task(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Reconcile_Task{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_MessageVerboseEqual(t *testing.T) { +func TestCall_MessageStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Message(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Call_Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCall_RequestVerboseEqual(t *testing.T) { +func TestCall_RequestStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Request(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestEventSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEvent(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } - msg := &Call_Request{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestEventGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestEvent_SubscribedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent_Subscribed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkEventSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Event, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedEvent(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestEvent_OffersGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent_Offers(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestEvent_SubscribedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEvent_Subscribed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } -} -func TestEvent_RescindGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent_Rescind(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } -} -func TestEvent_UpdateGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent_Update(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestEvent_MessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent_Message(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkEvent_SubscribedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Event_Subscribed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedEvent_Subscribed(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestEvent_FailureGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent_Failure(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestEvent_OffersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEvent_Offers(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestEvent_ErrorGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent_Error(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func TestCallGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func BenchmarkEvent_OffersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Event_Offers, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedEvent_Offers(popr, false) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() } + b.SetBytes(int64(total / b.N)) } -func TestCall_SubscribeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Subscribe(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) + +func TestEvent_RescindSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEvent_Rescind(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestCall_AcceptGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Accept(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCall_DeclineGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Decline(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCall_KillGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Kill(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCall_ShutdownGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Shutdown(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCall_AcknowledgeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Acknowledge(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCall_ReconcileGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Reconcile(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCall_Reconcile_TaskGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Reconcile_Task(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCall_MessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Message(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCall_RequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCall_Request(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestEventSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkEventSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Event, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedEvent(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestEvent_SubscribedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent_Subscribed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkEvent_SubscribedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Event_Subscribed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedEvent_Subscribed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestEvent_OffersSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent_Offers(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkEvent_OffersSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Event_Offers, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedEvent_Offers(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestEvent_RescindSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent_Rescind(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { @@ -4220,175 +3859,536 @@ func BenchmarkCall_RequestSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestEventStringer(t *testing.T) { +func TestEventGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestEvent_SubscribedStringer(t *testing.T) { +func TestEvent_SubscribedGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Subscribed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestEvent_OffersStringer(t *testing.T) { +func TestEvent_OffersGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Offers(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEvent_RescindGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEvent_Rescind(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEvent_UpdateGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEvent_Update(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEvent_MessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEvent_Message(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEvent_FailureGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEvent_Failure(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEvent_ErrorGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEvent_Error(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCallGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_SubscribeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Subscribe(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_AcceptGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Accept(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_DeclineGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Decline(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_KillGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Kill(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_ShutdownGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Shutdown(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_AcknowledgeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Acknowledge(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_ReconcileGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Reconcile(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_Reconcile_TaskGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Reconcile_Task(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_MessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Message(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCall_RequestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Request(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEventVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEvent(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Event{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestEvent_SubscribedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEvent_Subscribed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Event_Subscribed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestEvent_OffersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEvent_Offers(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Event_Offers{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEvent_RescindStringer(t *testing.T) { +func TestEvent_RescindVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Rescind(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Event_Rescind{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEvent_UpdateStringer(t *testing.T) { +func TestEvent_UpdateVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Update(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Event_Update{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEvent_MessageStringer(t *testing.T) { +func TestEvent_MessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Message(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Event_Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEvent_FailureStringer(t *testing.T) { +func TestEvent_FailureVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Failure(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Event_Failure{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEvent_ErrorStringer(t *testing.T) { +func TestEvent_ErrorVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent_Error(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Event_Error{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCallStringer(t *testing.T) { +func TestCallVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_SubscribeStringer(t *testing.T) { +func TestCall_SubscribeVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Subscribe(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Subscribe{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_AcceptStringer(t *testing.T) { +func TestCall_AcceptVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Accept(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Accept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_DeclineStringer(t *testing.T) { +func TestCall_DeclineVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Decline(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Decline{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_KillStringer(t *testing.T) { +func TestCall_KillVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Kill(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Kill{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_ShutdownStringer(t *testing.T) { +func TestCall_ShutdownVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Shutdown(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Shutdown{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_AcknowledgeStringer(t *testing.T) { +func TestCall_AcknowledgeVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Acknowledge(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Acknowledge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_ReconcileStringer(t *testing.T) { +func TestCall_ReconcileVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Reconcile(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Reconcile{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_Reconcile_TaskStringer(t *testing.T) { +func TestCall_Reconcile_TaskVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Reconcile_Task(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Reconcile_Task{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_MessageStringer(t *testing.T) { +func TestCall_MessageVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Message(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCall_RequestStringer(t *testing.T) { +func TestCall_RequestVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Request(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Request{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } diff --git a/mesosproto/state.pb.go b/mesosproto/state.pb.go index db42a71b..2e938215 100644 --- a/mesosproto/state.pb.go +++ b/mesosproto/state.pb.go @@ -1181,8 +1181,12 @@ func (m *Entry) 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 ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1195,6 +1199,12 @@ func (m *Entry) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Entry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1202,6 +1212,9 @@ func (m *Entry) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1230,6 +1243,9 @@ func (m *Entry) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1256,6 +1272,9 @@ func (m *Entry) Unmarshal(data []byte) error { } var byteLen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1277,15 +1296,7 @@ func (m *Entry) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000004) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipState(data[iNdEx:]) if err != nil { return err @@ -1310,6 +1321,9 @@ func (m *Entry) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Operation) Unmarshal(data []byte) error { @@ -1317,8 +1331,12 @@ func (m *Operation) 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 ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1331,6 +1349,12 @@ func (m *Operation) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Operation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 0 { @@ -1338,6 +1362,9 @@ func (m *Operation) Unmarshal(data []byte) error { } var v Operation_Type for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1356,6 +1383,9 @@ func (m *Operation) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1386,6 +1416,9 @@ func (m *Operation) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1416,6 +1449,9 @@ func (m *Operation) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1441,15 +1477,7 @@ func (m *Operation) Unmarshal(data []byte) error { } iNdEx = postIndex default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipState(data[iNdEx:]) if err != nil { return err @@ -1468,6 +1496,9 @@ func (m *Operation) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Operation_Snapshot) Unmarshal(data []byte) error { @@ -1475,8 +1506,12 @@ func (m *Operation_Snapshot) 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 ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1489,6 +1524,12 @@ func (m *Operation_Snapshot) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Snapshot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1496,6 +1537,9 @@ func (m *Operation_Snapshot) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1522,15 +1566,7 @@ func (m *Operation_Snapshot) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipState(data[iNdEx:]) if err != nil { return err @@ -1549,6 +1585,9 @@ func (m *Operation_Snapshot) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Operation_Diff) Unmarshal(data []byte) error { @@ -1556,8 +1595,12 @@ func (m *Operation_Diff) 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 ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1570,6 +1613,12 @@ func (m *Operation_Diff) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Diff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Diff: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1577,6 +1626,9 @@ func (m *Operation_Diff) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1603,15 +1655,7 @@ func (m *Operation_Diff) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipState(data[iNdEx:]) if err != nil { return err @@ -1630,6 +1674,9 @@ func (m *Operation_Diff) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Operation_Expunge) Unmarshal(data []byte) error { @@ -1637,8 +1684,12 @@ func (m *Operation_Expunge) 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 ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1651,6 +1702,12 @@ func (m *Operation_Expunge) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Expunge: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Expunge: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -1658,6 +1715,9 @@ func (m *Operation_Expunge) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -1681,15 +1741,7 @@ func (m *Operation_Expunge) Unmarshal(data []byte) error { iNdEx = postIndex hasFields[0] |= uint64(0x00000001) default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire + iNdEx = preIndex skippy, err := skipState(data[iNdEx:]) if err != nil { return err @@ -1708,6 +1760,9 @@ func (m *Operation_Expunge) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func skipState(data []byte) (n int, err error) { @@ -1716,6 +1771,9 @@ func skipState(data []byte) (n int, err error) { for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1729,7 +1787,10 @@ func skipState(data []byte) (n int, err error) { wireType := int(wire & 0x7) switch wireType { case 0: - for { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1745,6 +1806,9 @@ func skipState(data []byte) (n int, err error) { case 2: var length int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1765,6 +1829,9 @@ func skipState(data []byte) (n int, err error) { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } @@ -1800,4 +1867,5 @@ func skipState(data []byte) (n int, err error) { var ( ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowState = fmt.Errorf("proto: integer overflow") ) diff --git a/mesosproto/statepb_test.go b/mesosproto/statepb_test.go index 89870c02..227eca79 100644 --- a/mesosproto/statepb_test.go +++ b/mesosproto/statepb_test.go @@ -806,144 +806,49 @@ func TestOperation_ExpungeProtoCompactText(t *testing.T) { } } -func TestEntryVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEntry(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Entry{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOperationVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOperation(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Operation{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOperation_SnapshotVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOperation_Snapshot(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Operation_Snapshot{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOperation_DiffVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOperation_Diff(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Operation_Diff{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOperation_ExpungeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOperation_Expunge(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Operation_Expunge{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestEntryGoString(t *testing.T) { +func TestEntryStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEntry(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOperationGoString(t *testing.T) { +func TestOperationStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOperation_SnapshotGoString(t *testing.T) { +func TestOperation_SnapshotStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Snapshot(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOperation_DiffGoString(t *testing.T) { +func TestOperation_DiffStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Diff(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOperation_ExpungeGoString(t *testing.T) { +func TestOperation_ExpungeStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Expunge(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } func TestEntrySize(t *testing.T) { @@ -1126,49 +1031,144 @@ func BenchmarkOperation_ExpungeSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestEntryStringer(t *testing.T) { +func TestEntryGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEntry(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestOperationStringer(t *testing.T) { +func TestOperationGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestOperation_SnapshotStringer(t *testing.T) { +func TestOperation_SnapshotGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Snapshot(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestOperation_DiffStringer(t *testing.T) { +func TestOperation_DiffGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Diff(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestOperation_ExpungeStringer(t *testing.T) { +func TestOperation_ExpungeGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Expunge(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEntry(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Entry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOperationVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOperation(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Operation{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOperation_SnapshotVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOperation_Snapshot(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Operation_Snapshot{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOperation_DiffVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOperation_Diff(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Operation_Diff{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOperation_ExpungeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOperation_Expunge(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Operation_Expunge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } }