diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 1f4bfaeaf97..f93395b03ac 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -762,43 +762,43 @@ }, { "ImportPath": "github.com/mesos/mesos-go/auth", - "Comment": "v0.0.2-5-ged907b1", - "Rev": "ed907b10717e66325cf2894eb90a0553a89fcb11" + "Comment": "before-0.26-protos-14-g4a7554a", + "Rev": "4a7554aad396c70d19c9fc3469980547c9f117ae" }, { "ImportPath": "github.com/mesos/mesos-go/detector", - "Comment": "v0.0.2-5-ged907b1", - "Rev": "ed907b10717e66325cf2894eb90a0553a89fcb11" + "Comment": "before-0.26-protos-14-g4a7554a", + "Rev": "4a7554aad396c70d19c9fc3469980547c9f117ae" }, { "ImportPath": "github.com/mesos/mesos-go/executor", - "Comment": "v0.0.2-5-ged907b1", - "Rev": "ed907b10717e66325cf2894eb90a0553a89fcb11" + "Comment": "before-0.26-protos-14-g4a7554a", + "Rev": "4a7554aad396c70d19c9fc3469980547c9f117ae" }, { "ImportPath": "github.com/mesos/mesos-go/mesosproto", - "Comment": "v0.0.2-5-ged907b1", - "Rev": "ed907b10717e66325cf2894eb90a0553a89fcb11" + "Comment": "before-0.26-protos-14-g4a7554a", + "Rev": "4a7554aad396c70d19c9fc3469980547c9f117ae" }, { "ImportPath": "github.com/mesos/mesos-go/mesosutil", - "Comment": "v0.0.2-5-ged907b1", - "Rev": "ed907b10717e66325cf2894eb90a0553a89fcb11" + "Comment": "before-0.26-protos-14-g4a7554a", + "Rev": "4a7554aad396c70d19c9fc3469980547c9f117ae" }, { "ImportPath": "github.com/mesos/mesos-go/messenger", - "Comment": "v0.0.2-5-ged907b1", - "Rev": "ed907b10717e66325cf2894eb90a0553a89fcb11" + "Comment": "before-0.26-protos-14-g4a7554a", + "Rev": "4a7554aad396c70d19c9fc3469980547c9f117ae" }, { "ImportPath": "github.com/mesos/mesos-go/scheduler", - "Comment": "v0.0.2-5-ged907b1", - "Rev": "ed907b10717e66325cf2894eb90a0553a89fcb11" + "Comment": "before-0.26-protos-14-g4a7554a", + "Rev": "4a7554aad396c70d19c9fc3469980547c9f117ae" }, { "ImportPath": "github.com/mesos/mesos-go/upid", - "Comment": "v0.0.2-5-ged907b1", - "Rev": "ed907b10717e66325cf2894eb90a0553a89fcb11" + "Comment": "before-0.26-protos-14-g4a7554a", + "Rev": "4a7554aad396c70d19c9fc3469980547c9f117ae" }, { "ImportPath": "github.com/miekg/dns", @@ -841,6 +841,10 @@ "ImportPath": "github.com/pborman/uuid", "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4" }, + { + "ImportPath": "github.com/pmezard/go-difflib/difflib", + "Rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d" + }, { "ImportPath": "github.com/prometheus/client_golang/prometheus", "Comment": "0.7.0-39-g3b78d7a", @@ -908,18 +912,18 @@ }, { "ImportPath": "github.com/stretchr/testify/assert", - "Comment": "v1.0-17-g089c718", - "Rev": "089c7181b8c728499929ff09b62d3fdd8df8adff" + "Comment": "v1.0-88-ge3a8ff8", + "Rev": "e3a8ff8ce36581f87a15341206f205b1da467059" }, { "ImportPath": "github.com/stretchr/testify/mock", - "Comment": "v1.0-17-g089c718", - "Rev": "089c7181b8c728499929ff09b62d3fdd8df8adff" + "Comment": "v1.0-88-ge3a8ff8", + "Rev": "e3a8ff8ce36581f87a15341206f205b1da467059" }, { "ImportPath": "github.com/stretchr/testify/require", - "Comment": "v1.0-17-g089c718", - "Rev": "089c7181b8c728499929ff09b62d3fdd8df8adff" + "Comment": "v1.0-88-ge3a8ff8", + "Rev": "e3a8ff8ce36581f87a15341206f205b1da467059" }, { "ImportPath": "github.com/syndtr/gocapability/capability", diff --git a/Godeps/LICENSES.md b/Godeps/LICENSES.md index cf5170dfe9c..ce6220319e0 100644 --- a/Godeps/LICENSES.md +++ b/Godeps/LICENSES.md @@ -73,6 +73,7 @@ github.com/onsi/ginkgo | spdxMIT github.com/onsi/gomega | spdxMIT github.com/opencontainers/runc | Apache-2 github.com/pborman/uuid | spdxBSD3 +github.com/pmezard/go-difflib | BSD3 github.com/prometheus/client_golang | Apache-2 github.com/prometheus/client_model | Apache-2 github.com/prometheus/common/expfmt | Apache-2 @@ -89,7 +90,7 @@ github.com/skynetservices/skydns | MITname github.com/spf13/cobra | Apache-2 github.com/spf13/pflag | spdxBSD3 github.com/stretchr/objx | MIT? -github.com/stretchr/testify | MIT? +github.com/stretchr/testify | spdxMIT github.com/syndtr/gocapability | spdxBSD2 github.com/ugorji/go | MITname github.com/vishvananda/netlink | Apache-2 diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/standalone.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/standalone.go index cad423bd7ff..88429491cc0 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/standalone.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/standalone.go @@ -107,11 +107,11 @@ func (s *Standalone) Cancel() { s.cancelOnce.Do(func() { close(s.done) }) } -// poll for changes to master leadership via current leader's /state.json endpoint. +// poll for changes to master leadership via current leader's /state endpoint. // we poll the `initial` leader, aborting if none was specified. // // TODO(jdef) follow the leader: change who we poll based on the prior leader -// TODO(jdef) somehow determine all masters in cluster from the state.json? +// TODO(jdef) somehow determine all masters in cluster from the /state? // func (s *Standalone) _poller(pf fetcherFunc) { defer func() { @@ -193,7 +193,7 @@ func (s *Standalone) _poller(pf fetcherFunc) { // assumes that address is in host:port format func (s *Standalone) _fetchPid(ctx context.Context, address string) (*upid.UPID, error) { //TODO(jdef) need SSL support - uri := fmt.Sprintf("http://%s/state.json", address) + uri := fmt.Sprintf("http://%s/state", address) req, err := http.NewRequest("GET", uri, nil) if err != nil { return nil, err diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/Makefile b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/Makefile index b0915628a7c..0d643a7014d 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/Makefile +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/Makefile @@ -1,2 +1,9 @@ -all: *.proto - protoc --proto_path=${GOPATH}/src:${GOPATH}/src/github.com/gogo/protobuf/protobuf:. --gogo_out=. *.proto +PROTO_PATH := ${GOPATH}/src:. +PROTO_PATH := ${PROTO_PATH}:${GOPATH}/src/github.com/gogo/protobuf/protobuf +PROTO_PATH := ${PROTO_PATH}:${GOPATH}/src/github.com/gogo/protobuf/gogoproto + +.PHONY: all + +all: + protoc --proto_path=${PROTO_PATH} --gogo_out=. *.proto + protoc --proto_path=${PROTO_PATH} --gogo_out=. ./scheduler/*.proto diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.pb.go index 2315ad11008..3950ce3a4e9 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.pb.go @@ -7,15 +7,9 @@ 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 @@ -25,37 +19,22 @@ It has these top-level messages: 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 + TimeInfo + DurationInfo Address URL + Unavailability + MachineID + MachineInfo FrameworkInfo HealthCheck CommandInfo @@ -71,6 +50,7 @@ It has these top-level messages: PerfStatistics Request Offer + InverseOffer TaskInfo TaskStatus Filters @@ -83,7 +63,9 @@ It has these top-level messages: RateLimits Image Volume + NetworkInfo ContainerInfo + ContainerStatus Labels Label Port @@ -138,11 +120,6 @@ It has these top-level messages: Archive TaskHealthStatus HookExecuted - Registry - Event - Call - Entry - Operation */ package mesosproto @@ -1394,8 +1371,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 +1389,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 +1402,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 +1428,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 +1447,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 +1474,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 +1487,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 +1511,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 +1527,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 +1537,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 +1555,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 +1568,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 +1599,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 +1622,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 +1641,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 +1651,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 +1669,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 +1682,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 +1706,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,104 +1725,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 iNdEx >= l { - return io.ErrUnexpectedEOF + if shift >= 64 { + return ErrIntOverflowAuthentication } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipAuthentication(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthentication - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - return nil -} -func (m *AuthenticationFailedMessage) 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 - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipAuthentication(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthentication - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - return nil -} -func (m *AuthenticationErrorMessage) 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 } @@ -1826,6 +1752,114 @@ func (m *AuthenticationErrorMessage) 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: + iNdEx = preIndex + skippy, err := skipAuthentication(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthentication + } + 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 *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 + } + 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: 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: + iNdEx = preIndex + skippy, err := skipAuthentication(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthentication + } + 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 *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 + } + 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: 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 +1867,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 +1892,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 +1908,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 +1919,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 +1935,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 +1954,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 +1977,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 +2015,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/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authorizer.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authorizer.pb.go deleted file mode 100644 index 6e06b300dbe..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authorizer.pb.go +++ /dev/null @@ -1,2183 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: authorizer.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 - -type ACL_Entity_Type int32 - -const ( - ACL_Entity_SOME ACL_Entity_Type = 0 - ACL_Entity_ANY ACL_Entity_Type = 1 - ACL_Entity_NONE ACL_Entity_Type = 2 -) - -var ACL_Entity_Type_name = map[int32]string{ - 0: "SOME", - 1: "ANY", - 2: "NONE", -} -var ACL_Entity_Type_value = map[string]int32{ - "SOME": 0, - "ANY": 1, - "NONE": 2, -} - -func (x ACL_Entity_Type) Enum() *ACL_Entity_Type { - p := new(ACL_Entity_Type) - *p = x - return p -} -func (x ACL_Entity_Type) String() string { - return proto.EnumName(ACL_Entity_Type_name, int32(x)) -} -func (x *ACL_Entity_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ACL_Entity_Type_value, data, "ACL_Entity_Type") - if err != nil { - return err - } - *x = ACL_Entity_Type(value) - return nil -} - -// * -// ACLs used for local authorization (See authorization.md file in the -// docs). -type ACL struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *ACL) Reset() { *m = ACL{} } -func (*ACL) ProtoMessage() {} - -// Entity is used to describe a subject(s) or an object(s) of an ACL. -// NOTE: -// To allow everyone access to an Entity set its type to 'ANY'. -// To deny access to an Entity set its type to 'NONE'. -type ACL_Entity struct { - Type *ACL_Entity_Type `protobuf:"varint,1,opt,name=type,enum=mesosproto.ACL_Entity_Type,def=0" json:"type,omitempty"` - Values []string `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ACL_Entity) Reset() { *m = ACL_Entity{} } -func (*ACL_Entity) ProtoMessage() {} - -const Default_ACL_Entity_Type ACL_Entity_Type = ACL_Entity_SOME - -func (m *ACL_Entity) GetType() ACL_Entity_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return Default_ACL_Entity_Type -} - -func (m *ACL_Entity) GetValues() []string { - if m != nil { - return m.Values - } - return nil -} - -// ACLs. -type ACL_RegisterFramework struct { - // Subjects. - Principals *ACL_Entity `protobuf:"bytes,1,req,name=principals" json:"principals,omitempty"` - // Objects. - Roles *ACL_Entity `protobuf:"bytes,2,req,name=roles" json:"roles,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ACL_RegisterFramework) Reset() { *m = ACL_RegisterFramework{} } -func (*ACL_RegisterFramework) ProtoMessage() {} - -func (m *ACL_RegisterFramework) GetPrincipals() *ACL_Entity { - if m != nil { - return m.Principals - } - return nil -} - -func (m *ACL_RegisterFramework) GetRoles() *ACL_Entity { - if m != nil { - return m.Roles - } - return nil -} - -type ACL_RunTask struct { - // Subjects. - Principals *ACL_Entity `protobuf:"bytes,1,req,name=principals" json:"principals,omitempty"` - // Objects. - Users *ACL_Entity `protobuf:"bytes,2,req,name=users" json:"users,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ACL_RunTask) Reset() { *m = ACL_RunTask{} } -func (*ACL_RunTask) ProtoMessage() {} - -func (m *ACL_RunTask) GetPrincipals() *ACL_Entity { - if m != nil { - return m.Principals - } - return nil -} - -func (m *ACL_RunTask) GetUsers() *ACL_Entity { - if m != nil { - return m.Users - } - return nil -} - -// Which principals are authorized to shutdown frameworks of other -// principals. -type ACL_ShutdownFramework struct { - // Subjects. - Principals *ACL_Entity `protobuf:"bytes,1,req,name=principals" json:"principals,omitempty"` - // Objects. - FrameworkPrincipals *ACL_Entity `protobuf:"bytes,2,req,name=framework_principals" json:"framework_principals,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ACL_ShutdownFramework) Reset() { *m = ACL_ShutdownFramework{} } -func (*ACL_ShutdownFramework) ProtoMessage() {} - -func (m *ACL_ShutdownFramework) GetPrincipals() *ACL_Entity { - if m != nil { - return m.Principals - } - return nil -} - -func (m *ACL_ShutdownFramework) GetFrameworkPrincipals() *ACL_Entity { - if m != nil { - return m.FrameworkPrincipals - } - return nil -} - -// * -// Collection of ACL. -// -// Each authorization request is evaluated against the ACLs in the order -// they are defined. -// -// For simplicity, the ACLs for a given action are not aggregated even -// when they have the same subjects or objects. The first ACL that -// matches the request determines whether that request should be -// permitted or not. An ACL matches iff both the subjects -// (e.g., clients, principals) and the objects (e.g., urls, users, -// roles) of the ACL match the request. -// -// If none of the ACLs match the request, the 'permissive' field -// determines whether the request should be permitted or not. -// -// TODO(vinod): Do aggregation of ACLs when possible. -// -type ACLs struct { - Permissive *bool `protobuf:"varint,1,opt,name=permissive,def=1" json:"permissive,omitempty"` - RegisterFrameworks []*ACL_RegisterFramework `protobuf:"bytes,2,rep,name=register_frameworks" json:"register_frameworks,omitempty"` - RunTasks []*ACL_RunTask `protobuf:"bytes,3,rep,name=run_tasks" json:"run_tasks,omitempty"` - ShutdownFrameworks []*ACL_ShutdownFramework `protobuf:"bytes,4,rep,name=shutdown_frameworks" json:"shutdown_frameworks,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ACLs) Reset() { *m = ACLs{} } -func (*ACLs) ProtoMessage() {} - -const Default_ACLs_Permissive bool = true - -func (m *ACLs) GetPermissive() bool { - if m != nil && m.Permissive != nil { - return *m.Permissive - } - return Default_ACLs_Permissive -} - -func (m *ACLs) GetRegisterFrameworks() []*ACL_RegisterFramework { - if m != nil { - return m.RegisterFrameworks - } - return nil -} - -func (m *ACLs) GetRunTasks() []*ACL_RunTask { - if m != nil { - return m.RunTasks - } - return nil -} - -func (m *ACLs) GetShutdownFrameworks() []*ACL_ShutdownFramework { - if m != nil { - return m.ShutdownFrameworks - } - return nil -} - -func init() { - proto.RegisterEnum("mesosproto.ACL_Entity_Type", ACL_Entity_Type_name, ACL_Entity_Type_value) -} -func (this *ACL) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ACL) - if !ok { - return fmt.Errorf("that is not of type *ACL") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ACL but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ACLbut is not nil && this == nil") - } - 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 *ACL) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ACL) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ACL_Entity) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ACL_Entity) - if !ok { - return fmt.Errorf("that is not of type *ACL_Entity") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ACL_Entity but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ACL_Entitybut is not nil && this == nil") - } - 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 len(this.Values) != len(that1.Values) { - return fmt.Errorf("Values this(%v) Not Equal that(%v)", len(this.Values), len(that1.Values)) - } - for i := range this.Values { - if this.Values[i] != that1.Values[i] { - return fmt.Errorf("Values this[%v](%v) Not Equal that[%v](%v)", i, this.Values[i], i, that1.Values[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 *ACL_Entity) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ACL_Entity) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == 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 len(this.Values) != len(that1.Values) { - return false - } - for i := range this.Values { - if this.Values[i] != that1.Values[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ACL_RegisterFramework) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ACL_RegisterFramework) - if !ok { - return fmt.Errorf("that is not of type *ACL_RegisterFramework") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ACL_RegisterFramework but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ACL_RegisterFrameworkbut is not nil && this == nil") - } - if !this.Principals.Equal(that1.Principals) { - return fmt.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) - } - if !this.Roles.Equal(that1.Roles) { - return fmt.Errorf("Roles this(%v) Not Equal that(%v)", this.Roles, that1.Roles) - } - 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 *ACL_RegisterFramework) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ACL_RegisterFramework) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Principals.Equal(that1.Principals) { - return false - } - if !this.Roles.Equal(that1.Roles) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ACL_RunTask) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ACL_RunTask) - if !ok { - return fmt.Errorf("that is not of type *ACL_RunTask") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ACL_RunTask but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ACL_RunTaskbut is not nil && this == nil") - } - if !this.Principals.Equal(that1.Principals) { - return fmt.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) - } - if !this.Users.Equal(that1.Users) { - return fmt.Errorf("Users this(%v) Not Equal that(%v)", this.Users, that1.Users) - } - 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 *ACL_RunTask) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ACL_RunTask) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Principals.Equal(that1.Principals) { - return false - } - if !this.Users.Equal(that1.Users) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ACL_ShutdownFramework) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ACL_ShutdownFramework) - if !ok { - return fmt.Errorf("that is not of type *ACL_ShutdownFramework") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ACL_ShutdownFramework but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ACL_ShutdownFrameworkbut is not nil && this == nil") - } - if !this.Principals.Equal(that1.Principals) { - return fmt.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) - } - if !this.FrameworkPrincipals.Equal(that1.FrameworkPrincipals) { - return fmt.Errorf("FrameworkPrincipals this(%v) Not Equal that(%v)", this.FrameworkPrincipals, that1.FrameworkPrincipals) - } - 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 *ACL_ShutdownFramework) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ACL_ShutdownFramework) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Principals.Equal(that1.Principals) { - return false - } - if !this.FrameworkPrincipals.Equal(that1.FrameworkPrincipals) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ACLs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ACLs) - if !ok { - return fmt.Errorf("that is not of type *ACLs") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ACLs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ACLsbut is not nil && this == nil") - } - if this.Permissive != nil && that1.Permissive != nil { - if *this.Permissive != *that1.Permissive { - return fmt.Errorf("Permissive this(%v) Not Equal that(%v)", *this.Permissive, *that1.Permissive) - } - } else if this.Permissive != nil { - return fmt.Errorf("this.Permissive == nil && that.Permissive != nil") - } else if that1.Permissive != nil { - return fmt.Errorf("Permissive this(%v) Not Equal that(%v)", this.Permissive, that1.Permissive) - } - if len(this.RegisterFrameworks) != len(that1.RegisterFrameworks) { - return fmt.Errorf("RegisterFrameworks this(%v) Not Equal that(%v)", len(this.RegisterFrameworks), len(that1.RegisterFrameworks)) - } - for i := range this.RegisterFrameworks { - if !this.RegisterFrameworks[i].Equal(that1.RegisterFrameworks[i]) { - return fmt.Errorf("RegisterFrameworks this[%v](%v) Not Equal that[%v](%v)", i, this.RegisterFrameworks[i], i, that1.RegisterFrameworks[i]) - } - } - if len(this.RunTasks) != len(that1.RunTasks) { - return fmt.Errorf("RunTasks this(%v) Not Equal that(%v)", len(this.RunTasks), len(that1.RunTasks)) - } - for i := range this.RunTasks { - if !this.RunTasks[i].Equal(that1.RunTasks[i]) { - return fmt.Errorf("RunTasks this[%v](%v) Not Equal that[%v](%v)", i, this.RunTasks[i], i, that1.RunTasks[i]) - } - } - if len(this.ShutdownFrameworks) != len(that1.ShutdownFrameworks) { - return fmt.Errorf("ShutdownFrameworks this(%v) Not Equal that(%v)", len(this.ShutdownFrameworks), len(that1.ShutdownFrameworks)) - } - for i := range this.ShutdownFrameworks { - if !this.ShutdownFrameworks[i].Equal(that1.ShutdownFrameworks[i]) { - return fmt.Errorf("ShutdownFrameworks this[%v](%v) Not Equal that[%v](%v)", i, this.ShutdownFrameworks[i], i, that1.ShutdownFrameworks[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 *ACLs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ACLs) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Permissive != nil && that1.Permissive != nil { - if *this.Permissive != *that1.Permissive { - return false - } - } else if this.Permissive != nil { - return false - } else if that1.Permissive != nil { - return false - } - if len(this.RegisterFrameworks) != len(that1.RegisterFrameworks) { - return false - } - for i := range this.RegisterFrameworks { - if !this.RegisterFrameworks[i].Equal(that1.RegisterFrameworks[i]) { - return false - } - } - if len(this.RunTasks) != len(that1.RunTasks) { - return false - } - for i := range this.RunTasks { - if !this.RunTasks[i].Equal(that1.RunTasks[i]) { - return false - } - } - if len(this.ShutdownFrameworks) != len(that1.ShutdownFrameworks) { - return false - } - for i := range this.ShutdownFrameworks { - if !this.ShutdownFrameworks[i].Equal(that1.ShutdownFrameworks[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ACL) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&mesosproto.ACL{") - 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 *ACL_Entity) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&mesosproto.ACL_Entity{") - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringAuthorizer(this.Type, "mesosproto.ACL_Entity_Type")+",\n") - } - if this.Values != nil { - s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\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 *ACL_RegisterFramework) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&mesosproto.ACL_RegisterFramework{") - if this.Principals != nil { - s = append(s, "Principals: "+fmt.Sprintf("%#v", this.Principals)+",\n") - } - if this.Roles != nil { - s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\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 *ACL_RunTask) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&mesosproto.ACL_RunTask{") - if this.Principals != nil { - s = append(s, "Principals: "+fmt.Sprintf("%#v", this.Principals)+",\n") - } - if this.Users != nil { - s = append(s, "Users: "+fmt.Sprintf("%#v", this.Users)+",\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 *ACL_ShutdownFramework) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&mesosproto.ACL_ShutdownFramework{") - if this.Principals != nil { - s = append(s, "Principals: "+fmt.Sprintf("%#v", this.Principals)+",\n") - } - if this.FrameworkPrincipals != nil { - s = append(s, "FrameworkPrincipals: "+fmt.Sprintf("%#v", this.FrameworkPrincipals)+",\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 *ACLs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&mesosproto.ACLs{") - if this.Permissive != nil { - s = append(s, "Permissive: "+valueToGoStringAuthorizer(this.Permissive, "bool")+",\n") - } - if this.RegisterFrameworks != nil { - s = append(s, "RegisterFrameworks: "+fmt.Sprintf("%#v", this.RegisterFrameworks)+",\n") - } - if this.RunTasks != nil { - s = append(s, "RunTasks: "+fmt.Sprintf("%#v", this.RunTasks)+",\n") - } - if this.ShutdownFrameworks != nil { - s = append(s, "ShutdownFrameworks: "+fmt.Sprintf("%#v", this.ShutdownFrameworks)+",\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 valueToGoStringAuthorizer(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 extensionToGoStringAuthorizer(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 *ACL) 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 *ACL) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ACL_Entity) 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 *ACL_Entity) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type != nil { - data[i] = 0x8 - i++ - i = encodeVarintAuthorizer(data, i, uint64(*m.Type)) - } - if len(m.Values) > 0 { - for _, s := range m.Values { - data[i] = 0x12 - 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.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ACL_RegisterFramework) 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 *ACL_RegisterFramework) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Principals == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") - } else { - data[i] = 0xa - i++ - i = encodeVarintAuthorizer(data, i, uint64(m.Principals.Size())) - n1, err := m.Principals.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Roles == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("roles") - } else { - data[i] = 0x12 - i++ - i = encodeVarintAuthorizer(data, i, uint64(m.Roles.Size())) - n2, err := m.Roles.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 (m *ACL_RunTask) 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 *ACL_RunTask) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Principals == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") - } else { - data[i] = 0xa - i++ - i = encodeVarintAuthorizer(data, i, uint64(m.Principals.Size())) - n3, err := m.Principals.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Users == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("users") - } else { - data[i] = 0x12 - i++ - i = encodeVarintAuthorizer(data, i, uint64(m.Users.Size())) - n4, err := m.Users.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ACL_ShutdownFramework) 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 *ACL_ShutdownFramework) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Principals == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") - } else { - data[i] = 0xa - i++ - i = encodeVarintAuthorizer(data, i, uint64(m.Principals.Size())) - n5, err := m.Principals.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.FrameworkPrincipals == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_principals") - } else { - data[i] = 0x12 - i++ - i = encodeVarintAuthorizer(data, i, uint64(m.FrameworkPrincipals.Size())) - n6, err := m.FrameworkPrincipals.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 *ACLs) 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 *ACLs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Permissive != nil { - data[i] = 0x8 - i++ - if *m.Permissive { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if len(m.RegisterFrameworks) > 0 { - for _, msg := range m.RegisterFrameworks { - data[i] = 0x12 - i++ - i = encodeVarintAuthorizer(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.RunTasks) > 0 { - for _, msg := range m.RunTasks { - data[i] = 0x1a - i++ - i = encodeVarintAuthorizer(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ShutdownFrameworks) > 0 { - for _, msg := range m.ShutdownFrameworks { - data[i] = 0x22 - i++ - i = encodeVarintAuthorizer(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 encodeFixed64Authorizer(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 encodeFixed32Authorizer(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 encodeVarintAuthorizer(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 NewPopulatedACL(r randyAuthorizer, easy bool) *ACL { - this := &ACL{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAuthorizer(r, 1) - } - return this -} - -func NewPopulatedACL_Entity(r randyAuthorizer, easy bool) *ACL_Entity { - this := &ACL_Entity{} - if r.Intn(10) != 0 { - v1 := ACL_Entity_Type([]int32{0, 1, 2}[r.Intn(3)]) - this.Type = &v1 - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.Values = make([]string, v2) - for i := 0; i < v2; i++ { - this.Values[i] = randStringAuthorizer(r) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAuthorizer(r, 3) - } - return this -} - -func NewPopulatedACL_RegisterFramework(r randyAuthorizer, easy bool) *ACL_RegisterFramework { - this := &ACL_RegisterFramework{} - this.Principals = NewPopulatedACL_Entity(r, easy) - this.Roles = NewPopulatedACL_Entity(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAuthorizer(r, 3) - } - return this -} - -func NewPopulatedACL_RunTask(r randyAuthorizer, easy bool) *ACL_RunTask { - this := &ACL_RunTask{} - this.Principals = NewPopulatedACL_Entity(r, easy) - this.Users = NewPopulatedACL_Entity(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAuthorizer(r, 3) - } - return this -} - -func NewPopulatedACL_ShutdownFramework(r randyAuthorizer, easy bool) *ACL_ShutdownFramework { - this := &ACL_ShutdownFramework{} - this.Principals = NewPopulatedACL_Entity(r, easy) - this.FrameworkPrincipals = NewPopulatedACL_Entity(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAuthorizer(r, 3) - } - return this -} - -func NewPopulatedACLs(r randyAuthorizer, easy bool) *ACLs { - this := &ACLs{} - if r.Intn(10) != 0 { - v3 := bool(bool(r.Intn(2) == 0)) - this.Permissive = &v3 - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.RegisterFrameworks = make([]*ACL_RegisterFramework, v4) - for i := 0; i < v4; i++ { - this.RegisterFrameworks[i] = NewPopulatedACL_RegisterFramework(r, easy) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.RunTasks = make([]*ACL_RunTask, v5) - for i := 0; i < v5; i++ { - this.RunTasks[i] = NewPopulatedACL_RunTask(r, easy) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.ShutdownFrameworks = make([]*ACL_ShutdownFramework, v6) - for i := 0; i < v6; i++ { - this.ShutdownFrameworks[i] = NewPopulatedACL_ShutdownFramework(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAuthorizer(r, 5) - } - return this -} - -type randyAuthorizer interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAuthorizer(r randyAuthorizer) 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 randStringAuthorizer(r randyAuthorizer) string { - v7 := r.Intn(100) - tmps := make([]rune, v7) - for i := 0; i < v7; i++ { - tmps[i] = randUTF8RuneAuthorizer(r) - } - return string(tmps) -} -func randUnrecognizedAuthorizer(r randyAuthorizer, 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 = randFieldAuthorizer(data, r, fieldNumber, wire) - } - return data -} -func randFieldAuthorizer(data []byte, r randyAuthorizer, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateAuthorizer(data, uint64(key)) - v8 := r.Int63() - if r.Intn(2) == 0 { - v8 *= -1 - } - data = encodeVarintPopulateAuthorizer(data, uint64(v8)) - case 1: - data = encodeVarintPopulateAuthorizer(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 = encodeVarintPopulateAuthorizer(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateAuthorizer(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateAuthorizer(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 encodeVarintPopulateAuthorizer(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 *ACL) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ACL_Entity) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovAuthorizer(uint64(*m.Type)) - } - if len(m.Values) > 0 { - for _, s := range m.Values { - l = len(s) - n += 1 + l + sovAuthorizer(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ACL_RegisterFramework) Size() (n int) { - var l int - _ = l - if m.Principals != nil { - l = m.Principals.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - if m.Roles != nil { - l = m.Roles.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ACL_RunTask) Size() (n int) { - var l int - _ = l - if m.Principals != nil { - l = m.Principals.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - if m.Users != nil { - l = m.Users.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ACL_ShutdownFramework) Size() (n int) { - var l int - _ = l - if m.Principals != nil { - l = m.Principals.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - if m.FrameworkPrincipals != nil { - l = m.FrameworkPrincipals.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ACLs) Size() (n int) { - var l int - _ = l - if m.Permissive != nil { - n += 2 - } - if len(m.RegisterFrameworks) > 0 { - for _, e := range m.RegisterFrameworks { - l = e.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - } - if len(m.RunTasks) > 0 { - for _, e := range m.RunTasks { - l = e.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - } - if len(m.ShutdownFrameworks) > 0 { - for _, e := range m.ShutdownFrameworks { - l = e.Size() - n += 1 + l + sovAuthorizer(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAuthorizer(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAuthorizer(x uint64) (n int) { - return sovAuthorizer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ACL) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ACL{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ACL_Entity) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ACL_Entity{`, - `Type:` + valueToStringAuthorizer(this.Type) + `,`, - `Values:` + fmt.Sprintf("%v", this.Values) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ACL_RegisterFramework) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ACL_RegisterFramework{`, - `Principals:` + strings.Replace(fmt.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, - `Roles:` + strings.Replace(fmt.Sprintf("%v", this.Roles), "ACL_Entity", "ACL_Entity", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ACL_RunTask) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ACL_RunTask{`, - `Principals:` + strings.Replace(fmt.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, - `Users:` + strings.Replace(fmt.Sprintf("%v", this.Users), "ACL_Entity", "ACL_Entity", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ACL_ShutdownFramework) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ACL_ShutdownFramework{`, - `Principals:` + strings.Replace(fmt.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, - `FrameworkPrincipals:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkPrincipals), "ACL_Entity", "ACL_Entity", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ACLs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ACLs{`, - `Permissive:` + valueToStringAuthorizer(this.Permissive) + `,`, - `RegisterFrameworks:` + strings.Replace(fmt.Sprintf("%v", this.RegisterFrameworks), "ACL_RegisterFramework", "ACL_RegisterFramework", 1) + `,`, - `RunTasks:` + strings.Replace(fmt.Sprintf("%v", this.RunTasks), "ACL_RunTask", "ACL_RunTask", 1) + `,`, - `ShutdownFrameworks:` + strings.Replace(fmt.Sprintf("%v", this.ShutdownFrameworks), "ACL_ShutdownFramework", "ACL_ShutdownFramework", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringAuthorizer(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *ACL) 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 - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipAuthorizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthorizer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - return nil -} -func (m *ACL_Entity) 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 - } - 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 != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v ACL_Entity_Type - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (ACL_Entity_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - 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 - skippy, err := skipAuthorizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthorizer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - return nil -} -func (m *ACL_RegisterFramework) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principals", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Principals == nil { - m.Principals = &ACL_Entity{} - } - if err := m.Principals.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 Roles", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Roles == nil { - m.Roles = &ACL_Entity{} - } - if err := m.Roles.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipAuthorizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthorizer - } - 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("principals") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("roles") - } - - return nil -} -func (m *ACL_RunTask) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principals", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Principals == nil { - m.Principals = &ACL_Entity{} - } - if err := m.Principals.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 Users", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Users == nil { - m.Users = &ACL_Entity{} - } - if err := m.Users.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipAuthorizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthorizer - } - 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("principals") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("users") - } - - return nil -} -func (m *ACL_ShutdownFramework) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principals", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Principals == nil { - m.Principals = &ACL_Entity{} - } - if err := m.Principals.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 FrameworkPrincipals", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FrameworkPrincipals == nil { - m.FrameworkPrincipals = &ACL_Entity{} - } - if err := m.FrameworkPrincipals.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipAuthorizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthorizer - } - 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("principals") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_principals") - } - - return nil -} -func (m *ACLs) 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 - } - 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 != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissive", 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.Permissive = &b - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RegisterFrameworks", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RegisterFrameworks = append(m.RegisterFrameworks, &ACL_RegisterFramework{}) - if err := m.RegisterFrameworks[len(m.RegisterFrameworks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RunTasks", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RunTasks = append(m.RunTasks, &ACL_RunTask{}) - if err := m.RunTasks[len(m.RunTasks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShutdownFrameworks", 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 ErrInvalidLengthAuthorizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShutdownFrameworks = append(m.ShutdownFrameworks, &ACL_ShutdownFramework{}) - if err := m.ShutdownFrameworks[len(m.ShutdownFrameworks)-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 - skippy, err := skipAuthorizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthorizer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - return nil -} -func skipAuthorizer(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - 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 { - 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 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, ErrInvalidLengthAuthorizer - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - 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 := skipAuthorizer(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 ( - ErrInvalidLengthAuthorizer = fmt.Errorf("proto: negative length found during unmarshaling") -) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authorizer.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authorizer.proto deleted file mode 100644 index 03ee69b4e8e..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authorizer.proto +++ /dev/null @@ -1,108 +0,0 @@ -/** - * 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 "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; - -/** - * ACLs used for local authorization (See authorization.md file in the - * docs). - */ -message ACL { - - // Entity is used to describe a subject(s) or an object(s) of an ACL. - // NOTE: - // To allow everyone access to an Entity set its type to 'ANY'. - // To deny access to an Entity set its type to 'NONE'. - message Entity { - enum Type { - SOME = 0; - ANY = 1; - NONE = 2; - } - optional Type type = 1 [default = SOME]; - repeated string values = 2; // Ignored for ANY/NONE. - } - - // ACLs. - message RegisterFramework { - // Subjects. - required Entity principals = 1; // Framework principals. - - // Objects. - required Entity roles = 2; // Roles for resource offers. - } - - message RunTask { - // Subjects. - required Entity principals = 1; // Framework principals. - - // Objects. - required Entity users = 2; // Users to run the tasks/executors as. - } - - // Which principals are authorized to shutdown frameworks of other - // principals. - message ShutdownFramework { - // Subjects. - required Entity principals = 1; - - // Objects. - required Entity framework_principals = 2; - } -} - - -/** - * Collection of ACL. - * - * Each authorization request is evaluated against the ACLs in the order - * they are defined. - * - * For simplicity, the ACLs for a given action are not aggregated even - * when they have the same subjects or objects. The first ACL that - * matches the request determines whether that request should be - * permitted or not. An ACL matches iff both the subjects - * (e.g., clients, principals) and the objects (e.g., urls, users, - * roles) of the ACL match the request. - * - * If none of the ACLs match the request, the 'permissive' field - * determines whether the request should be permitted or not. - * - * TODO(vinod): Do aggregation of ACLs when possible. - * - */ -message ACLs { - optional bool permissive = 1 [default = true]; - repeated ACL.RegisterFramework register_frameworks = 2; - repeated ACL.RunTask run_tasks = 3; - repeated ACL.ShutdownFramework shutdown_frameworks = 4; -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.pb.go deleted file mode 100644 index 3bb913a1d2b..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.pb.go +++ /dev/null @@ -1,2622 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: containerizer.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 - -// * -// Encodes the launch command sent to the external containerizer -// program. -type Launch struct { - ContainerId *ContainerID `protobuf:"bytes,1,req,name=container_id" json:"container_id,omitempty"` - TaskInfo *TaskInfo `protobuf:"bytes,2,opt,name=task_info" json:"task_info,omitempty"` - ExecutorInfo *ExecutorInfo `protobuf:"bytes,3,opt,name=executor_info" json:"executor_info,omitempty"` - Directory *string `protobuf:"bytes,4,opt,name=directory" json:"directory,omitempty"` - User *string `protobuf:"bytes,5,opt,name=user" json:"user,omitempty"` - SlaveId *SlaveID `protobuf:"bytes,6,opt,name=slave_id" json:"slave_id,omitempty"` - SlavePid *string `protobuf:"bytes,7,opt,name=slave_pid" json:"slave_pid,omitempty"` - Checkpoint *bool `protobuf:"varint,8,opt,name=checkpoint" json:"checkpoint,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Launch) Reset() { *m = Launch{} } -func (*Launch) ProtoMessage() {} - -func (m *Launch) GetContainerId() *ContainerID { - if m != nil { - return m.ContainerId - } - return nil -} - -func (m *Launch) GetTaskInfo() *TaskInfo { - if m != nil { - return m.TaskInfo - } - return nil -} - -func (m *Launch) GetExecutorInfo() *ExecutorInfo { - if m != nil { - return m.ExecutorInfo - } - return nil -} - -func (m *Launch) GetDirectory() string { - if m != nil && m.Directory != nil { - return *m.Directory - } - return "" -} - -func (m *Launch) GetUser() string { - if m != nil && m.User != nil { - return *m.User - } - return "" -} - -func (m *Launch) GetSlaveId() *SlaveID { - if m != nil { - return m.SlaveId - } - return nil -} - -func (m *Launch) GetSlavePid() string { - if m != nil && m.SlavePid != nil { - return *m.SlavePid - } - return "" -} - -func (m *Launch) GetCheckpoint() bool { - if m != nil && m.Checkpoint != nil { - return *m.Checkpoint - } - return false -} - -// * -// Encodes the update command sent to the external containerizer -// program. -type Update struct { - ContainerId *ContainerID `protobuf:"bytes,1,req,name=container_id" json:"container_id,omitempty"` - Resources []*Resource `protobuf:"bytes,2,rep,name=resources" json:"resources,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Update) Reset() { *m = Update{} } -func (*Update) ProtoMessage() {} - -func (m *Update) GetContainerId() *ContainerID { - if m != nil { - return m.ContainerId - } - return nil -} - -func (m *Update) GetResources() []*Resource { - if m != nil { - return m.Resources - } - return nil -} - -// * -// Encodes the wait command sent to the external containerizer -// program. -type Wait struct { - ContainerId *ContainerID `protobuf:"bytes,1,req,name=container_id" json:"container_id,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Wait) Reset() { *m = Wait{} } -func (*Wait) ProtoMessage() {} - -func (m *Wait) GetContainerId() *ContainerID { - if m != nil { - return m.ContainerId - } - return nil -} - -// * -// Encodes the destroy command sent to the external containerizer -// program. -type Destroy struct { - ContainerId *ContainerID `protobuf:"bytes,1,req,name=container_id" json:"container_id,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Destroy) Reset() { *m = Destroy{} } -func (*Destroy) ProtoMessage() {} - -func (m *Destroy) GetContainerId() *ContainerID { - if m != nil { - return m.ContainerId - } - return nil -} - -// * -// Encodes the usage command sent to the external containerizer -// program. -type Usage struct { - ContainerId *ContainerID `protobuf:"bytes,1,req,name=container_id" json:"container_id,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Usage) Reset() { *m = Usage{} } -func (*Usage) ProtoMessage() {} - -func (m *Usage) GetContainerId() *ContainerID { - if m != nil { - return m.ContainerId - } - return nil -} - -// * -// 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:"-"` -} - -func (m *Termination) Reset() { *m = Termination{} } -func (*Termination) ProtoMessage() {} - -func (m *Termination) GetKilled() bool { - if m != nil && m.Killed != nil { - return *m.Killed - } - return false -} - -func (m *Termination) GetMessage() string { - if m != nil && m.Message != nil { - return *m.Message - } - 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. -type Containers struct { - Containers []*ContainerID `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Containers) Reset() { *m = Containers{} } -func (*Containers) ProtoMessage() {} - -func (m *Containers) GetContainers() []*ContainerID { - if m != nil { - return m.Containers - } - return nil -} - -func (this *Launch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Launch) - if !ok { - return fmt.Errorf("that is not of type *Launch") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Launch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Launchbut is not nil && this == nil") - } - if !this.ContainerId.Equal(that1.ContainerId) { - return fmt.Errorf("ContainerId this(%v) Not Equal that(%v)", this.ContainerId, that1.ContainerId) - } - if !this.TaskInfo.Equal(that1.TaskInfo) { - return fmt.Errorf("TaskInfo this(%v) Not Equal that(%v)", this.TaskInfo, that1.TaskInfo) - } - if !this.ExecutorInfo.Equal(that1.ExecutorInfo) { - return fmt.Errorf("ExecutorInfo this(%v) Not Equal that(%v)", this.ExecutorInfo, that1.ExecutorInfo) - } - if this.Directory != nil && that1.Directory != nil { - if *this.Directory != *that1.Directory { - return fmt.Errorf("Directory this(%v) Not Equal that(%v)", *this.Directory, *that1.Directory) - } - } else if this.Directory != nil { - return fmt.Errorf("this.Directory == nil && that.Directory != nil") - } else if that1.Directory != nil { - return fmt.Errorf("Directory this(%v) Not Equal that(%v)", this.Directory, that1.Directory) - } - if this.User != nil && that1.User != nil { - if *this.User != *that1.User { - return fmt.Errorf("User this(%v) Not Equal that(%v)", *this.User, *that1.User) - } - } else if this.User != nil { - return fmt.Errorf("this.User == nil && that.User != nil") - } else if that1.User != nil { - return fmt.Errorf("User this(%v) Not Equal that(%v)", this.User, that1.User) - } - if !this.SlaveId.Equal(that1.SlaveId) { - return fmt.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) - } - if this.SlavePid != nil && that1.SlavePid != nil { - if *this.SlavePid != *that1.SlavePid { - return fmt.Errorf("SlavePid this(%v) Not Equal that(%v)", *this.SlavePid, *that1.SlavePid) - } - } else if this.SlavePid != nil { - return fmt.Errorf("this.SlavePid == nil && that.SlavePid != nil") - } else if that1.SlavePid != nil { - return fmt.Errorf("SlavePid this(%v) Not Equal that(%v)", this.SlavePid, that1.SlavePid) - } - if this.Checkpoint != nil && that1.Checkpoint != nil { - if *this.Checkpoint != *that1.Checkpoint { - return fmt.Errorf("Checkpoint this(%v) Not Equal that(%v)", *this.Checkpoint, *that1.Checkpoint) - } - } else if this.Checkpoint != nil { - return fmt.Errorf("this.Checkpoint == nil && that.Checkpoint != nil") - } else if that1.Checkpoint != nil { - return fmt.Errorf("Checkpoint this(%v) Not Equal that(%v)", this.Checkpoint, that1.Checkpoint) - } - 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 *Launch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Launch) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.ContainerId.Equal(that1.ContainerId) { - return false - } - if !this.TaskInfo.Equal(that1.TaskInfo) { - return false - } - if !this.ExecutorInfo.Equal(that1.ExecutorInfo) { - return false - } - if this.Directory != nil && that1.Directory != nil { - if *this.Directory != *that1.Directory { - return false - } - } else if this.Directory != nil { - return false - } else if that1.Directory != nil { - return false - } - if this.User != nil && that1.User != nil { - if *this.User != *that1.User { - return false - } - } else if this.User != nil { - return false - } else if that1.User != nil { - return false - } - if !this.SlaveId.Equal(that1.SlaveId) { - return false - } - if this.SlavePid != nil && that1.SlavePid != nil { - if *this.SlavePid != *that1.SlavePid { - return false - } - } else if this.SlavePid != nil { - return false - } else if that1.SlavePid != nil { - return false - } - if this.Checkpoint != nil && that1.Checkpoint != nil { - if *this.Checkpoint != *that1.Checkpoint { - return false - } - } else if this.Checkpoint != nil { - return false - } else if that1.Checkpoint != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Update) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Update) - if !ok { - return fmt.Errorf("that is not of type *Update") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Update but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Updatebut is not nil && this == nil") - } - if !this.ContainerId.Equal(that1.ContainerId) { - return fmt.Errorf("ContainerId this(%v) Not Equal that(%v)", this.ContainerId, that1.ContainerId) - } - 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 *Update) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Update) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.ContainerId.Equal(that1.ContainerId) { - 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 *Wait) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wait) - if !ok { - return fmt.Errorf("that is not of type *Wait") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wait but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Waitbut is not nil && this == nil") - } - 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) - } - return nil -} -func (this *Wait) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wait) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.ContainerId.Equal(that1.ContainerId) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Destroy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Destroy) - if !ok { - return fmt.Errorf("that is not of type *Destroy") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Destroy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Destroybut is not nil && this == nil") - } - 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) - } - return nil -} -func (this *Destroy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Destroy) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.ContainerId.Equal(that1.ContainerId) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Usage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Usage) - if !ok { - return fmt.Errorf("that is not of type *Usage") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Usage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Usagebut is not nil && this == nil") - } - 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) - } - return nil -} -func (this *Usage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Usage) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.ContainerId.Equal(that1.ContainerId) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Termination) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Termination) - if !ok { - return fmt.Errorf("that is not of type *Termination") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Termination but is nil && this != nil") - } 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) - } - } 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 { - return fmt.Errorf("Message this(%v) Not Equal that(%v)", *this.Message, *that1.Message) - } - } else if this.Message != nil { - return fmt.Errorf("this.Message == nil && that.Message != nil") - } 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) - } - return nil -} -func (this *Termination) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Termination) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Killed != nil && that1.Killed != nil { - if *this.Killed != *that1.Killed { - return false - } - } else if this.Killed != nil { - return false - } else if that1.Killed != nil { - return false - } - if this.Message != nil && that1.Message != nil { - if *this.Message != *that1.Message { - return false - } - } else if this.Message != nil { - return false - } else if that1.Message != 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Containers) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Containers) - if !ok { - return fmt.Errorf("that is not of type *Containers") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Containers but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Containersbut is not nil && this == nil") - } - if len(this.Containers) != len(that1.Containers) { - return fmt.Errorf("Containers this(%v) Not Equal that(%v)", len(this.Containers), len(that1.Containers)) - } - for i := range this.Containers { - if !this.Containers[i].Equal(that1.Containers[i]) { - return fmt.Errorf("Containers this[%v](%v) Not Equal that[%v](%v)", i, this.Containers[i], i, that1.Containers[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 *Containers) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Containers) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Containers) != len(that1.Containers) { - return false - } - for i := range this.Containers { - if !this.Containers[i].Equal(that1.Containers[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Launch) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 12) - s = append(s, "&mesosproto.Launch{") - if this.ContainerId != nil { - s = append(s, "ContainerId: "+fmt.Sprintf("%#v", this.ContainerId)+",\n") - } - if this.TaskInfo != nil { - s = append(s, "TaskInfo: "+fmt.Sprintf("%#v", this.TaskInfo)+",\n") - } - if this.ExecutorInfo != nil { - s = append(s, "ExecutorInfo: "+fmt.Sprintf("%#v", this.ExecutorInfo)+",\n") - } - if this.Directory != nil { - s = append(s, "Directory: "+valueToGoStringContainerizer(this.Directory, "string")+",\n") - } - if this.User != nil { - s = append(s, "User: "+valueToGoStringContainerizer(this.User, "string")+",\n") - } - if this.SlaveId != nil { - s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") - } - if this.SlavePid != nil { - s = append(s, "SlavePid: "+valueToGoStringContainerizer(this.SlavePid, "string")+",\n") - } - if this.Checkpoint != nil { - s = append(s, "Checkpoint: "+valueToGoStringContainerizer(this.Checkpoint, "bool")+",\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 *Update) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&mesosproto.Update{") - if this.ContainerId != nil { - s = append(s, "ContainerId: "+fmt.Sprintf("%#v", this.ContainerId)+",\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 *Wait) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Wait{") - 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") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Destroy) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Destroy{") - 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") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Usage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Usage{") - 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") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Termination) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&mesosproto.Termination{") - if this.Killed != nil { - s = append(s, "Killed: "+valueToGoStringContainerizer(this.Killed, "bool")+",\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") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Containers) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Containers{") - if this.Containers != nil { - s = append(s, "Containers: "+fmt.Sprintf("%#v", this.Containers)+",\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 valueToGoStringContainerizer(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 extensionToGoStringContainerizer(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 *Launch) 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 *Launch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ContainerId == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") - } else { - data[i] = 0xa - i++ - i = encodeVarintContainerizer(data, i, uint64(m.ContainerId.Size())) - n1, err := m.ContainerId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.TaskInfo != nil { - data[i] = 0x12 - i++ - i = encodeVarintContainerizer(data, i, uint64(m.TaskInfo.Size())) - n2, err := m.TaskInfo.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.ExecutorInfo != nil { - data[i] = 0x1a - i++ - i = encodeVarintContainerizer(data, i, uint64(m.ExecutorInfo.Size())) - n3, err := m.ExecutorInfo.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Directory != nil { - data[i] = 0x22 - i++ - i = encodeVarintContainerizer(data, i, uint64(len(*m.Directory))) - i += copy(data[i:], *m.Directory) - } - if m.User != nil { - data[i] = 0x2a - i++ - i = encodeVarintContainerizer(data, i, uint64(len(*m.User))) - i += copy(data[i:], *m.User) - } - if m.SlaveId != nil { - data[i] = 0x32 - i++ - i = encodeVarintContainerizer(data, i, uint64(m.SlaveId.Size())) - n4, err := m.SlaveId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.SlavePid != nil { - data[i] = 0x3a - i++ - i = encodeVarintContainerizer(data, i, uint64(len(*m.SlavePid))) - i += copy(data[i:], *m.SlavePid) - } - if m.Checkpoint != nil { - data[i] = 0x40 - i++ - if *m.Checkpoint { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Update) 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 *Update) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ContainerId == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") - } else { - data[i] = 0xa - i++ - i = encodeVarintContainerizer(data, i, uint64(m.ContainerId.Size())) - n5, err := m.ContainerId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if len(m.Resources) > 0 { - for _, msg := range m.Resources { - data[i] = 0x12 - i++ - i = encodeVarintContainerizer(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 *Wait) 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 *Wait) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ContainerId == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") - } else { - data[i] = 0xa - i++ - i = encodeVarintContainerizer(data, i, uint64(m.ContainerId.Size())) - n6, err := m.ContainerId.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 *Destroy) 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 *Destroy) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ContainerId == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") - } else { - data[i] = 0xa - i++ - i = encodeVarintContainerizer(data, i, uint64(m.ContainerId.Size())) - n7, err := m.ContainerId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Usage) 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 *Usage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ContainerId == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") - } else { - data[i] = 0xa - i++ - i = encodeVarintContainerizer(data, i, uint64(m.ContainerId.Size())) - n8, err := m.ContainerId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Termination) 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 *Termination) MarshalTo(data []byte) (int, error) { - var i int - _ = 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 { - data[i] = 0x12 - i++ - i = encodeVarintContainerizer(data, i, uint64(len(*m.Message))) - i += copy(data[i:], *m.Message) - } - if m.Status != nil { - data[i] = 0x18 - i++ - i = encodeVarintContainerizer(data, i, uint64(*m.Status)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Containers) 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 *Containers) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Containers) > 0 { - for _, msg := range m.Containers { - data[i] = 0xa - i++ - i = encodeVarintContainerizer(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 encodeFixed64Containerizer(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 encodeFixed32Containerizer(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 encodeVarintContainerizer(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 NewPopulatedLaunch(r randyContainerizer, easy bool) *Launch { - this := &Launch{} - this.ContainerId = NewPopulatedContainerID(r, easy) - if r.Intn(10) != 0 { - this.TaskInfo = NewPopulatedTaskInfo(r, easy) - } - if r.Intn(10) != 0 { - this.ExecutorInfo = NewPopulatedExecutorInfo(r, easy) - } - if r.Intn(10) != 0 { - v1 := randStringContainerizer(r) - this.Directory = &v1 - } - if r.Intn(10) != 0 { - v2 := randStringContainerizer(r) - this.User = &v2 - } - if r.Intn(10) != 0 { - this.SlaveId = NewPopulatedSlaveID(r, easy) - } - if r.Intn(10) != 0 { - v3 := randStringContainerizer(r) - this.SlavePid = &v3 - } - if r.Intn(10) != 0 { - v4 := bool(bool(r.Intn(2) == 0)) - this.Checkpoint = &v4 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedContainerizer(r, 9) - } - return this -} - -func NewPopulatedUpdate(r randyContainerizer, easy bool) *Update { - this := &Update{} - this.ContainerId = NewPopulatedContainerID(r, easy) - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.Resources = make([]*Resource, v5) - for i := 0; i < v5; i++ { - this.Resources[i] = NewPopulatedResource(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedContainerizer(r, 3) - } - return this -} - -func NewPopulatedWait(r randyContainerizer, easy bool) *Wait { - this := &Wait{} - this.ContainerId = NewPopulatedContainerID(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedContainerizer(r, 2) - } - return this -} - -func NewPopulatedDestroy(r randyContainerizer, easy bool) *Destroy { - this := &Destroy{} - this.ContainerId = NewPopulatedContainerID(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedContainerizer(r, 2) - } - return this -} - -func NewPopulatedUsage(r randyContainerizer, easy bool) *Usage { - this := &Usage{} - this.ContainerId = NewPopulatedContainerID(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedContainerizer(r, 2) - } - return this -} - -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()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Status = &v8 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedContainerizer(r, 4) - } - return this -} - -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++ { - this.Containers[i] = NewPopulatedContainerID(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedContainerizer(r, 2) - } - return this -} - -type randyContainerizer interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneContainerizer(r randyContainerizer) 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 randStringContainerizer(r randyContainerizer) string { - v10 := r.Intn(100) - tmps := make([]rune, v10) - for i := 0; i < v10; i++ { - tmps[i] = randUTF8RuneContainerizer(r) - } - return string(tmps) -} -func randUnrecognizedContainerizer(r randyContainerizer, 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 = randFieldContainerizer(data, r, fieldNumber, wire) - } - return data -} -func randFieldContainerizer(data []byte, r randyContainerizer, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateContainerizer(data, uint64(key)) - v11 := r.Int63() - if r.Intn(2) == 0 { - v11 *= -1 - } - data = encodeVarintPopulateContainerizer(data, uint64(v11)) - 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))) - case 2: - data = encodeVarintPopulateContainerizer(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateContainerizer(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateContainerizer(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 encodeVarintPopulateContainerizer(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 *Launch) Size() (n int) { - var l int - _ = l - if m.ContainerId != nil { - l = m.ContainerId.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.TaskInfo != nil { - l = m.TaskInfo.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.ExecutorInfo != nil { - l = m.ExecutorInfo.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.Directory != nil { - l = len(*m.Directory) - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.User != nil { - l = len(*m.User) - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.SlaveId != nil { - l = m.SlaveId.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.SlavePid != nil { - l = len(*m.SlavePid) - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.Checkpoint != nil { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Update) Size() (n int) { - var l int - _ = l - if m.ContainerId != nil { - l = m.ContainerId.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wait) Size() (n int) { - var l int - _ = l - if m.ContainerId != nil { - l = m.ContainerId.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Destroy) Size() (n int) { - var l int - _ = l - if m.ContainerId != nil { - l = m.ContainerId.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Usage) Size() (n int) { - var l int - _ = l - if m.ContainerId != nil { - l = m.ContainerId.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -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)) - } - if m.Status != nil { - n += 1 + sovContainerizer(uint64(*m.Status)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Containers) Size() (n int) { - var l int - _ = l - if len(m.Containers) > 0 { - for _, e := range m.Containers { - l = e.Size() - n += 1 + l + sovContainerizer(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovContainerizer(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozContainerizer(x uint64) (n int) { - return sovContainerizer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Launch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Launch{`, - `ContainerId:` + strings.Replace(fmt.Sprintf("%v", this.ContainerId), "ContainerID", "ContainerID", 1) + `,`, - `TaskInfo:` + strings.Replace(fmt.Sprintf("%v", this.TaskInfo), "TaskInfo", "TaskInfo", 1) + `,`, - `ExecutorInfo:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorInfo), "ExecutorInfo", "ExecutorInfo", 1) + `,`, - `Directory:` + valueToStringContainerizer(this.Directory) + `,`, - `User:` + valueToStringContainerizer(this.User) + `,`, - `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `SlavePid:` + valueToStringContainerizer(this.SlavePid) + `,`, - `Checkpoint:` + valueToStringContainerizer(this.Checkpoint) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Update) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Update{`, - `ContainerId:` + strings.Replace(fmt.Sprintf("%v", this.ContainerId), "ContainerID", "ContainerID", 1) + `,`, - `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wait) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wait{`, - `ContainerId:` + strings.Replace(fmt.Sprintf("%v", this.ContainerId), "ContainerID", "ContainerID", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Destroy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Destroy{`, - `ContainerId:` + strings.Replace(fmt.Sprintf("%v", this.ContainerId), "ContainerID", "ContainerID", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Usage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Usage{`, - `ContainerId:` + strings.Replace(fmt.Sprintf("%v", this.ContainerId), "ContainerID", "ContainerID", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Termination) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Termination{`, - `Killed:` + valueToStringContainerizer(this.Killed) + `,`, - `Message:` + valueToStringContainerizer(this.Message) + `,`, - `Status:` + valueToStringContainerizer(this.Status) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Containers) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Containers{`, - `Containers:` + strings.Replace(fmt.Sprintf("%v", this.Containers), "ContainerID", "ContainerID", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringContainerizer(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Launch) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", 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 ErrInvalidLengthContainerizer - } - 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(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TaskInfo", 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 ErrInvalidLengthContainerizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TaskInfo == nil { - m.TaskInfo = &TaskInfo{} - } - if err := m.TaskInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutorInfo", 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 ErrInvalidLengthContainerizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutorInfo == nil { - m.ExecutorInfo = &ExecutorInfo{} - } - if err := m.ExecutorInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Directory", 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 ErrInvalidLengthContainerizer - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Directory = &s - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", 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 ErrInvalidLengthContainerizer - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.User = &s - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", 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 ErrInvalidLengthContainerizer - } - 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 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlavePid", 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 ErrInvalidLengthContainerizer - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.SlavePid = &s - iNdEx = postIndex - case 8: - 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 - } - } - b := bool(v != 0) - m.Checkpoint = &b - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipContainerizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthContainerizer - } - 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_id") - } - - return nil -} -func (m *Update) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", 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 ErrInvalidLengthContainerizer - } - 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(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", 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 ErrInvalidLengthContainerizer - } - 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: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipContainerizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthContainerizer - } - 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_id") - } - - return nil -} -func (m *Wait) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", 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 ErrInvalidLengthContainerizer - } - 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(0x00000001) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipContainerizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthContainerizer - } - 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_id") - } - - return nil -} -func (m *Destroy) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", 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 ErrInvalidLengthContainerizer - } - 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(0x00000001) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipContainerizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthContainerizer - } - 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_id") - } - - return nil -} -func (m *Usage) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", 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 ErrInvalidLengthContainerizer - } - 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(0x00000001) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipContainerizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthContainerizer - } - 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_id") - } - - return nil -} -func (m *Termination) 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: - 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 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 ErrInvalidLengthContainerizer - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - 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 iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Status = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipContainerizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthContainerizer - } - 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("killed") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") - } - - return nil -} -func (m *Containers) 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 - } - 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 Containers", 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 ErrInvalidLengthContainerizer - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Containers = append(m.Containers, &ContainerID{}) - if err := m.Containers[len(m.Containers)-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 - skippy, err := skipContainerizer(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthContainerizer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - return nil -} -func skipContainerizer(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - 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 { - 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 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, ErrInvalidLengthContainerizer - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - 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 := skipContainerizer(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 ( - ErrInvalidLengthContainerizer = fmt.Errorf("proto: negative length found during unmarshaling") -) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.proto deleted file mode 100644 index 8b3dc721e44..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.proto +++ /dev/null @@ -1,112 +0,0 @@ -/** - * 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; - -/** - * Encodes the launch command sent to the external containerizer - * program. - */ -message Launch { - required ContainerID container_id = 1; - optional TaskInfo task_info = 2; - optional ExecutorInfo executor_info = 3; - optional string directory = 4; - optional string user = 5; - optional SlaveID slave_id = 6; - optional string slave_pid = 7; - optional bool checkpoint = 8; -} - - -/** - * Encodes the update command sent to the external containerizer - * program. - */ -message Update { - required ContainerID container_id = 1; - repeated Resource resources = 2; -} - - -/** - * Encodes the wait command sent to the external containerizer - * program. - */ -message Wait { - required ContainerID container_id = 1; -} - - -/** - * Encodes the destroy command sent to the external containerizer - * program. - */ -message Destroy { - required ContainerID container_id = 1; -} - - -/** - * Encodes the usage command sent to the external containerizer - * program. - */ -message Usage { - required ContainerID container_id = 1; -} - - -/** - * Information about a container termination, returned by the - * 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; -} - - -/** - * Information on all active containers returned by the containerizer - * to the slave. - */ -message Containers { - repeated ContainerID containers = 1; -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.pb.go deleted file mode 100644 index 2b62f81d64a..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.pb.go +++ /dev/null @@ -1,5146 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: log.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 - -type Action_Type int32 - -const ( - Action_NOP Action_Type = 1 - Action_APPEND Action_Type = 2 - Action_TRUNCATE Action_Type = 3 -) - -var Action_Type_name = map[int32]string{ - 1: "NOP", - 2: "APPEND", - 3: "TRUNCATE", -} -var Action_Type_value = map[string]int32{ - "NOP": 1, - "APPEND": 2, - "TRUNCATE": 3, -} - -func (x Action_Type) Enum() *Action_Type { - p := new(Action_Type) - *p = x - return p -} -func (x Action_Type) String() string { - return proto.EnumName(Action_Type_name, int32(x)) -} -func (x *Action_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Action_Type_value, data, "Action_Type") - if err != nil { - return err - } - *x = Action_Type(value) - return nil -} - -type Metadata_Status int32 - -const ( - Metadata_VOTING Metadata_Status = 1 - Metadata_RECOVERING Metadata_Status = 2 - Metadata_STARTING Metadata_Status = 3 - Metadata_EMPTY Metadata_Status = 4 -) - -var Metadata_Status_name = map[int32]string{ - 1: "VOTING", - 2: "RECOVERING", - 3: "STARTING", - 4: "EMPTY", -} -var Metadata_Status_value = map[string]int32{ - "VOTING": 1, - "RECOVERING": 2, - "STARTING": 3, - "EMPTY": 4, -} - -func (x Metadata_Status) Enum() *Metadata_Status { - p := new(Metadata_Status) - *p = x - return p -} -func (x Metadata_Status) String() string { - return proto.EnumName(Metadata_Status_name, int32(x)) -} -func (x *Metadata_Status) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Metadata_Status_value, data, "Metadata_Status") - if err != nil { - return err - } - *x = Metadata_Status(value) - return nil -} - -type Record_Type int32 - -const ( - Record_PROMISE Record_Type = 1 - Record_ACTION Record_Type = 2 - Record_METADATA Record_Type = 3 -) - -var Record_Type_name = map[int32]string{ - 1: "PROMISE", - 2: "ACTION", - 3: "METADATA", -} -var Record_Type_value = map[string]int32{ - "PROMISE": 1, - "ACTION": 2, - "METADATA": 3, -} - -func (x Record_Type) Enum() *Record_Type { - p := new(Record_Type) - *p = x - return p -} -func (x Record_Type) String() string { - return proto.EnumName(Record_Type_name, int32(x)) -} -func (x *Record_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Record_Type_value, data, "Record_Type") - if err != nil { - return err - } - *x = Record_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 -// proposer), until a new promise is made to a proposer with a higher -// proposal number. Each replica writes every promise it makes as a -// log record so that it can recover this information after a failure. -// TODO(benh): Does the promise actually need to be written to stable -// storage? Can we get away with looking at the last written action -// and using it's promised value? In this case, what happens if we -// make a promise but don't receive an action from that coordinator? -type Promise struct { - Proposal *uint64 `protobuf:"varint,1,req,name=proposal" json:"proposal,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Promise) Reset() { *m = Promise{} } -func (*Promise) ProtoMessage() {} - -func (m *Promise) GetProposal() uint64 { - if m != nil && m.Proposal != nil { - return *m.Proposal - } - return 0 -} - -// Represents an "action" performed on the log. Each action has an -// associated position in the log. In addition, each action (i.e., -// position) will have been "promised" to a specific proposer -// (implicitly or explicitly) and may have been "performed" from a -// specific proposer. An action may also be "learned" to have reached -// consensus. There are three types of possible actions that can be -// performed on the log: nop (no action), append, and truncate. -type Action struct { - Position *uint64 `protobuf:"varint,1,req,name=position" json:"position,omitempty"` - Promised *uint64 `protobuf:"varint,2,req,name=promised" json:"promised,omitempty"` - Performed *uint64 `protobuf:"varint,3,opt,name=performed" json:"performed,omitempty"` - Learned *bool `protobuf:"varint,4,opt,name=learned" json:"learned,omitempty"` - Type *Action_Type `protobuf:"varint,5,opt,name=type,enum=mesosproto.Action_Type" json:"type,omitempty"` - Nop *Action_Nop `protobuf:"bytes,6,opt,name=nop" json:"nop,omitempty"` - Append *Action_Append `protobuf:"bytes,7,opt,name=append" json:"append,omitempty"` - Truncate *Action_Truncate `protobuf:"bytes,8,opt,name=truncate" json:"truncate,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Action) Reset() { *m = Action{} } -func (*Action) ProtoMessage() {} - -func (m *Action) GetPosition() uint64 { - if m != nil && m.Position != nil { - return *m.Position - } - return 0 -} - -func (m *Action) GetPromised() uint64 { - if m != nil && m.Promised != nil { - return *m.Promised - } - return 0 -} - -func (m *Action) GetPerformed() uint64 { - if m != nil && m.Performed != nil { - return *m.Performed - } - return 0 -} - -func (m *Action) GetLearned() bool { - if m != nil && m.Learned != nil { - return *m.Learned - } - return false -} - -func (m *Action) GetType() Action_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return Action_NOP -} - -func (m *Action) GetNop() *Action_Nop { - if m != nil { - return m.Nop - } - return nil -} - -func (m *Action) GetAppend() *Action_Append { - if m != nil { - return m.Append - } - return nil -} - -func (m *Action) GetTruncate() *Action_Truncate { - if m != nil { - return m.Truncate - } - return nil -} - -type Action_Nop struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Action_Nop) Reset() { *m = Action_Nop{} } -func (*Action_Nop) ProtoMessage() {} - -type Action_Append struct { - Bytes []byte `protobuf:"bytes,1,req,name=bytes" json:"bytes,omitempty"` - Cksum []byte `protobuf:"bytes,2,opt,name=cksum" json:"cksum,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Action_Append) Reset() { *m = Action_Append{} } -func (*Action_Append) ProtoMessage() {} - -func (m *Action_Append) GetBytes() []byte { - if m != nil { - return m.Bytes - } - return nil -} - -func (m *Action_Append) GetCksum() []byte { - if m != nil { - return m.Cksum - } - return nil -} - -type Action_Truncate struct { - To *uint64 `protobuf:"varint,1,req,name=to" json:"to,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Action_Truncate) Reset() { *m = Action_Truncate{} } -func (*Action_Truncate) ProtoMessage() {} - -func (m *Action_Truncate) GetTo() uint64 { - if m != nil && m.To != nil { - return *m.To - } - return 0 -} - -// The metadata of a replica. It has to be persisted on the disk. We -// store the current status of the replica as well as the implicit -// promise that a replica has made. This message is intended to -// replace the old Promise message to support catch-up. -type Metadata struct { - Status *Metadata_Status `protobuf:"varint,1,req,name=status,enum=mesosproto.Metadata_Status,def=4" json:"status,omitempty"` - Promised *uint64 `protobuf:"varint,2,req,name=promised,def=0" json:"promised,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (*Metadata) ProtoMessage() {} - -const Default_Metadata_Status Metadata_Status = Metadata_EMPTY -const Default_Metadata_Promised uint64 = 0 - -func (m *Metadata) GetStatus() Metadata_Status { - if m != nil && m.Status != nil { - return *m.Status - } - return Default_Metadata_Status -} - -func (m *Metadata) GetPromised() uint64 { - if m != nil && m.Promised != nil { - return *m.Promised - } - return Default_Metadata_Promised -} - -// Represents a log record written to the local filesystem by a -// replica. A log record may store a promise (DEPRECATED), an action -// or metadata (defined above). -type Record struct { - Type *Record_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Record_Type" json:"type,omitempty"` - Promise *Promise `protobuf:"bytes,2,opt,name=promise" json:"promise,omitempty"` - Action *Action `protobuf:"bytes,3,opt,name=action" json:"action,omitempty"` - Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata" json:"metadata,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Record) Reset() { *m = Record{} } -func (*Record) ProtoMessage() {} - -func (m *Record) GetType() Record_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return Record_PROMISE -} - -func (m *Record) GetPromise() *Promise { - if m != nil { - return m.Promise - } - return nil -} - -func (m *Record) GetAction() *Action { - if m != nil { - return m.Action - } - return nil -} - -func (m *Record) GetMetadata() *Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -// Represents a "promise" request from a proposer with the specified -// 'proposal' to a replica. If the proposer is a coordinator, most -// such requests will occur after a coordinator has failed and a new -// coordinator is elected. In such a case, the position that the -// coordinator is asking the replica to promise is implicitly *all* -// positions that the replica has made no promises (thus the position -// field is not be used). In other instances, however, a proposer -// might be explicitly trying to request that a replica promise a -// specific position in the log (such as when trying to fill holes -// discovered during a client read), and then the 'position' field -// will be present. -type PromiseRequest struct { - Proposal *uint64 `protobuf:"varint,1,req,name=proposal" json:"proposal,omitempty"` - Position *uint64 `protobuf:"varint,2,opt,name=position" json:"position,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PromiseRequest) Reset() { *m = PromiseRequest{} } -func (*PromiseRequest) ProtoMessage() {} - -func (m *PromiseRequest) GetProposal() uint64 { - if m != nil && m.Proposal != nil { - return *m.Proposal - } - return 0 -} - -func (m *PromiseRequest) GetPosition() uint64 { - if m != nil && m.Position != nil { - return *m.Position - } - 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. -// 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). -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:"-"` -} - -func (m *PromiseResponse) Reset() { *m = PromiseResponse{} } -func (*PromiseResponse) ProtoMessage() {} - -func (m *PromiseResponse) GetOkay() bool { - if m != nil && m.Okay != nil { - return *m.Okay - } - return false -} - -func (m *PromiseResponse) GetProposal() uint64 { - if m != nil && m.Proposal != nil { - return *m.Proposal - } - return 0 -} - -func (m *PromiseResponse) GetPosition() uint64 { - if m != nil && m.Position != nil { - return *m.Position - } - return 0 -} - -func (m *PromiseResponse) GetAction() *Action { - if m != nil { - return m.Action - } - return nil -} - -// Represents a write request for a specific type of action. Note that -// we deliberately do not include the entire Action as it contains -// fields that are not relevant to a write request (e.g., promised, -// performed) and rather than ignore them we exclude them for safety. -type WriteRequest struct { - Proposal *uint64 `protobuf:"varint,1,req,name=proposal" json:"proposal,omitempty"` - Position *uint64 `protobuf:"varint,2,req,name=position" json:"position,omitempty"` - Learned *bool `protobuf:"varint,3,opt,name=learned" json:"learned,omitempty"` - Type *Action_Type `protobuf:"varint,4,req,name=type,enum=mesosproto.Action_Type" json:"type,omitempty"` - Nop *Action_Nop `protobuf:"bytes,5,opt,name=nop" json:"nop,omitempty"` - Append *Action_Append `protobuf:"bytes,6,opt,name=append" json:"append,omitempty"` - Truncate *Action_Truncate `protobuf:"bytes,7,opt,name=truncate" json:"truncate,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *WriteRequest) Reset() { *m = WriteRequest{} } -func (*WriteRequest) ProtoMessage() {} - -func (m *WriteRequest) GetProposal() uint64 { - if m != nil && m.Proposal != nil { - return *m.Proposal - } - return 0 -} - -func (m *WriteRequest) GetPosition() uint64 { - if m != nil && m.Position != nil { - return *m.Position - } - return 0 -} - -func (m *WriteRequest) GetLearned() bool { - if m != nil && m.Learned != nil { - return *m.Learned - } - return false -} - -func (m *WriteRequest) GetType() Action_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return Action_NOP -} - -func (m *WriteRequest) GetNop() *Action_Nop { - if m != nil { - return m.Nop - } - return nil -} - -func (m *WriteRequest) GetAppend() *Action_Append { - if m != nil { - return m.Append - } - return nil -} - -func (m *WriteRequest) GetTruncate() *Action_Truncate { - if m != nil { - return m.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 -// 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. -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:"-"` -} - -func (m *WriteResponse) Reset() { *m = WriteResponse{} } -func (*WriteResponse) ProtoMessage() {} - -func (m *WriteResponse) GetOkay() bool { - if m != nil && m.Okay != nil { - return *m.Okay - } - return false -} - -func (m *WriteResponse) GetProposal() uint64 { - if m != nil && m.Proposal != nil { - return *m.Proposal - } - return 0 -} - -func (m *WriteResponse) GetPosition() uint64 { - if m != nil && m.Position != nil { - return *m.Position - } - return 0 -} - -// Represents a "learned" event, that is, when a particular action has -// been agreed upon (reached consensus). -type LearnedMessage struct { - Action *Action `protobuf:"bytes,1,req,name=action" json:"action,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *LearnedMessage) Reset() { *m = LearnedMessage{} } -func (*LearnedMessage) ProtoMessage() {} - -func (m *LearnedMessage) GetAction() *Action { - if m != nil { - return m.Action - } - return nil -} - -// Represents a recover request. A recover request is used to initiate -// the recovery (by broadcasting it). -type RecoverRequest struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *RecoverRequest) Reset() { *m = RecoverRequest{} } -func (*RecoverRequest) ProtoMessage() {} - -// When a replica receives a RecoverRequest, it will reply with its -// current status, and the begin and the end of its current log. -type RecoverResponse struct { - Status *Metadata_Status `protobuf:"varint,1,req,name=status,enum=mesosproto.Metadata_Status" json:"status,omitempty"` - Begin *uint64 `protobuf:"varint,2,opt,name=begin" json:"begin,omitempty"` - End *uint64 `protobuf:"varint,3,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RecoverResponse) Reset() { *m = RecoverResponse{} } -func (*RecoverResponse) ProtoMessage() {} - -func (m *RecoverResponse) GetStatus() Metadata_Status { - if m != nil && m.Status != nil { - return *m.Status - } - return Metadata_VOTING -} - -func (m *RecoverResponse) GetBegin() uint64 { - if m != nil && m.Begin != nil { - return *m.Begin - } - return 0 -} - -func (m *RecoverResponse) GetEnd() uint64 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -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) -} -func (this *Promise) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Promise) - if !ok { - return fmt.Errorf("that is not of type *Promise") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Promise but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Promisebut is not nil && this == nil") - } - 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) - } - } else if this.Proposal != nil { - return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) - } - 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 *Promise) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Promise) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false - } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Action) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Action) - if !ok { - return fmt.Errorf("that is not of type *Action") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Action but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Actionbut is not nil && this == nil") - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) - } - if this.Promised != nil && that1.Promised != nil { - if *this.Promised != *that1.Promised { - return fmt.Errorf("Promised this(%v) Not Equal that(%v)", *this.Promised, *that1.Promised) - } - } else if this.Promised != nil { - return fmt.Errorf("this.Promised == nil && that.Promised != nil") - } else if that1.Promised != nil { - return fmt.Errorf("Promised this(%v) Not Equal that(%v)", this.Promised, that1.Promised) - } - if this.Performed != nil && that1.Performed != nil { - if *this.Performed != *that1.Performed { - return fmt.Errorf("Performed this(%v) Not Equal that(%v)", *this.Performed, *that1.Performed) - } - } else if this.Performed != nil { - return fmt.Errorf("this.Performed == nil && that.Performed != nil") - } else if that1.Performed != nil { - return fmt.Errorf("Performed this(%v) Not Equal that(%v)", this.Performed, that1.Performed) - } - if this.Learned != nil && that1.Learned != nil { - if *this.Learned != *that1.Learned { - return fmt.Errorf("Learned this(%v) Not Equal that(%v)", *this.Learned, *that1.Learned) - } - } else if this.Learned != nil { - return fmt.Errorf("this.Learned == nil && that.Learned != nil") - } else if that1.Learned != nil { - return fmt.Errorf("Learned this(%v) Not Equal that(%v)", this.Learned, that1.Learned) - } - 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.Nop.Equal(that1.Nop) { - return fmt.Errorf("Nop this(%v) Not Equal that(%v)", this.Nop, that1.Nop) - } - if !this.Append.Equal(that1.Append) { - return fmt.Errorf("Append this(%v) Not Equal that(%v)", this.Append, that1.Append) - } - if !this.Truncate.Equal(that1.Truncate) { - return fmt.Errorf("Truncate this(%v) Not Equal that(%v)", this.Truncate, that1.Truncate) - } - 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 *Action) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Action) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false - } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false - } - if this.Promised != nil && that1.Promised != nil { - if *this.Promised != *that1.Promised { - return false - } - } else if this.Promised != nil { - return false - } else if that1.Promised != nil { - return false - } - if this.Performed != nil && that1.Performed != nil { - if *this.Performed != *that1.Performed { - return false - } - } else if this.Performed != nil { - return false - } else if that1.Performed != nil { - return false - } - if this.Learned != nil && that1.Learned != nil { - if *this.Learned != *that1.Learned { - return false - } - } else if this.Learned != nil { - return false - } else if that1.Learned != 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.Nop.Equal(that1.Nop) { - return false - } - if !this.Append.Equal(that1.Append) { - return false - } - if !this.Truncate.Equal(that1.Truncate) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Action_Nop) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Action_Nop) - if !ok { - return fmt.Errorf("that is not of type *Action_Nop") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Action_Nop but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Action_Nopbut is not nil && this == nil") - } - 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 *Action_Nop) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Action_Nop) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Action_Append) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Action_Append) - if !ok { - return fmt.Errorf("that is not of type *Action_Append") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Action_Append but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Action_Appendbut is not nil && this == nil") - } - if !bytes.Equal(this.Bytes, that1.Bytes) { - return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) - } - if !bytes.Equal(this.Cksum, that1.Cksum) { - return fmt.Errorf("Cksum this(%v) Not Equal that(%v)", this.Cksum, that1.Cksum) - } - 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 *Action_Append) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Action_Append) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Bytes, that1.Bytes) { - return false - } - if !bytes.Equal(this.Cksum, that1.Cksum) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Action_Truncate) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Action_Truncate) - if !ok { - return fmt.Errorf("that is not of type *Action_Truncate") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Action_Truncate but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Action_Truncatebut is not nil && this == nil") - } - if this.To != nil && that1.To != nil { - if *this.To != *that1.To { - return fmt.Errorf("To this(%v) Not Equal that(%v)", *this.To, *that1.To) - } - } else if this.To != nil { - return fmt.Errorf("this.To == nil && that.To != nil") - } else if that1.To != nil { - return fmt.Errorf("To this(%v) Not Equal that(%v)", this.To, that1.To) - } - 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 *Action_Truncate) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Action_Truncate) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.To != nil && that1.To != nil { - if *this.To != *that1.To { - return false - } - } else if this.To != nil { - return false - } else if that1.To != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Metadata) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Metadata) - if !ok { - return fmt.Errorf("that is not of type *Metadata") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Metadata but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Metadatabut 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.Promised != nil && that1.Promised != nil { - if *this.Promised != *that1.Promised { - return fmt.Errorf("Promised this(%v) Not Equal that(%v)", *this.Promised, *that1.Promised) - } - } else if this.Promised != nil { - return fmt.Errorf("this.Promised == nil && that.Promised != nil") - } else if that1.Promised != nil { - return fmt.Errorf("Promised this(%v) Not Equal that(%v)", this.Promised, that1.Promised) - } - 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 *Metadata) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Metadata) - 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.Promised != nil && that1.Promised != nil { - if *this.Promised != *that1.Promised { - return false - } - } else if this.Promised != nil { - return false - } else if that1.Promised != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Record) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Record) - if !ok { - return fmt.Errorf("that is not of type *Record") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Record but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Recordbut is not nil && this == nil") - } - 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.Promise.Equal(that1.Promise) { - return fmt.Errorf("Promise this(%v) Not Equal that(%v)", this.Promise, that1.Promise) - } - if !this.Action.Equal(that1.Action) { - return fmt.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) - } - if !this.Metadata.Equal(that1.Metadata) { - return fmt.Errorf("Metadata this(%v) Not Equal that(%v)", this.Metadata, that1.Metadata) - } - 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 *Record) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Record) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == 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.Promise.Equal(that1.Promise) { - return false - } - if !this.Action.Equal(that1.Action) { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *PromiseRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PromiseRequest) - if !ok { - return fmt.Errorf("that is not of type *PromiseRequest") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PromiseRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PromiseRequestbut is not nil && this == nil") - } - 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) - } - } else if this.Proposal != nil { - return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) - } - 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 *PromiseRequest) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*PromiseRequest) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false - } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false - } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *PromiseResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PromiseResponse) - if !ok { - return fmt.Errorf("that is not of type *PromiseResponse") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PromiseResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PromiseResponsebut is not nil && this == nil") - } - if this.Okay != nil && that1.Okay != nil { - if *this.Okay != *that1.Okay { - return fmt.Errorf("Okay this(%v) Not Equal that(%v)", *this.Okay, *that1.Okay) - } - } else if this.Okay != nil { - return fmt.Errorf("this.Okay == nil && that.Okay != nil") - } else if that1.Okay != nil { - return fmt.Errorf("Okay this(%v) Not Equal that(%v)", this.Okay, that1.Okay) - } - 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) - } - } else if this.Proposal != nil { - return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) - } - if !this.Action.Equal(that1.Action) { - return fmt.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) - } - 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 *PromiseResponse) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*PromiseResponse) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Okay != nil && that1.Okay != nil { - if *this.Okay != *that1.Okay { - return false - } - } else if this.Okay != nil { - return false - } else if that1.Okay != nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false - } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false - } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false - } - if !this.Action.Equal(that1.Action) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *WriteRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*WriteRequest) - if !ok { - return fmt.Errorf("that is not of type *WriteRequest") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *WriteRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *WriteRequestbut is not nil && this == nil") - } - 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) - } - } else if this.Proposal != nil { - return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) - } - if this.Learned != nil && that1.Learned != nil { - if *this.Learned != *that1.Learned { - return fmt.Errorf("Learned this(%v) Not Equal that(%v)", *this.Learned, *that1.Learned) - } - } else if this.Learned != nil { - return fmt.Errorf("this.Learned == nil && that.Learned != nil") - } else if that1.Learned != nil { - return fmt.Errorf("Learned this(%v) Not Equal that(%v)", this.Learned, that1.Learned) - } - 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.Nop.Equal(that1.Nop) { - return fmt.Errorf("Nop this(%v) Not Equal that(%v)", this.Nop, that1.Nop) - } - if !this.Append.Equal(that1.Append) { - return fmt.Errorf("Append this(%v) Not Equal that(%v)", this.Append, that1.Append) - } - if !this.Truncate.Equal(that1.Truncate) { - return fmt.Errorf("Truncate this(%v) Not Equal that(%v)", this.Truncate, that1.Truncate) - } - 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 *WriteRequest) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*WriteRequest) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false - } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false - } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false - } - if this.Learned != nil && that1.Learned != nil { - if *this.Learned != *that1.Learned { - return false - } - } else if this.Learned != nil { - return false - } else if that1.Learned != 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.Nop.Equal(that1.Nop) { - return false - } - if !this.Append.Equal(that1.Append) { - return false - } - if !this.Truncate.Equal(that1.Truncate) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *WriteResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*WriteResponse) - if !ok { - return fmt.Errorf("that is not of type *WriteResponse") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *WriteResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *WriteResponsebut is not nil && this == nil") - } - if this.Okay != nil && that1.Okay != nil { - if *this.Okay != *that1.Okay { - return fmt.Errorf("Okay this(%v) Not Equal that(%v)", *this.Okay, *that1.Okay) - } - } else if this.Okay != nil { - return fmt.Errorf("this.Okay == nil && that.Okay != nil") - } else if that1.Okay != nil { - return fmt.Errorf("Okay this(%v) Not Equal that(%v)", this.Okay, that1.Okay) - } - 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) - } - } else if this.Proposal != nil { - return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) - } - 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 *WriteResponse) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*WriteResponse) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Okay != nil && that1.Okay != nil { - if *this.Okay != *that1.Okay { - return false - } - } else if this.Okay != nil { - return false - } else if that1.Okay != nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false - } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false - } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LearnedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*LearnedMessage) - if !ok { - return fmt.Errorf("that is not of type *LearnedMessage") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *LearnedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *LearnedMessagebut is not nil && this == nil") - } - if !this.Action.Equal(that1.Action) { - return fmt.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) - } - 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 *LearnedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*LearnedMessage) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Action.Equal(that1.Action) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RecoverRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RecoverRequest) - if !ok { - return fmt.Errorf("that is not of type *RecoverRequest") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RecoverRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RecoverRequestbut is not nil && this == nil") - } - 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 *RecoverRequest) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*RecoverRequest) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RecoverResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RecoverResponse) - if !ok { - return fmt.Errorf("that is not of type *RecoverResponse") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RecoverResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RecoverResponsebut 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.Begin != nil && that1.Begin != nil { - if *this.Begin != *that1.Begin { - return fmt.Errorf("Begin this(%v) Not Equal that(%v)", *this.Begin, *that1.Begin) - } - } else if this.Begin != nil { - return fmt.Errorf("this.Begin == nil && that.Begin != nil") - } else if that1.Begin != nil { - return fmt.Errorf("Begin this(%v) Not Equal that(%v)", this.Begin, that1.Begin) - } - if this.End != nil && that1.End != nil { - if *this.End != *that1.End { - return fmt.Errorf("End this(%v) Not Equal that(%v)", *this.End, *that1.End) - } - } else if this.End != nil { - return fmt.Errorf("this.End == nil && that.End != nil") - } else if that1.End != nil { - return fmt.Errorf("End this(%v) Not Equal that(%v)", this.End, that1.End) - } - 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 *RecoverResponse) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*RecoverResponse) - 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.Begin != nil && that1.Begin != nil { - if *this.Begin != *that1.Begin { - return false - } - } else if this.Begin != nil { - return false - } else if that1.Begin != nil { - return false - } - if this.End != nil && that1.End != nil { - if *this.End != *that1.End { - return false - } - } else if this.End != nil { - return false - } else if that1.End != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Promise) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Promise{") - if this.Proposal != nil { - s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\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 *Action) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 12) - s = append(s, "&mesosproto.Action{") - if this.Position != nil { - s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\n") - } - if this.Promised != nil { - s = append(s, "Promised: "+valueToGoStringLog(this.Promised, "uint64")+",\n") - } - if this.Performed != nil { - s = append(s, "Performed: "+valueToGoStringLog(this.Performed, "uint64")+",\n") - } - if this.Learned != nil { - s = append(s, "Learned: "+valueToGoStringLog(this.Learned, "bool")+",\n") - } - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringLog(this.Type, "mesosproto.Action_Type")+",\n") - } - if this.Nop != nil { - s = append(s, "Nop: "+fmt.Sprintf("%#v", this.Nop)+",\n") - } - if this.Append != nil { - s = append(s, "Append: "+fmt.Sprintf("%#v", this.Append)+",\n") - } - if this.Truncate != nil { - s = append(s, "Truncate: "+fmt.Sprintf("%#v", this.Truncate)+",\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 *Action_Nop) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&mesosproto.Action_Nop{") - 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 *Action_Append) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&mesosproto.Action_Append{") - if this.Bytes != nil { - s = append(s, "Bytes: "+valueToGoStringLog(this.Bytes, "byte")+",\n") - } - if this.Cksum != nil { - s = append(s, "Cksum: "+valueToGoStringLog(this.Cksum, "byte")+",\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 *Action_Truncate) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Action_Truncate{") - if this.To != nil { - s = append(s, "To: "+valueToGoStringLog(this.To, "uint64")+",\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 *Metadata) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&mesosproto.Metadata{") - if this.Status != nil { - s = append(s, "Status: "+valueToGoStringLog(this.Status, "mesosproto.Metadata_Status")+",\n") - } - if this.Promised != nil { - s = append(s, "Promised: "+valueToGoStringLog(this.Promised, "uint64")+",\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 *Record) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&mesosproto.Record{") - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringLog(this.Type, "mesosproto.Record_Type")+",\n") - } - if this.Promise != nil { - s = append(s, "Promise: "+fmt.Sprintf("%#v", this.Promise)+",\n") - } - if this.Action != nil { - s = append(s, "Action: "+fmt.Sprintf("%#v", this.Action)+",\n") - } - if this.Metadata != nil { - s = append(s, "Metadata: "+fmt.Sprintf("%#v", this.Metadata)+",\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 *PromiseRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&mesosproto.PromiseRequest{") - if this.Proposal != nil { - s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") - } - if this.Position != nil { - s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\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 *PromiseResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&mesosproto.PromiseResponse{") - if this.Okay != nil { - s = append(s, "Okay: "+valueToGoStringLog(this.Okay, "bool")+",\n") - } - if this.Proposal != nil { - s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") - } - if this.Position != nil { - s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\n") - } - if this.Action != nil { - s = append(s, "Action: "+fmt.Sprintf("%#v", this.Action)+",\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 *WriteRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 11) - s = append(s, "&mesosproto.WriteRequest{") - if this.Proposal != nil { - s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") - } - if this.Position != nil { - s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\n") - } - if this.Learned != nil { - s = append(s, "Learned: "+valueToGoStringLog(this.Learned, "bool")+",\n") - } - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringLog(this.Type, "mesosproto.Action_Type")+",\n") - } - if this.Nop != nil { - s = append(s, "Nop: "+fmt.Sprintf("%#v", this.Nop)+",\n") - } - if this.Append != nil { - s = append(s, "Append: "+fmt.Sprintf("%#v", this.Append)+",\n") - } - if this.Truncate != nil { - s = append(s, "Truncate: "+fmt.Sprintf("%#v", this.Truncate)+",\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 *WriteResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&mesosproto.WriteResponse{") - if this.Okay != nil { - s = append(s, "Okay: "+valueToGoStringLog(this.Okay, "bool")+",\n") - } - if this.Proposal != nil { - s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") - } - if this.Position != nil { - s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\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 *LearnedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.LearnedMessage{") - if this.Action != nil { - s = append(s, "Action: "+fmt.Sprintf("%#v", this.Action)+",\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 *RecoverRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&mesosproto.RecoverRequest{") - 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 *RecoverResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&mesosproto.RecoverResponse{") - if this.Status != nil { - s = append(s, "Status: "+valueToGoStringLog(this.Status, "mesosproto.Metadata_Status")+",\n") - } - if this.Begin != nil { - s = append(s, "Begin: "+valueToGoStringLog(this.Begin, "uint64")+",\n") - } - if this.End != nil { - s = append(s, "End: "+valueToGoStringLog(this.End, "uint64")+",\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 valueToGoStringLog(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 extensionToGoStringLog(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 *Promise) 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 *Promise) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Proposal == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") - } else { - data[i] = 0x8 - i++ - i = encodeVarintLog(data, i, uint64(*m.Proposal)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Action) 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 *Action) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Position == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") - } else { - data[i] = 0x8 - i++ - i = encodeVarintLog(data, i, uint64(*m.Position)) - } - if m.Promised == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") - } else { - data[i] = 0x10 - i++ - i = encodeVarintLog(data, i, uint64(*m.Promised)) - } - if m.Performed != nil { - data[i] = 0x18 - i++ - i = encodeVarintLog(data, i, uint64(*m.Performed)) - } - if m.Learned != nil { - data[i] = 0x20 - i++ - if *m.Learned { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Type != nil { - data[i] = 0x28 - i++ - i = encodeVarintLog(data, i, uint64(*m.Type)) - } - if m.Nop != nil { - data[i] = 0x32 - i++ - i = encodeVarintLog(data, i, uint64(m.Nop.Size())) - n1, err := m.Nop.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Append != nil { - data[i] = 0x3a - i++ - i = encodeVarintLog(data, i, uint64(m.Append.Size())) - n2, err := m.Append.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Truncate != nil { - data[i] = 0x42 - i++ - i = encodeVarintLog(data, i, uint64(m.Truncate.Size())) - n3, err := m.Truncate.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 *Action_Nop) 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 *Action_Nop) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Action_Append) 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 *Action_Append) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Bytes == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("bytes") - } else { - data[i] = 0xa - i++ - i = encodeVarintLog(data, i, uint64(len(m.Bytes))) - i += copy(data[i:], m.Bytes) - } - if m.Cksum != nil { - data[i] = 0x12 - i++ - i = encodeVarintLog(data, i, uint64(len(m.Cksum))) - i += copy(data[i:], m.Cksum) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Action_Truncate) 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 *Action_Truncate) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.To == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("to") - } else { - data[i] = 0x8 - i++ - i = encodeVarintLog(data, i, uint64(*m.To)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Metadata) 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 *Metadata) 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 = encodeVarintLog(data, i, uint64(*m.Status)) - } - if m.Promised == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") - } else { - data[i] = 0x10 - i++ - i = encodeVarintLog(data, i, uint64(*m.Promised)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Record) 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 *Record) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") - } else { - data[i] = 0x8 - i++ - i = encodeVarintLog(data, i, uint64(*m.Type)) - } - if m.Promise != nil { - data[i] = 0x12 - i++ - i = encodeVarintLog(data, i, uint64(m.Promise.Size())) - n4, err := m.Promise.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.Action != nil { - data[i] = 0x1a - i++ - i = encodeVarintLog(data, i, uint64(m.Action.Size())) - n5, err := m.Action.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.Metadata != nil { - data[i] = 0x22 - i++ - i = encodeVarintLog(data, i, uint64(m.Metadata.Size())) - n6, err := m.Metadata.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 *PromiseRequest) 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 *PromiseRequest) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Proposal == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") - } else { - data[i] = 0x8 - i++ - i = encodeVarintLog(data, i, uint64(*m.Proposal)) - } - if m.Position != nil { - data[i] = 0x10 - i++ - i = encodeVarintLog(data, i, uint64(*m.Position)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *PromiseResponse) 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 *PromiseResponse) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Okay == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("okay") - } else { - data[i] = 0x8 - i++ - if *m.Okay { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Proposal == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") - } else { - data[i] = 0x10 - i++ - i = encodeVarintLog(data, i, uint64(*m.Proposal)) - } - if m.Action != nil { - data[i] = 0x1a - i++ - i = encodeVarintLog(data, i, uint64(m.Action.Size())) - n7, err := m.Action.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.Position != nil { - data[i] = 0x20 - i++ - i = encodeVarintLog(data, i, uint64(*m.Position)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *WriteRequest) 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 *WriteRequest) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Proposal == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") - } else { - data[i] = 0x8 - i++ - i = encodeVarintLog(data, i, uint64(*m.Proposal)) - } - if m.Position == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") - } else { - data[i] = 0x10 - i++ - i = encodeVarintLog(data, i, uint64(*m.Position)) - } - if m.Learned != nil { - data[i] = 0x18 - i++ - if *m.Learned { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Type == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") - } else { - data[i] = 0x20 - i++ - i = encodeVarintLog(data, i, uint64(*m.Type)) - } - if m.Nop != nil { - data[i] = 0x2a - i++ - i = encodeVarintLog(data, i, uint64(m.Nop.Size())) - n8, err := m.Nop.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.Append != nil { - data[i] = 0x32 - i++ - i = encodeVarintLog(data, i, uint64(m.Append.Size())) - n9, err := m.Append.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.Truncate != nil { - data[i] = 0x3a - i++ - i = encodeVarintLog(data, i, uint64(m.Truncate.Size())) - n10, err := m.Truncate.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *WriteResponse) 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 *WriteResponse) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Okay == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("okay") - } else { - data[i] = 0x8 - i++ - if *m.Okay { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Proposal == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") - } else { - data[i] = 0x10 - i++ - i = encodeVarintLog(data, i, uint64(*m.Proposal)) - } - if m.Position == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") - } else { - data[i] = 0x18 - i++ - i = encodeVarintLog(data, i, uint64(*m.Position)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *LearnedMessage) 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 *LearnedMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Action == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("action") - } else { - data[i] = 0xa - i++ - i = encodeVarintLog(data, i, uint64(m.Action.Size())) - n11, err := m.Action.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RecoverRequest) 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 *RecoverRequest) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RecoverResponse) 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 *RecoverResponse) 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 = encodeVarintLog(data, i, uint64(*m.Status)) - } - if m.Begin != nil { - data[i] = 0x10 - i++ - i = encodeVarintLog(data, i, uint64(*m.Begin)) - } - if m.End != nil { - data[i] = 0x18 - i++ - i = encodeVarintLog(data, i, uint64(*m.End)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Log(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 encodeFixed32Log(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 encodeVarintLog(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 NewPopulatedPromise(r randyLog, easy bool) *Promise { - this := &Promise{} - v1 := uint64(uint64(r.Uint32())) - this.Proposal = &v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 2) - } - return this -} - -func NewPopulatedAction(r randyLog, easy bool) *Action { - this := &Action{} - v2 := uint64(uint64(r.Uint32())) - this.Position = &v2 - v3 := uint64(uint64(r.Uint32())) - this.Promised = &v3 - if r.Intn(10) != 0 { - v4 := uint64(uint64(r.Uint32())) - this.Performed = &v4 - } - if r.Intn(10) != 0 { - v5 := bool(bool(r.Intn(2) == 0)) - this.Learned = &v5 - } - if r.Intn(10) != 0 { - v6 := Action_Type([]int32{1, 2, 3}[r.Intn(3)]) - this.Type = &v6 - } - if r.Intn(10) != 0 { - this.Nop = NewPopulatedAction_Nop(r, easy) - } - if r.Intn(10) != 0 { - this.Append = NewPopulatedAction_Append(r, easy) - } - if r.Intn(10) != 0 { - this.Truncate = NewPopulatedAction_Truncate(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 9) - } - return this -} - -func NewPopulatedAction_Nop(r randyLog, easy bool) *Action_Nop { - this := &Action_Nop{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 1) - } - return this -} - -func NewPopulatedAction_Append(r randyLog, easy bool) *Action_Append { - this := &Action_Append{} - v7 := r.Intn(100) - this.Bytes = make([]byte, v7) - for i := 0; i < v7; i++ { - this.Bytes[i] = byte(r.Intn(256)) - } - if r.Intn(10) != 0 { - v8 := r.Intn(100) - this.Cksum = make([]byte, v8) - for i := 0; i < v8; i++ { - this.Cksum[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 3) - } - return this -} - -func NewPopulatedAction_Truncate(r randyLog, easy bool) *Action_Truncate { - this := &Action_Truncate{} - v9 := uint64(uint64(r.Uint32())) - this.To = &v9 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 2) - } - return this -} - -func NewPopulatedMetadata(r randyLog, easy bool) *Metadata { - this := &Metadata{} - v10 := Metadata_Status([]int32{1, 2, 3, 4}[r.Intn(4)]) - this.Status = &v10 - v11 := uint64(uint64(r.Uint32())) - this.Promised = &v11 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 3) - } - return this -} - -func NewPopulatedRecord(r randyLog, easy bool) *Record { - this := &Record{} - v12 := Record_Type([]int32{1, 2, 3}[r.Intn(3)]) - this.Type = &v12 - if r.Intn(10) != 0 { - this.Promise = NewPopulatedPromise(r, easy) - } - if r.Intn(10) != 0 { - this.Action = NewPopulatedAction(r, easy) - } - if r.Intn(10) != 0 { - this.Metadata = NewPopulatedMetadata(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 5) - } - return this -} - -func NewPopulatedPromiseRequest(r randyLog, easy bool) *PromiseRequest { - this := &PromiseRequest{} - v13 := uint64(uint64(r.Uint32())) - this.Proposal = &v13 - if r.Intn(10) != 0 { - v14 := uint64(uint64(r.Uint32())) - this.Position = &v14 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 3) - } - return this -} - -func NewPopulatedPromiseResponse(r randyLog, easy bool) *PromiseResponse { - this := &PromiseResponse{} - v15 := bool(bool(r.Intn(2) == 0)) - this.Okay = &v15 - v16 := uint64(uint64(r.Uint32())) - this.Proposal = &v16 - if r.Intn(10) != 0 { - this.Action = NewPopulatedAction(r, easy) - } - if r.Intn(10) != 0 { - v17 := uint64(uint64(r.Uint32())) - this.Position = &v17 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 5) - } - 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 - if r.Intn(10) != 0 { - v20 := bool(bool(r.Intn(2) == 0)) - this.Learned = &v20 - } - v21 := Action_Type([]int32{1, 2, 3}[r.Intn(3)]) - this.Type = &v21 - if r.Intn(10) != 0 { - this.Nop = NewPopulatedAction_Nop(r, easy) - } - if r.Intn(10) != 0 { - this.Append = NewPopulatedAction_Append(r, easy) - } - if r.Intn(10) != 0 { - this.Truncate = NewPopulatedAction_Truncate(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 8) - } - return this -} - -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 - v24 := uint64(uint64(r.Uint32())) - this.Position = &v24 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 4) - } - return this -} - -func NewPopulatedLearnedMessage(r randyLog, easy bool) *LearnedMessage { - this := &LearnedMessage{} - this.Action = NewPopulatedAction(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 2) - } - return this -} - -func NewPopulatedRecoverRequest(r randyLog, easy bool) *RecoverRequest { - this := &RecoverRequest{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 1) - } - return this -} - -func NewPopulatedRecoverResponse(r randyLog, easy bool) *RecoverResponse { - this := &RecoverResponse{} - v25 := Metadata_Status([]int32{1, 2, 3, 4}[r.Intn(4)]) - this.Status = &v25 - if r.Intn(10) != 0 { - v26 := uint64(uint64(r.Uint32())) - this.Begin = &v26 - } - if r.Intn(10) != 0 { - v27 := uint64(uint64(r.Uint32())) - this.End = &v27 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 4) - } - return this -} - -type randyLog interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneLog(r randyLog) 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 randStringLog(r randyLog) string { - v28 := r.Intn(100) - tmps := make([]rune, v28) - for i := 0; i < v28; i++ { - tmps[i] = randUTF8RuneLog(r) - } - return string(tmps) -} -func randUnrecognizedLog(r randyLog, 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 = randFieldLog(data, r, fieldNumber, wire) - } - return data -} -func randFieldLog(data []byte, r randyLog, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateLog(data, uint64(key)) - v29 := r.Int63() - if r.Intn(2) == 0 { - v29 *= -1 - } - data = encodeVarintPopulateLog(data, uint64(v29)) - 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))) - case 2: - data = encodeVarintPopulateLog(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateLog(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateLog(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 encodeVarintPopulateLog(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 *Promise) Size() (n int) { - var l int - _ = l - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Action) Size() (n int) { - var l int - _ = l - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) - } - if m.Promised != nil { - n += 1 + sovLog(uint64(*m.Promised)) - } - if m.Performed != nil { - n += 1 + sovLog(uint64(*m.Performed)) - } - if m.Learned != nil { - n += 2 - } - if m.Type != nil { - n += 1 + sovLog(uint64(*m.Type)) - } - if m.Nop != nil { - l = m.Nop.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.Append != nil { - l = m.Append.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.Truncate != nil { - l = m.Truncate.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Action_Nop) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Action_Append) Size() (n int) { - var l int - _ = l - if m.Bytes != nil { - l = len(m.Bytes) - n += 1 + l + sovLog(uint64(l)) - } - if m.Cksum != nil { - l = len(m.Cksum) - n += 1 + l + sovLog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Action_Truncate) Size() (n int) { - var l int - _ = l - if m.To != nil { - n += 1 + sovLog(uint64(*m.To)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Metadata) Size() (n int) { - var l int - _ = l - if m.Status != nil { - n += 1 + sovLog(uint64(*m.Status)) - } - if m.Promised != nil { - n += 1 + sovLog(uint64(*m.Promised)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Record) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovLog(uint64(*m.Type)) - } - if m.Promise != nil { - l = m.Promise.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PromiseRequest) Size() (n int) { - var l int - _ = l - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) - } - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PromiseResponse) Size() (n int) { - var l int - _ = l - if m.Okay != nil { - n += 2 - } - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) - } - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WriteRequest) Size() (n int) { - var l int - _ = l - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) - } - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) - } - if m.Learned != nil { - n += 2 - } - if m.Type != nil { - n += 1 + sovLog(uint64(*m.Type)) - } - if m.Nop != nil { - l = m.Nop.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.Append != nil { - l = m.Append.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.Truncate != nil { - l = m.Truncate.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WriteResponse) Size() (n int) { - var l int - _ = l - if m.Okay != nil { - n += 2 - } - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) - } - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LearnedMessage) Size() (n int) { - var l int - _ = l - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovLog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RecoverRequest) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RecoverResponse) Size() (n int) { - var l int - _ = l - if m.Status != nil { - n += 1 + sovLog(uint64(*m.Status)) - } - if m.Begin != nil { - n += 1 + sovLog(uint64(*m.Begin)) - } - if m.End != nil { - n += 1 + sovLog(uint64(*m.End)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovLog(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozLog(x uint64) (n int) { - return sovLog(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Promise) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Promise{`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Action) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Action{`, - `Position:` + valueToStringLog(this.Position) + `,`, - `Promised:` + valueToStringLog(this.Promised) + `,`, - `Performed:` + valueToStringLog(this.Performed) + `,`, - `Learned:` + valueToStringLog(this.Learned) + `,`, - `Type:` + valueToStringLog(this.Type) + `,`, - `Nop:` + strings.Replace(fmt.Sprintf("%v", this.Nop), "Action_Nop", "Action_Nop", 1) + `,`, - `Append:` + strings.Replace(fmt.Sprintf("%v", this.Append), "Action_Append", "Action_Append", 1) + `,`, - `Truncate:` + strings.Replace(fmt.Sprintf("%v", this.Truncate), "Action_Truncate", "Action_Truncate", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Action_Nop) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Action_Nop{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Action_Append) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Action_Append{`, - `Bytes:` + valueToStringLog(this.Bytes) + `,`, - `Cksum:` + valueToStringLog(this.Cksum) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Action_Truncate) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Action_Truncate{`, - `To:` + valueToStringLog(this.To) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Metadata) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Metadata{`, - `Status:` + valueToStringLog(this.Status) + `,`, - `Promised:` + valueToStringLog(this.Promised) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Record) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Record{`, - `Type:` + valueToStringLog(this.Type) + `,`, - `Promise:` + strings.Replace(fmt.Sprintf("%v", this.Promise), "Promise", "Promise", 1) + `,`, - `Action:` + strings.Replace(fmt.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, - `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "Metadata", "Metadata", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *PromiseRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PromiseRequest{`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `Position:` + valueToStringLog(this.Position) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *PromiseResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PromiseResponse{`, - `Okay:` + valueToStringLog(this.Okay) + `,`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `Action:` + strings.Replace(fmt.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, - `Position:` + valueToStringLog(this.Position) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *WriteRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WriteRequest{`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `Position:` + valueToStringLog(this.Position) + `,`, - `Learned:` + valueToStringLog(this.Learned) + `,`, - `Type:` + valueToStringLog(this.Type) + `,`, - `Nop:` + strings.Replace(fmt.Sprintf("%v", this.Nop), "Action_Nop", "Action_Nop", 1) + `,`, - `Append:` + strings.Replace(fmt.Sprintf("%v", this.Append), "Action_Append", "Action_Append", 1) + `,`, - `Truncate:` + strings.Replace(fmt.Sprintf("%v", this.Truncate), "Action_Truncate", "Action_Truncate", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *WriteResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WriteResponse{`, - `Okay:` + valueToStringLog(this.Okay) + `,`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `Position:` + valueToStringLog(this.Position) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *LearnedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LearnedMessage{`, - `Action:` + strings.Replace(fmt.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *RecoverRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RecoverRequest{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *RecoverResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RecoverResponse{`, - `Status:` + valueToStringLog(this.Status) + `,`, - `Begin:` + valueToStringLog(this.Begin) + `,`, - `End:` + valueToStringLog(this.End) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringLog(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Promise) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - hasFields[0] |= uint64(0x00000001) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("proposal") - } - - return nil -} -func (m *Action) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Promised", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Promised = &v - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Performed", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Performed = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Learned", 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.Learned = &b - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Action_Type - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (Action_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nop", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nop == nil { - m.Nop = &Action_Nop{} - } - if err := m.Nop.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Append", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Append == nil { - m.Append = &Action_Append{} - } - if err := m.Append.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Truncate", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Truncate == nil { - m.Truncate = &Action_Truncate{} - } - if err := m.Truncate.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("position") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") - } - - return nil -} -func (m *Action_Nop) 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 - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - return nil -} -func (m *Action_Append) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLog - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bytes = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cksum", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLog - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cksum = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("bytes") - } - - return nil -} -func (m *Action_Truncate) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.To = &v - hasFields[0] |= uint64(0x00000001) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("to") - } - - return nil -} -func (m *Metadata) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var v Metadata_Status - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (Metadata_Status(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Status = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Promised", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Promised = &v - hasFields[0] |= uint64(0x00000002) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("promised") - } - - return nil -} -func (m *Record) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Record_Type - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (Record_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Promise", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Promise == nil { - m.Promise = &Promise{} - } - if err := m.Promise.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &Action{} - } - if err := m.Action.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("type") - } - - return nil -} -func (m *PromiseRequest) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("proposal") - } - - return nil -} -func (m *PromiseResponse) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Okay", 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.Okay = &b - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &Action{} - } - if err := m.Action.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("okay") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") - } - - return nil -} -func (m *WriteRequest) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Learned", 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.Learned = &b - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Action_Type - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (Action_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000004) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nop", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nop == nil { - m.Nop = &Action_Nop{} - } - if err := m.Nop.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Append", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Append == nil { - m.Append = &Action_Append{} - } - if err := m.Append.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Truncate", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Truncate == nil { - m.Truncate = &Action_Truncate{} - } - if err := m.Truncate.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("proposal") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") - } - - return nil -} -func (m *WriteResponse) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Okay", 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.Okay = &b - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - hasFields[0] |= uint64(0x00000004) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("okay") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") - } - - return nil -} -func (m *LearnedMessage) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", 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 ErrInvalidLengthLog - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &Action{} - } - if err := m.Action.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 - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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("action") - } - - return nil -} -func (m *RecoverRequest) 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 - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - return nil -} -func (m *RecoverResponse) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var v Metadata_Status - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (Metadata_Status(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Status = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Begin = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.End = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipLog(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLog - } - 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") - } - - return nil -} -func skipLog(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - 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 { - 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 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, ErrInvalidLengthLog - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - 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 := skipLog(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 ( - ErrInvalidLengthLog = fmt.Errorf("proto: negative length found during unmarshaling") -) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.proto deleted file mode 100644 index 841d9300aec..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.proto +++ /dev/null @@ -1,209 +0,0 @@ -/** - * 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 "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; - - -// 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 -// proposer), until a new promise is made to a proposer with a higher -// proposal number. Each replica writes every promise it makes as a -// log record so that it can recover this information after a failure. -// TODO(benh): Does the promise actually need to be written to stable -// storage? Can we get away with looking at the last written action -// and using it's promised value? In this case, what happens if we -// make a promise but don't receive an action from that coordinator? -message Promise { - required uint64 proposal = 1; -} - - -// Represents an "action" performed on the log. Each action has an -// associated position in the log. In addition, each action (i.e., -// position) will have been "promised" to a specific proposer -// (implicitly or explicitly) and may have been "performed" from a -// specific proposer. An action may also be "learned" to have reached -// consensus. There are three types of possible actions that can be -// performed on the log: nop (no action), append, and truncate. -message Action { - required uint64 position = 1; - required uint64 promised = 2; - optional uint64 performed = 3; - optional bool learned = 4; - - enum Type { - NOP = 1; - APPEND = 2; - TRUNCATE = 3; - } - - message Nop {} - - message Append { - required bytes bytes = 1; - optional bytes cksum = 2; - } - - message Truncate { - required uint64 to = 1; // All positions before and exclusive of 'to'. - } - - optional Type type = 5; // Set iff performed is set. - optional Nop nop = 6; - optional Append append = 7; - optional Truncate truncate = 8; -} - - -// The metadata of a replica. It has to be persisted on the disk. We -// store the current status of the replica as well as the implicit -// promise that a replica has made. This message is intended to -// replace the old Promise message to support catch-up. -message Metadata { - enum Status { - VOTING = 1; // Normal voting member in Paxos group. - RECOVERING = 2; // In the process of catching up. - STARTING = 3; // The log has been initialized. - EMPTY = 4; // The log is empty and is not initialized. - } - - required Status status = 1 [default = EMPTY]; - required uint64 promised = 2 [default = 0]; -} - - -// Represents a log record written to the local filesystem by a -// replica. A log record may store a promise (DEPRECATED), an action -// or metadata (defined above). -message Record { - enum Type { - PROMISE = 1; // DEPRECATED! - ACTION = 2; - METADATA = 3; - } - - required Type type = 1; - optional Promise promise = 2; // DEPRECATED! - optional Action action = 3; - optional Metadata metadata = 4; -} - - -//////////////////////////////////////////////////// -// Replicated log request/responses and messages. // -//////////////////////////////////////////////////// - - -// Represents a "promise" request from a proposer with the specified -// 'proposal' to a replica. If the proposer is a coordinator, most -// such requests will occur after a coordinator has failed and a new -// coordinator is elected. In such a case, the position that the -// coordinator is asking the replica to promise is implicitly *all* -// positions that the replica has made no promises (thus the position -// field is not be used). In other instances, however, a proposer -// might be explicitly trying to request that a replica promise a -// specific position in the log (such as when trying to fill holes -// discovered during a client read), and then the 'position' field -// will be present. -message PromiseRequest { - required uint64 proposal = 1; - 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. -// 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). -message PromiseResponse { - required bool okay = 1; - required uint64 proposal = 2; - optional uint64 position = 4; - optional Action action = 3; -} - - -// Represents a write request for a specific type of action. Note that -// we deliberately do not include the entire Action as it contains -// fields that are not relevant to a write request (e.g., promised, -// performed) and rather than ignore them we exclude them for safety. -message WriteRequest { - required uint64 proposal = 1; - required uint64 position = 2; - optional bool learned = 3; - required Action.Type type = 4; - optional Action.Nop nop = 5; - optional Action.Append append = 6; - optional Action.Truncate truncate = 7; -} - - -// 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 -// 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. -message WriteResponse { - required bool okay = 1; - required uint64 proposal = 2; - required uint64 position = 3; -} - - -// Represents a "learned" event, that is, when a particular action has -// been agreed upon (reached consensus). -message LearnedMessage { - required Action action = 1; -} - - -// Represents a recover request. A recover request is used to initiate -// the recovery (by broadcasting it). -message RecoverRequest {} - - -// When a replica receives a RecoverRequest, it will reply with its -// current status, and the begin and the end of its current log. -message RecoverResponse { - required Metadata.Status status = 1; - optional uint64 begin = 2; - optional uint64 end = 3; -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.pb.go index 0165ccafa73..5f62c951119 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/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 - if r.Intn(10) != 0 { - v73 := uint64(uint64(r.Uint32())) - this.Backlog = &v73 - } - if r.Intn(10) != 0 { - v74 := uint64(uint64(r.Uint32())) - this.Bytes = &v74 - } - if r.Intn(10) != 0 { - v75 := uint64(uint64(r.Uint32())) - this.Drops = &v75 - } - if r.Intn(10) != 0 { - v76 := uint64(uint64(r.Uint32())) - this.Overlimits = &v76 - } - if r.Intn(10) != 0 { - v77 := uint64(uint64(r.Uint32())) - this.Packets = &v77 - } + v77 := randStringMesos(r) + this.Id = &v77 if r.Intn(10) != 0 { v78 := uint64(uint64(r.Uint32())) - this.Qlen = &v78 + this.Backlog = &v78 } if r.Intn(10) != 0 { v79 := uint64(uint64(r.Uint32())) - this.Ratebps = &v79 + this.Bytes = &v79 } if r.Intn(10) != 0 { v80 := uint64(uint64(r.Uint32())) - this.Ratepps = &v80 + this.Drops = &v80 } if r.Intn(10) != 0 { v81 := uint64(uint64(r.Uint32())) - this.Requeues = &v81 + this.Overlimits = &v81 + } + if r.Intn(10) != 0 { + v82 := uint64(uint64(r.Uint32())) + this.Packets = &v82 + } + if r.Intn(10) != 0 { + v83 := uint64(uint64(r.Uint32())) + this.Qlen = &v83 + } + if r.Intn(10) != 0 { + v84 := uint64(uint64(r.Uint32())) + this.Ratebps = &v84 + } + if r.Intn(10) != 0 { + v85 := uint64(uint64(r.Uint32())) + this.Ratepps = &v85 + } + if r.Intn(10) != 0 { + 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 - } - if r.Intn(10) != 0 { - v85 := float64(r.Float64()) - if r.Intn(2) == 0 { - v85 *= -1 - } - this.CpusLimit = &v85 - } - if r.Intn(10) != 0 { - v86 := uint64(uint64(r.Uint32())) - this.MemRssBytes = &v86 - } - if r.Intn(10) != 0 { - v87 := uint64(uint64(r.Uint32())) - this.MemLimitBytes = &v87 - } - if r.Intn(10) != 0 { - v88 := uint32(r.Uint32()) - this.CpusNrPeriods = &v88 - } - if r.Intn(10) != 0 { - v89 := uint32(r.Uint32()) - this.CpusNrThrottled = &v89 + this.CpusSystemTimeSecs = &v89 } if r.Intn(10) != 0 { v90 := float64(r.Float64()) if r.Intn(2) == 0 { v90 *= -1 } - this.CpusThrottledTimeSecs = &v90 + this.CpusLimit = &v90 } if r.Intn(10) != 0 { v91 := uint64(uint64(r.Uint32())) - this.MemFileBytes = &v91 + this.MemRssBytes = &v91 } if r.Intn(10) != 0 { v92 := uint64(uint64(r.Uint32())) - this.MemAnonBytes = &v92 + this.MemLimitBytes = &v92 } if r.Intn(10) != 0 { - v93 := uint64(uint64(r.Uint32())) - this.MemMappedFileBytes = &v93 + v93 := uint32(r.Uint32()) + this.CpusNrPeriods = &v93 + } + if r.Intn(10) != 0 { + v94 := uint32(r.Uint32()) + this.CpusNrThrottled = &v94 + } + if r.Intn(10) != 0 { + v95 := float64(r.Float64()) + if r.Intn(2) == 0 { + v95 *= -1 + } + this.CpusThrottledTimeSecs = &v95 + } + if r.Intn(10) != 0 { + v96 := uint64(uint64(r.Uint32())) + this.MemFileBytes = &v96 + } + if r.Intn(10) != 0 { + v97 := uint64(uint64(r.Uint32())) + this.MemAnonBytes = &v97 + } + if r.Intn(10) != 0 { + 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 - } - if r.Intn(10) != 0 { - v95 := uint64(uint64(r.Uint32())) - this.NetRxBytes = &v95 - } - if r.Intn(10) != 0 { - v96 := uint64(uint64(r.Uint32())) - this.NetRxErrors = &v96 - } - if r.Intn(10) != 0 { - v97 := uint64(uint64(r.Uint32())) - this.NetRxDropped = &v97 - } - if r.Intn(10) != 0 { - v98 := uint64(uint64(r.Uint32())) - this.NetTxPackets = &v98 - } if r.Intn(10) != 0 { v99 := uint64(uint64(r.Uint32())) - this.NetTxBytes = &v99 + this.NetRxPackets = &v99 } if r.Intn(10) != 0 { v100 := uint64(uint64(r.Uint32())) - this.NetTxErrors = &v100 + this.NetRxBytes = &v100 } if r.Intn(10) != 0 { v101 := uint64(uint64(r.Uint32())) - this.NetTxDropped = &v101 + this.NetRxErrors = &v101 } if r.Intn(10) != 0 { - v102 := float64(r.Float64()) - if r.Intn(2) == 0 { - v102 *= -1 - } - this.NetTcpRttMicrosecsP50 = &v102 + v102 := uint64(uint64(r.Uint32())) + this.NetRxDropped = &v102 } if r.Intn(10) != 0 { - v103 := float64(r.Float64()) - if r.Intn(2) == 0 { - v103 *= -1 - } - this.NetTcpRttMicrosecsP90 = &v103 + v103 := uint64(uint64(r.Uint32())) + this.NetTxPackets = &v103 } if r.Intn(10) != 0 { - v104 := float64(r.Float64()) - if r.Intn(2) == 0 { - v104 *= -1 - } - this.NetTcpRttMicrosecsP95 = &v104 + v104 := uint64(uint64(r.Uint32())) + this.NetTxBytes = &v104 } if r.Intn(10) != 0 { - v105 := float64(r.Float64()) - if r.Intn(2) == 0 { - v105 *= -1 - } - this.NetTcpRttMicrosecsP99 = &v105 + v105 := uint64(uint64(r.Uint32())) + this.NetTxErrors = &v105 } if r.Intn(10) != 0 { v106 := uint64(uint64(r.Uint32())) - this.DiskLimitBytes = &v106 + this.NetTxDropped = &v106 } if r.Intn(10) != 0 { - v107 := uint64(uint64(r.Uint32())) - this.DiskUsedBytes = &v107 + v107 := float64(r.Float64()) + if r.Intn(2) == 0 { + v107 *= -1 + } + this.NetTcpRttMicrosecsP50 = &v107 } if r.Intn(10) != 0 { v108 := float64(r.Float64()) if r.Intn(2) == 0 { v108 *= -1 } - this.NetTcpActiveConnections = &v108 + this.NetTcpRttMicrosecsP90 = &v108 } if r.Intn(10) != 0 { v109 := float64(r.Float64()) if r.Intn(2) == 0 { v109 *= -1 } - this.NetTcpTimeWaitConnections = &v109 + this.NetTcpRttMicrosecsP95 = &v109 } if r.Intn(10) != 0 { - v110 := uint32(r.Uint32()) - this.Processes = &v110 + v110 := float64(r.Float64()) + if r.Intn(2) == 0 { + v110 *= -1 + } + this.NetTcpRttMicrosecsP99 = &v110 } if r.Intn(10) != 0 { - v111 := uint32(r.Uint32()) - this.Threads = &v111 + v111 := uint64(uint64(r.Uint32())) + this.DiskLimitBytes = &v111 } if r.Intn(10) != 0 { v112 := uint64(uint64(r.Uint32())) - this.MemLowPressureCounter = &v112 + this.DiskUsedBytes = &v112 } if r.Intn(10) != 0 { - v113 := uint64(uint64(r.Uint32())) - this.MemMediumPressureCounter = &v113 + v113 := float64(r.Float64()) + if r.Intn(2) == 0 { + v113 *= -1 + } + this.NetTcpActiveConnections = &v113 } if r.Intn(10) != 0 { - v114 := uint64(uint64(r.Uint32())) - this.MemCriticalPressureCounter = &v114 + v114 := float64(r.Float64()) + if r.Intn(2) == 0 { + v114 *= -1 + } + this.NetTcpTimeWaitConnections = &v114 } if r.Intn(10) != 0 { - v115 := r.Intn(10) - this.NetTrafficControlStatistics = make([]*TrafficControlStatistics, v115) - for i := 0; i < v115; i++ { + v115 := uint32(r.Uint32()) + this.Processes = &v115 + } + if r.Intn(10) != 0 { + v116 := uint32(r.Uint32()) + this.Threads = &v116 + } + if r.Intn(10) != 0 { + v117 := uint64(uint64(r.Uint32())) + this.MemLowPressureCounter = &v117 + } + if r.Intn(10) != 0 { + v118 := uint64(uint64(r.Uint32())) + this.MemMediumPressureCounter = &v118 + } + if r.Intn(10) != 0 { + v119 := uint64(uint64(r.Uint32())) + this.MemCriticalPressureCounter = &v119 + } + if r.Intn(10) != 0 { + 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 - } - if r.Intn(10) != 0 { - v117 := uint64(uint64(r.Uint32())) - this.MemTotalMemswBytes = &v117 - } - if r.Intn(10) != 0 { - v118 := uint64(uint64(r.Uint32())) - this.MemSoftLimitBytes = &v118 - } - if r.Intn(10) != 0 { - v119 := uint64(uint64(r.Uint32())) - this.MemCacheBytes = &v119 - } - if r.Intn(10) != 0 { - v120 := uint64(uint64(r.Uint32())) - this.MemSwapBytes = &v120 - } if r.Intn(10) != 0 { v121 := uint64(uint64(r.Uint32())) - this.MemUnevictableBytes = &v121 + this.MemTotalBytes = &v121 + } + if r.Intn(10) != 0 { + v122 := uint64(uint64(r.Uint32())) + this.MemTotalMemswBytes = &v122 + } + if r.Intn(10) != 0 { + v123 := uint64(uint64(r.Uint32())) + this.MemSoftLimitBytes = &v123 + } + if r.Intn(10) != 0 { + v124 := uint64(uint64(r.Uint32())) + this.MemCacheBytes = &v124 + } + if r.Intn(10) != 0 { + v125 := uint64(uint64(r.Uint32())) + this.MemSwapBytes = &v125 + } + if r.Intn(10) != 0 { + 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,26 +21996,32 @@ func NewPopulatedVolume(r randyMesos, easy bool) *Volume { return this } -func NewPopulatedContainerInfo(r randyMesos, easy bool) *ContainerInfo { - this := &ContainerInfo{} - v223 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) - this.Type = &v223 +func NewPopulatedNetworkInfo(r randyMesos, easy bool) *NetworkInfo { + this := &NetworkInfo{} if r.Intn(10) != 0 { - v224 := r.Intn(10) - this.Volumes = make([]*Volume, v224) - for i := 0; i < v224; i++ { - this.Volumes[i] = NewPopulatedVolume(r, easy) + 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.Docker = NewPopulatedContainerInfo_DockerInfo(r, easy) + this.Labels = NewPopulatedLabels(r, easy) } if r.Intn(10) != 0 { - v225 := randStringMesos(r) - this.Hostname = &v225 - } - if r.Intn(10) != 0 { - this.Mesos = NewPopulatedContainerInfo_MesosInfo(r, easy) + 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) @@ -19954,35 +22029,85 @@ func NewPopulatedContainerInfo(r randyMesos, easy bool) *ContainerInfo { return this } -func NewPopulatedContainerInfo_DockerInfo(r randyMesos, easy bool) *ContainerInfo_DockerInfo { - this := &ContainerInfo_DockerInfo{} - v226 := randStringMesos(r) - this.Image = &v226 +func NewPopulatedNetworkInfo_IPAddress(r randyMesos, easy bool) *NetworkInfo_IPAddress { + this := &NetworkInfo_IPAddress{} if r.Intn(10) != 0 { - v227 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3}[r.Intn(3)]) - this.Network = &v227 + v233 := NetworkInfo_Protocol([]int32{1, 2}[r.Intn(2)]) + this.Protocol = &v233 } if r.Intn(10) != 0 { - v228 := r.Intn(10) - this.PortMappings = make([]*ContainerInfo_DockerInfo_PortMapping, v228) - for i := 0; i < v228; i++ { + 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{} + v235 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v235 + if r.Intn(10) != 0 { + v236 := r.Intn(10) + this.Volumes = make([]*Volume, v236) + for i := 0; i < v236; i++ { + this.Volumes[i] = NewPopulatedVolume(r, easy) + } + } + if r.Intn(10) != 0 { + this.Docker = NewPopulatedContainerInfo_DockerInfo(r, easy) + } + if r.Intn(10) != 0 { + 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, 8) + } + return this +} + +func NewPopulatedContainerInfo_DockerInfo(r randyMesos, easy bool) *ContainerInfo_DockerInfo { + this := &ContainerInfo_DockerInfo{} + v239 := randStringMesos(r) + this.Image = &v239 + if r.Intn(10) != 0 { + v240 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3}[r.Intn(3)]) + this.Network = &v240 + } + if r.Intn(10) != 0 { + 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 { - v239 := randStringMesos(r) - this.Name = &v239 + v253 := randStringMesos(r) + this.Name = &v253 } if r.Intn(10) != 0 { - v240 := randStringMesos(r) - this.Protocol = &v240 + v254 := randStringMesos(r) + this.Protocol = &v254 + } + if r.Intn(10) != 0 { + 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 + v262 := randStringMesos(r) + this.AcKind = &v262 + v263 := randStringMesos(r) + this.AcVersion = &v263 + v264 := randStringMesos(r) + this.Name = &v264 if r.Intn(10) != 0 { - v250 := r.Intn(10) - this.Labels = make([]*AppcImageManifest_Label, v250) - for i := 0; i < v250; i++ { + 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,7 @@ func (m *ContainerID) 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 @@ -23572,15 +26076,22 @@ func (m *ContainerID) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } -func (m *Address) Unmarshal(data []byte) error { +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 } @@ -23593,6 +26104,164 @@ func (m *Address) Unmarshal(data []byte) error { } 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 + } + } + 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 *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 { + 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: 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,6 +26606,387 @@ 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 Start", 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.Start == nil { + m.Start = &TimeInfo{} + } + if err := m.Start.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 Duration", 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.Duration == nil { + m.Duration = &DurationInfo{} + } + if err := m.Duration.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("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 + } + 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: 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 { @@ -23916,6 +26994,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 } @@ -23944,6 +27025,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 } @@ -23972,6 +27056,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 } @@ -24021,6 +27108,9 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { } var v int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -24039,6 +27129,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 } @@ -24066,6 +27159,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 } @@ -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,8 +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 shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27120,6 +30532,12 @@ func (m *Resource_DiskInfo_Persistence) Unmarshal(data []byte) error { } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Persistence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Persistence: illegal tag %d (wire type %d)", fieldNum, wire) + } switch fieldNum { case 1: if wireType != 2 { @@ -27127,6 +30545,9 @@ func (m *Resource_DiskInfo_Persistence) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -27150,15 +30571,7 @@ func (m *Resource_DiskInfo_Persistence) 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 @@ -27177,14 +30590,21 @@ func (m *Resource_DiskInfo_Persistence) Unmarshal(data []byte) error { 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 } @@ -27196,17 +30616,16 @@ func (m *Resource_RevocableInfo) Unmarshal(data []byte) error { } } 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: - 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 @@ -27222,6 +30641,9 @@ func (m *Resource_RevocableInfo) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *TrafficControlStatistics) Unmarshal(data []byte) error { @@ -27229,8 +30651,12 @@ func (m *TrafficControlStatistics) 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 } @@ -27243,6 +30669,12 @@ func (m *TrafficControlStatistics) Unmarshal(data []byte) error { } 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 { @@ -27250,6 +30682,9 @@ 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 } @@ -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,7 @@ func (m *Offer_Operation_Destroy) 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 @@ -30438,6 +34337,269 @@ func (m *Offer_Operation_Destroy) Unmarshal(data []byte) error { } } + 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 + } + } + 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 + } + 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 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,9 @@ 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 } @@ -32225,15 +36615,7 @@ func (m *Image_AppC) 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 @@ -32252,6 +36634,9 @@ func (m *Image_AppC) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Image_Docker) Unmarshal(data []byte) error { @@ -32259,8 +36644,12 @@ func (m *Image_Docker) 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 } @@ -32273,6 +36662,12 @@ func (m *Image_Docker) Unmarshal(data []byte) error { } 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 { @@ -32280,6 +36675,9 @@ func (m *Image_Docker) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32303,15 +36701,7 @@ func (m *Image_Docker) 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 @@ -32330,6 +36720,9 @@ func (m *Image_Docker) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } func (m *Volume) Unmarshal(data []byte) error { @@ -32337,8 +36730,12 @@ func (m *Volume) 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,6 +36748,12 @@ func (m *Volume) Unmarshal(data []byte) error { } 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 { @@ -32358,6 +36761,9 @@ func (m *Volume) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32386,6 +36792,9 @@ func (m *Volume) Unmarshal(data []byte) error { } var stringLen uint64 for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32413,6 +36822,9 @@ func (m *Volume) Unmarshal(data []byte) error { } var v Volume_Mode for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32431,6 +36843,9 @@ func (m *Volume) Unmarshal(data []byte) error { } var msglen int for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } if iNdEx >= l { return io.ErrUnexpectedEOF } @@ -32456,15 +36871,7 @@ func (m *Volume) 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 @@ -32486,15 +36893,21 @@ func (m *Volume) Unmarshal(data []byte) error { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("mode") } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } -func (m *ContainerInfo) Unmarshal(data []byte) error { - var hasFields [1]uint64 +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 } @@ -32507,6 +36920,308 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { } 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 + } + 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 + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IpAddresses", 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.IpAddresses = append(m.IpAddresses, &NetworkInfo_IPAddress{}) + if err := m.IpAddresses[len(m.IpAddresses)-1].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 iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +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 + } + 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: 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 != 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 + 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 *ContainerInfo) 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: 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,7 @@ func (m *ContainerInfo_MesosInfo) 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 @@ -33048,14 +37846,21 @@ func (m *ContainerInfo_MesosInfo) Unmarshal(data []byte) error { } } + if iNdEx > l { + return io.ErrUnexpectedEOF + } return nil } -func (m *Labels) Unmarshal(data []byte) error { +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 } @@ -33068,6 +37873,94 @@ func (m *Labels) Unmarshal(data []byte) error { } 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 + } + } + 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 + } + 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 *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 + } + 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: 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/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.proto index 07b5c80968d..fbb1efae73a 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.proto +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/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/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.pb.go index 9dd1bc2fae9..4c10053edcf 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/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/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.proto index 49c57ccba47..b2db3e88d36 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.proto +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/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): 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(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/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.pb.go deleted file mode 100644 index c0a60c796b0..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.pb.go +++ /dev/null @@ -1,1268 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: registry.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 - -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:"-"` -} - -func (m *Registry) Reset() { *m = Registry{} } -func (*Registry) ProtoMessage() {} - -func (m *Registry) GetMaster() *Registry_Master { - if m != nil { - return m.Master - } - return nil -} - -func (m *Registry) GetSlaves() *Registry_Slaves { - if m != nil { - return m.Slaves - } - return nil -} - -type Registry_Master struct { - Info *MasterInfo `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Registry_Master) Reset() { *m = Registry_Master{} } -func (*Registry_Master) ProtoMessage() {} - -func (m *Registry_Master) GetInfo() *MasterInfo { - if m != nil { - return m.Info - } - return nil -} - -type Registry_Slave struct { - Info *SlaveInfo `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Registry_Slave) Reset() { *m = Registry_Slave{} } -func (*Registry_Slave) ProtoMessage() {} - -func (m *Registry_Slave) GetInfo() *SlaveInfo { - if m != nil { - return m.Info - } - return nil -} - -type Registry_Slaves struct { - Slaves []*Registry_Slave `protobuf:"bytes,1,rep,name=slaves" json:"slaves,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Registry_Slaves) Reset() { *m = Registry_Slaves{} } -func (*Registry_Slaves) ProtoMessage() {} - -func (m *Registry_Slaves) GetSlaves() []*Registry_Slave { - if m != nil { - return m.Slaves - } - return nil -} - -func (this *Registry) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Registry) - if !ok { - return fmt.Errorf("that is not of type *Registry") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Registry but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Registrybut is not nil && this == nil") - } - if !this.Master.Equal(that1.Master) { - return fmt.Errorf("Master this(%v) Not Equal that(%v)", this.Master, that1.Master) - } - if !this.Slaves.Equal(that1.Slaves) { - return fmt.Errorf("Slaves this(%v) Not Equal that(%v)", this.Slaves, that1.Slaves) - } - 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) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Registry) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Master.Equal(that1.Master) { - return false - } - if !this.Slaves.Equal(that1.Slaves) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Registry_Master) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Registry_Master) - if !ok { - return fmt.Errorf("that is not of type *Registry_Master") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Registry_Master but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Registry_Masterbut 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_Master) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Registry_Master) - 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_Slave) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Registry_Slave) - if !ok { - return fmt.Errorf("that is not of type *Registry_Slave") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Registry_Slave but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Registry_Slavebut 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_Slave) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Registry_Slave) - 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_Slaves) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Registry_Slaves) - if !ok { - return fmt.Errorf("that is not of type *Registry_Slaves") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Registry_Slaves but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Registry_Slavesbut is not nil && this == nil") - } - if len(this.Slaves) != len(that1.Slaves) { - return fmt.Errorf("Slaves this(%v) Not Equal that(%v)", len(this.Slaves), len(that1.Slaves)) - } - for i := range this.Slaves { - if !this.Slaves[i].Equal(that1.Slaves[i]) { - return fmt.Errorf("Slaves this[%v](%v) Not Equal that[%v](%v)", i, this.Slaves[i], i, that1.Slaves[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_Slaves) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Registry_Slaves) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Slaves) != len(that1.Slaves) { - return false - } - for i := range this.Slaves { - if !this.Slaves[i].Equal(that1.Slaves[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 = append(s, "&mesosproto.Registry{") - if this.Master != nil { - s = append(s, "Master: "+fmt.Sprintf("%#v", this.Master)+",\n") - } - if this.Slaves != nil { - s = append(s, "Slaves: "+fmt.Sprintf("%#v", this.Slaves)+",\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_Master) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Registry_Master{") - 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_Slave) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Registry_Slave{") - 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_Slaves) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Registry_Slaves{") - if this.Slaves != nil { - s = append(s, "Slaves: "+fmt.Sprintf("%#v", this.Slaves)+",\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() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringRegistry(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 *Registry) 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) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Master != nil { - data[i] = 0xa - i++ - i = encodeVarintRegistry(data, i, uint64(m.Master.Size())) - n1, err := m.Master.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Slaves != nil { - data[i] = 0x12 - i++ - i = encodeVarintRegistry(data, i, uint64(m.Slaves.Size())) - n2, err := m.Slaves.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 (m *Registry_Master) 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_Master) 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())) - n3, err := m.Info.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 *Registry_Slave) 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_Slave) 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())) - n4, err := m.Info.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Registry_Slaves) 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_Slaves) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Slaves) > 0 { - for _, msg := range m.Slaves { - 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) - 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 encodeFixed32Registry(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 encodeVarintRegistry(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 NewPopulatedRegistry(r randyRegistry, easy bool) *Registry { - this := &Registry{} - if r.Intn(10) != 0 { - this.Master = NewPopulatedRegistry_Master(r, easy) - } - if r.Intn(10) != 0 { - this.Slaves = NewPopulatedRegistry_Slaves(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRegistry(r, 3) - } - return this -} - -func NewPopulatedRegistry_Master(r randyRegistry, easy bool) *Registry_Master { - this := &Registry_Master{} - this.Info = NewPopulatedMasterInfo(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRegistry(r, 2) - } - return this -} - -func NewPopulatedRegistry_Slave(r randyRegistry, easy bool) *Registry_Slave { - this := &Registry_Slave{} - this.Info = NewPopulatedSlaveInfo(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRegistry(r, 2) - } - return this -} - -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++ { - this.Slaves[i] = NewPopulatedRegistry_Slave(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 -} - -func randUTF8RuneRegistry(r randyRegistry) 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 randStringRegistry(r randyRegistry) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneRegistry(r) - } - return string(tmps) -} -func randUnrecognizedRegistry(r randyRegistry, 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 = randFieldRegistry(data, r, fieldNumber, wire) - } - return data -} -func randFieldRegistry(data []byte, r randyRegistry, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateRegistry(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateRegistry(data, uint64(v3)) - 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))) - case 2: - data = encodeVarintPopulateRegistry(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateRegistry(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateRegistry(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 encodeVarintPopulateRegistry(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 *Registry) Size() (n int) { - var l int - _ = l - if m.Master != nil { - l = m.Master.Size() - n += 1 + l + sovRegistry(uint64(l)) - } - if m.Slaves != nil { - l = m.Slaves.Size() - n += 1 + l + sovRegistry(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Registry_Master) 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_Slave) 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_Slaves) Size() (n int) { - var l int - _ = l - if len(m.Slaves) > 0 { - for _, e := range m.Slaves { - 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++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozRegistry(x uint64) (n int) { - return sovRegistry(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Registry) String() string { - if this == nil { - return "nil" - } - 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) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Registry_Master) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Registry_Master{`, - `Info:` + strings.Replace(fmt.Sprintf("%v", this.Info), "MasterInfo", "MasterInfo", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Registry_Slave) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Registry_Slave{`, - `Info:` + strings.Replace(fmt.Sprintf("%v", this.Info), "SlaveInfo", "SlaveInfo", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Registry_Slaves) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Registry_Slaves{`, - `Slaves:` + strings.Replace(fmt.Sprintf("%v", this.Slaves), "Registry_Slave", "Registry_Slave", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringRegistry(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Registry) 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 - } - 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 Master", 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 ErrInvalidLengthRegistry - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Master == nil { - m.Master = &Registry_Master{} - } - if err := m.Master.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Slaves", 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 ErrInvalidLengthRegistry - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Slaves == nil { - m.Slaves = &Registry_Slaves{} - } - if err := m.Slaves.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - 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 - } - } - - return nil -} -func (m *Registry_Master) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", 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 ErrInvalidLengthRegistry - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Info == nil { - m.Info = &MasterInfo{} - } - if err := m.Info.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 - 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") - } - - return nil -} -func (m *Registry_Slave) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", 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 ErrInvalidLengthRegistry - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Info == nil { - m.Info = &SlaveInfo{} - } - if err := m.Info.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 - 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") - } - - return nil -} -func (m *Registry_Slaves) 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 - } - 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 Slaves", 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 ErrInvalidLengthRegistry - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Slaves = append(m.Slaves, &Registry_Slave{}) - if err := m.Slaves[len(m.Slaves)-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 - 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 - } - } - - return nil -} -func skipRegistry(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - 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 { - 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 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, ErrInvalidLengthRegistry - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - 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 := skipRegistry(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 ( - ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling") -) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.proto deleted file mode 100644 index e9bc34b1806..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.proto +++ /dev/null @@ -1,54 +0,0 @@ -/** - * 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; - -message Registry { - message Master { - required MasterInfo info = 1; - } - - message Slave { - required SlaveInfo info = 1; - } - - message Slaves { - repeated Slave slaves = 1; - } - - // Most recent leading master. - optional Master master = 1; - - // All admitted slaves. - optional Slaves slaves = 2; -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler/scheduler.pb.go similarity index 86% rename from Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.pb.go rename to Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler/scheduler.pb.go index 06718346699..486868eb605 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler/scheduler.pb.go @@ -1,12 +1,23 @@ // Code generated by protoc-gen-gogo. -// source: scheduler.proto +// source: scheduler/scheduler.proto // DO NOT EDIT! -package mesosproto +/* + Package scheduler is a generated protocol buffer package. + + It is generated from these files: + scheduler/scheduler.proto + + It has these top-level messages: + Event + Call +*/ +package scheduler import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import mesosproto "github.com/mesos/mesos-go/mesosproto" // discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" @@ -101,6 +112,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 +127,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 +141,7 @@ var Call_Type_value = map[string]int32{ "RECONCILE": 9, "MESSAGE": 10, "REQUEST": 11, + "SUPPRESS": 12, } func (x Call_Type) Enum() *Call_Type { @@ -156,7 +170,7 @@ func (x *Call_Type) UnmarshalJSON(data []byte) error { type Event struct { // Type of the event, indicates which optional field below should be // present if that type has a nested message definition. - Type *Event_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Event_Type" json:"type,omitempty"` + Type *Event_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.scheduler.Event_Type" json:"type,omitempty"` Subscribed *Event_Subscribed `protobuf:"bytes,2,opt,name=subscribed" json:"subscribed,omitempty"` Offers *Event_Offers `protobuf:"bytes,3,opt,name=offers" json:"offers,omitempty"` Rescind *Event_Rescind `protobuf:"bytes,4,opt,name=rescind" json:"rescind,omitempty"` @@ -228,11 +242,9 @@ func (m *Event) GetError() *Event_Error { // First event received when the scheduler subscribes. type Event_Subscribed struct { - FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` + FrameworkId *mesosproto.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:"-"` } @@ -240,7 +252,7 @@ type Event_Subscribed struct { func (m *Event_Subscribed) Reset() { *m = Event_Subscribed{} } func (*Event_Subscribed) ProtoMessage() {} -func (m *Event_Subscribed) GetFrameworkId() *FrameworkID { +func (m *Event_Subscribed) GetFrameworkId() *mesosproto.FrameworkID { if m != nil { return m.FrameworkId } @@ -255,37 +267,48 @@ 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 []*mesosproto.Offer `protobuf:"bytes,1,rep,name=offers" json:"offers,omitempty"` + InverseOffers []*mesosproto.InverseOffer `protobuf:"bytes,2,rep,name=inverse_offers" json:"inverse_offers,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Event_Offers) Reset() { *m = Event_Offers{} } func (*Event_Offers) ProtoMessage() {} -func (m *Event_Offers) GetOffers() []*Offer { +func (m *Event_Offers) GetOffers() []*mesosproto.Offer { if m != nil { return m.Offers } return nil } +func (m *Event_Offers) GetInverseOffers() []*mesosproto.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 // by the scheduler regarding this offer will be invalid. type Event_Rescind struct { - OfferId *OfferID `protobuf:"bytes,1,req,name=offer_id" json:"offer_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + OfferId *mesosproto.OfferID `protobuf:"bytes,1,req,name=offer_id" json:"offer_id,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Event_Rescind) Reset() { *m = Event_Rescind{} } func (*Event_Rescind) ProtoMessage() {} -func (m *Event_Rescind) GetOfferId() *OfferID { +func (m *Event_Rescind) GetOfferId() *mesosproto.OfferID { if m != nil { return m.OfferId } @@ -302,14 +325,14 @@ func (m *Event_Rescind) GetOfferId() *OfferID { // explicitly acknowledge the receipt of a status update. See // 'Acknowledge' in the 'Call' section below for the semantics. type Event_Update struct { - Status *TaskStatus `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + Status *mesosproto.TaskStatus `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Event_Update) Reset() { *m = Event_Update{} } func (*Event_Update) ProtoMessage() {} -func (m *Event_Update) GetStatus() *TaskStatus { +func (m *Event_Update) GetStatus() *mesosproto.TaskStatus { if m != nil { return m.Status } @@ -322,23 +345,23 @@ func (m *Event_Update) GetStatus() *TaskStatus { // guarantees) to the scheduler. It is up to the executor to retry // if the message is dropped for any reason. type Event_Message struct { - SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` - ExecutorId *ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"` - Data []byte `protobuf:"bytes,3,req,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` + SlaveId *mesosproto.SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` + ExecutorId *mesosproto.ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"` + Data []byte `protobuf:"bytes,3,req,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Event_Message) Reset() { *m = Event_Message{} } func (*Event_Message) ProtoMessage() {} -func (m *Event_Message) GetSlaveId() *SlaveID { +func (m *Event_Message) GetSlaveId() *mesosproto.SlaveID { if m != nil { return m.SlaveId } return nil } -func (m *Event_Message) GetExecutorId() *ExecutorID { +func (m *Event_Message) GetExecutorId() *mesosproto.ExecutorID { if m != nil { return m.ExecutorId } @@ -363,26 +386,26 @@ func (m *Event_Message) GetData() []byte { // TODO(vinod): Consider splitting the lost slave and terminated // executor into separate events and ensure it's reliably generated. type Event_Failure struct { - SlaveId *SlaveID `protobuf:"bytes,1,opt,name=slave_id" json:"slave_id,omitempty"` + SlaveId *mesosproto.SlaveID `protobuf:"bytes,1,opt,name=slave_id" json:"slave_id,omitempty"` // If this was just a failure of an executor on a slave then // 'executor_id' will be set and possibly 'status' (if we were // able to determine the exit status). - ExecutorId *ExecutorID `protobuf:"bytes,2,opt,name=executor_id" json:"executor_id,omitempty"` - Status *int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + ExecutorId *mesosproto.ExecutorID `protobuf:"bytes,2,opt,name=executor_id" json:"executor_id,omitempty"` + Status *int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Event_Failure) Reset() { *m = Event_Failure{} } func (*Event_Failure) ProtoMessage() {} -func (m *Event_Failure) GetSlaveId() *SlaveID { +func (m *Event_Failure) GetSlaveId() *mesosproto.SlaveID { if m != nil { return m.SlaveId } return nil } -func (m *Event_Failure) GetExecutorId() *ExecutorID { +func (m *Event_Failure) GetExecutorId() *mesosproto.ExecutorID { if m != nil { return m.ExecutorId } @@ -430,10 +453,10 @@ type Call struct { // FrameworkInfo (in any further 'Subscribe' calls). This allows the // master to identify a scheduler correctly across disconnections, // failovers, etc. - FrameworkId *FrameworkID `protobuf:"bytes,1,opt,name=framework_id" json:"framework_id,omitempty"` + FrameworkId *mesosproto.FrameworkID `protobuf:"bytes,1,opt,name=framework_id" json:"framework_id,omitempty"` // Type of the call, indicates which optional field below should be // present if that type has a nested message definition. - Type *Call_Type `protobuf:"varint,2,req,name=type,enum=mesosproto.Call_Type" json:"type,omitempty"` + Type *Call_Type `protobuf:"varint,2,req,name=type,enum=mesosproto.scheduler.Call_Type" json:"type,omitempty"` Subscribe *Call_Subscribe `protobuf:"bytes,3,opt,name=subscribe" json:"subscribe,omitempty"` Accept *Call_Accept `protobuf:"bytes,4,opt,name=accept" json:"accept,omitempty"` Decline *Call_Decline `protobuf:"bytes,5,opt,name=decline" json:"decline,omitempty"` @@ -449,7 +472,7 @@ type Call struct { func (m *Call) Reset() { *m = Call{} } func (*Call) ProtoMessage() {} -func (m *Call) GetFrameworkId() *FrameworkID { +func (m *Call) GetFrameworkId() *mesosproto.FrameworkID { if m != nil { return m.FrameworkId } @@ -532,7 +555,7 @@ func (m *Call) GetRequest() *Call_Request { type Call_Subscribe struct { // See the comments below on 'framework_id' on the semantics for // 'framework_info.id'. - FrameworkInfo *FrameworkInfo `protobuf:"bytes,1,req,name=framework_info" json:"framework_info,omitempty"` + FrameworkInfo *mesosproto.FrameworkInfo `protobuf:"bytes,1,req,name=framework_info" json:"framework_info,omitempty"` // 'force' field is only relevant when 'framework_info.id' is set. // It tells the master what to do in case an instance of the // scheduler attempts to subscribe when another instance of it is @@ -553,7 +576,7 @@ type Call_Subscribe struct { func (m *Call_Subscribe) Reset() { *m = Call_Subscribe{} } func (*Call_Subscribe) ProtoMessage() {} -func (m *Call_Subscribe) GetFrameworkInfo() *FrameworkInfo { +func (m *Call_Subscribe) GetFrameworkInfo() *mesosproto.FrameworkInfo { if m != nil { return m.FrameworkInfo } @@ -589,30 +612,30 @@ func (m *Call_Subscribe) GetForce() bool { // reoffered to other frameworks. In other words, the same OfferID // cannot be used in more than one 'Accept' call. type Call_Accept struct { - OfferIds []*OfferID `protobuf:"bytes,1,rep,name=offer_ids" json:"offer_ids,omitempty"` - Operations []*Offer_Operation `protobuf:"bytes,2,rep,name=operations" json:"operations,omitempty"` - Filters *Filters `protobuf:"bytes,3,opt,name=filters" json:"filters,omitempty"` - XXX_unrecognized []byte `json:"-"` + OfferIds []*mesosproto.OfferID `protobuf:"bytes,1,rep,name=offer_ids" json:"offer_ids,omitempty"` + Operations []*mesosproto.Offer_Operation `protobuf:"bytes,2,rep,name=operations" json:"operations,omitempty"` + Filters *mesosproto.Filters `protobuf:"bytes,3,opt,name=filters" json:"filters,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Accept) Reset() { *m = Call_Accept{} } func (*Call_Accept) ProtoMessage() {} -func (m *Call_Accept) GetOfferIds() []*OfferID { +func (m *Call_Accept) GetOfferIds() []*mesosproto.OfferID { if m != nil { return m.OfferIds } return nil } -func (m *Call_Accept) GetOperations() []*Offer_Operation { +func (m *Call_Accept) GetOperations() []*mesosproto.Offer_Operation { if m != nil { return m.Operations } return nil } -func (m *Call_Accept) GetFilters() *Filters { +func (m *Call_Accept) GetFilters() *mesosproto.Filters { if m != nil { return m.Filters } @@ -624,22 +647,22 @@ func (m *Call_Accept) GetFilters() *Filters { // as sending an Accept call with no operations. See comments on // top of 'Accept' for semantics. type Call_Decline struct { - OfferIds []*OfferID `protobuf:"bytes,1,rep,name=offer_ids" json:"offer_ids,omitempty"` - Filters *Filters `protobuf:"bytes,2,opt,name=filters" json:"filters,omitempty"` - XXX_unrecognized []byte `json:"-"` + OfferIds []*mesosproto.OfferID `protobuf:"bytes,1,rep,name=offer_ids" json:"offer_ids,omitempty"` + Filters *mesosproto.Filters `protobuf:"bytes,2,opt,name=filters" json:"filters,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Decline) Reset() { *m = Call_Decline{} } func (*Call_Decline) ProtoMessage() {} -func (m *Call_Decline) GetOfferIds() []*OfferID { +func (m *Call_Decline) GetOfferIds() []*mesosproto.OfferID { if m != nil { return m.OfferIds } return nil } -func (m *Call_Decline) GetFilters() *Filters { +func (m *Call_Decline) GetFilters() *mesosproto.Filters { if m != nil { return m.Filters } @@ -654,22 +677,22 @@ func (m *Call_Decline) GetFilters() *Filters { // If the task is unknown to the master, a TASK_LOST update is // generated. type Call_Kill struct { - TaskId *TaskID `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"` - SlaveId *SlaveID `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + TaskId *mesosproto.TaskID `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"` + SlaveId *mesosproto.SlaveID `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Kill) Reset() { *m = Call_Kill{} } func (*Call_Kill) ProtoMessage() {} -func (m *Call_Kill) GetTaskId() *TaskID { +func (m *Call_Kill) GetTaskId() *mesosproto.TaskID { if m != nil { return m.TaskId } return nil } -func (m *Call_Kill) GetSlaveId() *SlaveID { +func (m *Call_Kill) GetSlaveId() *mesosproto.SlaveID { if m != nil { return m.SlaveId } @@ -684,22 +707,22 @@ func (m *Call_Kill) GetSlaveId() *SlaveID { // forcefully destroy the container (executor and its tasks) and // transition its active tasks to TASK_LOST. type Call_Shutdown struct { - ExecutorId *ExecutorID `protobuf:"bytes,1,req,name=executor_id" json:"executor_id,omitempty"` - SlaveId *SlaveID `protobuf:"bytes,2,req,name=slave_id" json:"slave_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + ExecutorId *mesosproto.ExecutorID `protobuf:"bytes,1,req,name=executor_id" json:"executor_id,omitempty"` + SlaveId *mesosproto.SlaveID `protobuf:"bytes,2,req,name=slave_id" json:"slave_id,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Shutdown) Reset() { *m = Call_Shutdown{} } func (*Call_Shutdown) ProtoMessage() {} -func (m *Call_Shutdown) GetExecutorId() *ExecutorID { +func (m *Call_Shutdown) GetExecutorId() *mesosproto.ExecutorID { if m != nil { return m.ExecutorId } return nil } -func (m *Call_Shutdown) GetSlaveId() *SlaveID { +func (m *Call_Shutdown) GetSlaveId() *mesosproto.SlaveID { if m != nil { return m.SlaveId } @@ -712,23 +735,23 @@ func (m *Call_Shutdown) GetSlaveId() *SlaveID { // updates are retried by the slave until they are acknowledged by // the scheduler. type Call_Acknowledge struct { - SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` - TaskId *TaskID `protobuf:"bytes,2,req,name=task_id" json:"task_id,omitempty"` - Uuid []byte `protobuf:"bytes,3,req,name=uuid" json:"uuid,omitempty"` - XXX_unrecognized []byte `json:"-"` + SlaveId *mesosproto.SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` + TaskId *mesosproto.TaskID `protobuf:"bytes,2,req,name=task_id" json:"task_id,omitempty"` + Uuid []byte `protobuf:"bytes,3,req,name=uuid" json:"uuid,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Acknowledge) Reset() { *m = Call_Acknowledge{} } func (*Call_Acknowledge) ProtoMessage() {} -func (m *Call_Acknowledge) GetSlaveId() *SlaveID { +func (m *Call_Acknowledge) GetSlaveId() *mesosproto.SlaveID { if m != nil { return m.SlaveId } return nil } -func (m *Call_Acknowledge) GetTaskId() *TaskID { +func (m *Call_Acknowledge) GetTaskId() *mesosproto.TaskID { if m != nil { return m.TaskId } @@ -765,22 +788,22 @@ func (m *Call_Reconcile) GetTasks() []*Call_Reconcile_Task { // TODO(vinod): Support arbitrary queries than just state of tasks. type Call_Reconcile_Task struct { - TaskId *TaskID `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"` - SlaveId *SlaveID `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + TaskId *mesosproto.TaskID `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"` + SlaveId *mesosproto.SlaveID `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Reconcile_Task) Reset() { *m = Call_Reconcile_Task{} } func (*Call_Reconcile_Task) ProtoMessage() {} -func (m *Call_Reconcile_Task) GetTaskId() *TaskID { +func (m *Call_Reconcile_Task) GetTaskId() *mesosproto.TaskID { if m != nil { return m.TaskId } return nil } -func (m *Call_Reconcile_Task) GetSlaveId() *SlaveID { +func (m *Call_Reconcile_Task) GetSlaveId() *mesosproto.SlaveID { if m != nil { return m.SlaveId } @@ -791,23 +814,23 @@ func (m *Call_Reconcile_Task) GetSlaveId() *SlaveID { // neither interprets this data nor makes any guarantees about the // delivery of this message to the executor. type Call_Message struct { - SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` - ExecutorId *ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"` - Data []byte `protobuf:"bytes,3,req,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` + SlaveId *mesosproto.SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` + ExecutorId *mesosproto.ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"` + Data []byte `protobuf:"bytes,3,req,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Message) Reset() { *m = Call_Message{} } func (*Call_Message) ProtoMessage() {} -func (m *Call_Message) GetSlaveId() *SlaveID { +func (m *Call_Message) GetSlaveId() *mesosproto.SlaveID { if m != nil { return m.SlaveId } return nil } -func (m *Call_Message) GetExecutorId() *ExecutorID { +func (m *Call_Message) GetExecutorId() *mesosproto.ExecutorID { if m != nil { return m.ExecutorId } @@ -828,14 +851,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 []*mesosproto.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() []*mesosproto.Request { if m != nil { return m.Requests } @@ -843,8 +866,8 @@ func (m *Call_Request) GetRequests() []*Request { } func init() { - proto.RegisterEnum("mesosproto.Event_Type", Event_Type_name, Event_Type_value) - proto.RegisterEnum("mesosproto.Call_Type", Call_Type_name, Call_Type_value) + proto.RegisterEnum("mesosproto.scheduler.Event_Type", Event_Type_name, Event_Type_value) + proto.RegisterEnum("mesosproto.scheduler.Call_Type", Call_Type_name, Call_Type_value) } func (this *Event) VerboseEqual(that interface{}) error { if that == nil { @@ -1058,6 +1081,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 +1122,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 } @@ -2245,9 +2284,9 @@ func (this *Event) GoString() string { return "nil" } s := make([]string, 0, 12) - s = append(s, "&mesosproto.Event{") + s = append(s, "&scheduler.Event{") if this.Type != nil { - s = append(s, "Type: "+valueToGoStringScheduler(this.Type, "mesosproto.Event_Type")+",\n") + s = append(s, "Type: "+valueToGoStringScheduler(this.Type, "scheduler.Event_Type")+",\n") } if this.Subscribed != nil { s = append(s, "Subscribed: "+fmt.Sprintf("%#v", this.Subscribed)+",\n") @@ -2281,7 +2320,7 @@ func (this *Event_Subscribed) GoString() string { return "nil" } s := make([]string, 0, 6) - s = append(s, "&mesosproto.Event_Subscribed{") + s = append(s, "&scheduler.Event_Subscribed{") if this.FrameworkId != nil { s = append(s, "FrameworkId: "+fmt.Sprintf("%#v", this.FrameworkId)+",\n") } @@ -2298,11 +2337,14 @@ func (this *Event_Offers) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Event_Offers{") + s := make([]string, 0, 6) + s = append(s, "&scheduler.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") } @@ -2314,7 +2356,7 @@ func (this *Event_Rescind) GoString() string { return "nil" } s := make([]string, 0, 5) - s = append(s, "&mesosproto.Event_Rescind{") + s = append(s, "&scheduler.Event_Rescind{") if this.OfferId != nil { s = append(s, "OfferId: "+fmt.Sprintf("%#v", this.OfferId)+",\n") } @@ -2329,7 +2371,7 @@ func (this *Event_Update) GoString() string { return "nil" } s := make([]string, 0, 5) - s = append(s, "&mesosproto.Event_Update{") + s = append(s, "&scheduler.Event_Update{") if this.Status != nil { s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") } @@ -2344,7 +2386,7 @@ func (this *Event_Message) GoString() string { return "nil" } s := make([]string, 0, 7) - s = append(s, "&mesosproto.Event_Message{") + s = append(s, "&scheduler.Event_Message{") if this.SlaveId != nil { s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") } @@ -2365,7 +2407,7 @@ func (this *Event_Failure) GoString() string { return "nil" } s := make([]string, 0, 7) - s = append(s, "&mesosproto.Event_Failure{") + s = append(s, "&scheduler.Event_Failure{") if this.SlaveId != nil { s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") } @@ -2386,7 +2428,7 @@ func (this *Event_Error) GoString() string { return "nil" } s := make([]string, 0, 5) - s = append(s, "&mesosproto.Event_Error{") + s = append(s, "&scheduler.Event_Error{") if this.Message != nil { s = append(s, "Message: "+valueToGoStringScheduler(this.Message, "string")+",\n") } @@ -2401,12 +2443,12 @@ func (this *Call) GoString() string { return "nil" } s := make([]string, 0, 15) - s = append(s, "&mesosproto.Call{") + s = append(s, "&scheduler.Call{") if this.FrameworkId != nil { s = append(s, "FrameworkId: "+fmt.Sprintf("%#v", this.FrameworkId)+",\n") } if this.Type != nil { - s = append(s, "Type: "+valueToGoStringScheduler(this.Type, "mesosproto.Call_Type")+",\n") + s = append(s, "Type: "+valueToGoStringScheduler(this.Type, "scheduler.Call_Type")+",\n") } if this.Subscribe != nil { s = append(s, "Subscribe: "+fmt.Sprintf("%#v", this.Subscribe)+",\n") @@ -2446,7 +2488,7 @@ func (this *Call_Subscribe) GoString() string { return "nil" } s := make([]string, 0, 6) - s = append(s, "&mesosproto.Call_Subscribe{") + s = append(s, "&scheduler.Call_Subscribe{") if this.FrameworkInfo != nil { s = append(s, "FrameworkInfo: "+fmt.Sprintf("%#v", this.FrameworkInfo)+",\n") } @@ -2464,7 +2506,7 @@ func (this *Call_Accept) GoString() string { return "nil" } s := make([]string, 0, 7) - s = append(s, "&mesosproto.Call_Accept{") + s = append(s, "&scheduler.Call_Accept{") if this.OfferIds != nil { s = append(s, "OfferIds: "+fmt.Sprintf("%#v", this.OfferIds)+",\n") } @@ -2485,7 +2527,7 @@ func (this *Call_Decline) GoString() string { return "nil" } s := make([]string, 0, 6) - s = append(s, "&mesosproto.Call_Decline{") + s = append(s, "&scheduler.Call_Decline{") if this.OfferIds != nil { s = append(s, "OfferIds: "+fmt.Sprintf("%#v", this.OfferIds)+",\n") } @@ -2503,7 +2545,7 @@ func (this *Call_Kill) GoString() string { return "nil" } s := make([]string, 0, 6) - s = append(s, "&mesosproto.Call_Kill{") + s = append(s, "&scheduler.Call_Kill{") if this.TaskId != nil { s = append(s, "TaskId: "+fmt.Sprintf("%#v", this.TaskId)+",\n") } @@ -2521,7 +2563,7 @@ func (this *Call_Shutdown) GoString() string { return "nil" } s := make([]string, 0, 6) - s = append(s, "&mesosproto.Call_Shutdown{") + s = append(s, "&scheduler.Call_Shutdown{") if this.ExecutorId != nil { s = append(s, "ExecutorId: "+fmt.Sprintf("%#v", this.ExecutorId)+",\n") } @@ -2539,7 +2581,7 @@ func (this *Call_Acknowledge) GoString() string { return "nil" } s := make([]string, 0, 7) - s = append(s, "&mesosproto.Call_Acknowledge{") + s = append(s, "&scheduler.Call_Acknowledge{") if this.SlaveId != nil { s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") } @@ -2560,7 +2602,7 @@ func (this *Call_Reconcile) GoString() string { return "nil" } s := make([]string, 0, 5) - s = append(s, "&mesosproto.Call_Reconcile{") + s = append(s, "&scheduler.Call_Reconcile{") if this.Tasks != nil { s = append(s, "Tasks: "+fmt.Sprintf("%#v", this.Tasks)+",\n") } @@ -2575,7 +2617,7 @@ func (this *Call_Reconcile_Task) GoString() string { return "nil" } s := make([]string, 0, 6) - s = append(s, "&mesosproto.Call_Reconcile_Task{") + s = append(s, "&scheduler.Call_Reconcile_Task{") if this.TaskId != nil { s = append(s, "TaskId: "+fmt.Sprintf("%#v", this.TaskId)+",\n") } @@ -2593,7 +2635,7 @@ func (this *Call_Message) GoString() string { return "nil" } s := make([]string, 0, 7) - s = append(s, "&mesosproto.Call_Message{") + s = append(s, "&scheduler.Call_Message{") if this.SlaveId != nil { s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") } @@ -2614,7 +2656,7 @@ func (this *Call_Request) GoString() string { return "nil" } s := make([]string, 0, 5) - s = append(s, "&mesosproto.Call_Request{") + s = append(s, "&scheduler.Call_Request{") if this.Requests != nil { s = append(s, "Requests: "+fmt.Sprintf("%#v", this.Requests)+",\n") } @@ -2812,6 +2854,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) } @@ -3644,7 +3698,7 @@ func NewPopulatedEvent(r randyScheduler, easy bool) *Event { func NewPopulatedEvent_Subscribed(r randyScheduler, easy bool) *Event_Subscribed { this := &Event_Subscribed{} - this.FrameworkId = NewPopulatedFrameworkID(r, easy) + this.FrameworkId = mesosproto.NewPopulatedFrameworkID(r, easy) if r.Intn(10) != 0 { v2 := float64(r.Float64()) if r.Intn(2) == 0 { @@ -3662,20 +3716,27 @@ func NewPopulatedEvent_Offers(r randyScheduler, easy bool) *Event_Offers { this := &Event_Offers{} if r.Intn(10) != 0 { v3 := r.Intn(10) - this.Offers = make([]*Offer, v3) + this.Offers = make([]*mesosproto.Offer, v3) for i := 0; i < v3; i++ { - this.Offers[i] = NewPopulatedOffer(r, easy) + this.Offers[i] = mesosproto.NewPopulatedOffer(r, easy) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.InverseOffers = make([]*mesosproto.InverseOffer, v4) + for i := 0; i < v4; i++ { + this.InverseOffers[i] = mesosproto.NewPopulatedInverseOffer(r, easy) } } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedScheduler(r, 2) + this.XXX_unrecognized = randUnrecognizedScheduler(r, 3) } return this } func NewPopulatedEvent_Rescind(r randyScheduler, easy bool) *Event_Rescind { this := &Event_Rescind{} - this.OfferId = NewPopulatedOfferID(r, easy) + this.OfferId = mesosproto.NewPopulatedOfferID(r, easy) if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 2) } @@ -3684,7 +3745,7 @@ func NewPopulatedEvent_Rescind(r randyScheduler, easy bool) *Event_Rescind { func NewPopulatedEvent_Update(r randyScheduler, easy bool) *Event_Update { this := &Event_Update{} - this.Status = NewPopulatedTaskStatus(r, easy) + this.Status = mesosproto.NewPopulatedTaskStatus(r, easy) if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 2) } @@ -3693,11 +3754,11 @@ func NewPopulatedEvent_Update(r randyScheduler, easy bool) *Event_Update { 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++ { + this.SlaveId = mesosproto.NewPopulatedSlaveID(r, easy) + this.ExecutorId = mesosproto.NewPopulatedExecutorID(r, easy) + 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 { @@ -3709,17 +3770,17 @@ func NewPopulatedEvent_Message(r randyScheduler, easy bool) *Event_Message { func NewPopulatedEvent_Failure(r randyScheduler, easy bool) *Event_Failure { this := &Event_Failure{} if r.Intn(10) != 0 { - this.SlaveId = NewPopulatedSlaveID(r, easy) + this.SlaveId = mesosproto.NewPopulatedSlaveID(r, easy) } if r.Intn(10) != 0 { - this.ExecutorId = NewPopulatedExecutorID(r, easy) + this.ExecutorId = mesosproto.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 +3790,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) } @@ -3740,10 +3801,10 @@ func NewPopulatedEvent_Error(r randyScheduler, easy bool) *Event_Error { func NewPopulatedCall(r randyScheduler, easy bool) *Call { this := &Call{} if r.Intn(10) != 0 { - this.FrameworkId = NewPopulatedFrameworkID(r, easy) + this.FrameworkId = mesosproto.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) } @@ -3779,10 +3840,10 @@ func NewPopulatedCall(r randyScheduler, easy bool) *Call { func NewPopulatedCall_Subscribe(r randyScheduler, easy bool) *Call_Subscribe { this := &Call_Subscribe{} - this.FrameworkInfo = NewPopulatedFrameworkInfo(r, easy) + this.FrameworkInfo = mesosproto.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) @@ -3792,22 +3853,22 @@ 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++ { - this.OfferIds[i] = NewPopulatedOfferID(r, easy) - } - } if r.Intn(10) != 0 { v10 := r.Intn(10) - this.Operations = make([]*Offer_Operation, v10) + this.OfferIds = make([]*mesosproto.OfferID, v10) for i := 0; i < v10; i++ { - this.Operations[i] = NewPopulatedOffer_Operation(r, easy) + this.OfferIds[i] = mesosproto.NewPopulatedOfferID(r, easy) } } if r.Intn(10) != 0 { - this.Filters = NewPopulatedFilters(r, easy) + v11 := r.Intn(10) + this.Operations = make([]*mesosproto.Offer_Operation, v11) + for i := 0; i < v11; i++ { + this.Operations[i] = mesosproto.NewPopulatedOffer_Operation(r, easy) + } + } + if r.Intn(10) != 0 { + this.Filters = mesosproto.NewPopulatedFilters(r, easy) } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 4) @@ -3818,14 +3879,14 @@ 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++ { - this.OfferIds[i] = NewPopulatedOfferID(r, easy) + v12 := r.Intn(10) + this.OfferIds = make([]*mesosproto.OfferID, v12) + for i := 0; i < v12; i++ { + this.OfferIds[i] = mesosproto.NewPopulatedOfferID(r, easy) } } if r.Intn(10) != 0 { - this.Filters = NewPopulatedFilters(r, easy) + this.Filters = mesosproto.NewPopulatedFilters(r, easy) } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 3) @@ -3835,9 +3896,9 @@ func NewPopulatedCall_Decline(r randyScheduler, easy bool) *Call_Decline { func NewPopulatedCall_Kill(r randyScheduler, easy bool) *Call_Kill { this := &Call_Kill{} - this.TaskId = NewPopulatedTaskID(r, easy) + this.TaskId = mesosproto.NewPopulatedTaskID(r, easy) if r.Intn(10) != 0 { - this.SlaveId = NewPopulatedSlaveID(r, easy) + this.SlaveId = mesosproto.NewPopulatedSlaveID(r, easy) } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 3) @@ -3847,8 +3908,8 @@ func NewPopulatedCall_Kill(r randyScheduler, easy bool) *Call_Kill { func NewPopulatedCall_Shutdown(r randyScheduler, easy bool) *Call_Shutdown { this := &Call_Shutdown{} - this.ExecutorId = NewPopulatedExecutorID(r, easy) - this.SlaveId = NewPopulatedSlaveID(r, easy) + this.ExecutorId = mesosproto.NewPopulatedExecutorID(r, easy) + this.SlaveId = mesosproto.NewPopulatedSlaveID(r, easy) if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 3) } @@ -3857,11 +3918,11 @@ func NewPopulatedCall_Shutdown(r randyScheduler, easy bool) *Call_Shutdown { 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++ { + this.SlaveId = mesosproto.NewPopulatedSlaveID(r, easy) + this.TaskId = mesosproto.NewPopulatedTaskID(r, easy) + 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 +3934,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) } } @@ -3887,9 +3948,9 @@ func NewPopulatedCall_Reconcile(r randyScheduler, easy bool) *Call_Reconcile { func NewPopulatedCall_Reconcile_Task(r randyScheduler, easy bool) *Call_Reconcile_Task { this := &Call_Reconcile_Task{} - this.TaskId = NewPopulatedTaskID(r, easy) + this.TaskId = mesosproto.NewPopulatedTaskID(r, easy) if r.Intn(10) != 0 { - this.SlaveId = NewPopulatedSlaveID(r, easy) + this.SlaveId = mesosproto.NewPopulatedSlaveID(r, easy) } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedScheduler(r, 3) @@ -3899,11 +3960,11 @@ func NewPopulatedCall_Reconcile_Task(r randyScheduler, easy bool) *Call_Reconcil 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++ { + this.SlaveId = mesosproto.NewPopulatedSlaveID(r, easy) + this.ExecutorId = mesosproto.NewPopulatedExecutorID(r, easy) + 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 +3976,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([]*mesosproto.Request, v16) + for i := 0; i < v16; i++ { + this.Requests[i] = mesosproto.NewPopulatedRequest(r, easy) } } if !easy && r.Intn(10) != 0 { @@ -3946,9 +4007,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 +4031,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 +4125,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) } @@ -4421,7 +4488,7 @@ func (this *Event_Subscribed) String() string { return "nil" } s := strings.Join([]string{`&Event_Subscribed{`, - `FrameworkId:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, + `FrameworkId:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkId), "FrameworkID", "mesosproto.FrameworkID", 1) + `,`, `HeartbeatIntervalSeconds:` + valueToStringScheduler(this.HeartbeatIntervalSeconds) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -4433,7 +4500,8 @@ func (this *Event_Offers) String() string { return "nil" } s := strings.Join([]string{`&Event_Offers{`, - `Offers:` + strings.Replace(fmt.Sprintf("%v", this.Offers), "Offer", "Offer", 1) + `,`, + `Offers:` + strings.Replace(fmt.Sprintf("%v", this.Offers), "Offer", "mesosproto.Offer", 1) + `,`, + `InverseOffers:` + strings.Replace(fmt.Sprintf("%v", this.InverseOffers), "InverseOffer", "mesosproto.InverseOffer", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4444,7 +4512,7 @@ func (this *Event_Rescind) String() string { return "nil" } s := strings.Join([]string{`&Event_Rescind{`, - `OfferId:` + strings.Replace(fmt.Sprintf("%v", this.OfferId), "OfferID", "OfferID", 1) + `,`, + `OfferId:` + strings.Replace(fmt.Sprintf("%v", this.OfferId), "OfferID", "mesosproto.OfferID", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4455,7 +4523,7 @@ func (this *Event_Update) String() string { return "nil" } s := strings.Join([]string{`&Event_Update{`, - `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "TaskStatus", "TaskStatus", 1) + `,`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "TaskStatus", "mesosproto.TaskStatus", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4466,8 +4534,8 @@ func (this *Event_Message) String() string { return "nil" } s := strings.Join([]string{`&Event_Message{`, - `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "mesosproto.SlaveID", 1) + `,`, + `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "mesosproto.ExecutorID", 1) + `,`, `Data:` + valueToStringScheduler(this.Data) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -4479,8 +4547,8 @@ func (this *Event_Failure) String() string { return "nil" } s := strings.Join([]string{`&Event_Failure{`, - `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "mesosproto.SlaveID", 1) + `,`, + `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "mesosproto.ExecutorID", 1) + `,`, `Status:` + valueToStringScheduler(this.Status) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -4503,7 +4571,7 @@ func (this *Call) String() string { return "nil" } s := strings.Join([]string{`&Call{`, - `FrameworkId:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, + `FrameworkId:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkId), "FrameworkID", "mesosproto.FrameworkID", 1) + `,`, `Type:` + valueToStringScheduler(this.Type) + `,`, `Subscribe:` + strings.Replace(fmt.Sprintf("%v", this.Subscribe), "Call_Subscribe", "Call_Subscribe", 1) + `,`, `Accept:` + strings.Replace(fmt.Sprintf("%v", this.Accept), "Call_Accept", "Call_Accept", 1) + `,`, @@ -4524,7 +4592,7 @@ func (this *Call_Subscribe) String() string { return "nil" } s := strings.Join([]string{`&Call_Subscribe{`, - `FrameworkInfo:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkInfo), "FrameworkInfo", "FrameworkInfo", 1) + `,`, + `FrameworkInfo:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkInfo), "FrameworkInfo", "mesosproto.FrameworkInfo", 1) + `,`, `Force:` + valueToStringScheduler(this.Force) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -4536,9 +4604,9 @@ func (this *Call_Accept) String() string { return "nil" } s := strings.Join([]string{`&Call_Accept{`, - `OfferIds:` + strings.Replace(fmt.Sprintf("%v", this.OfferIds), "OfferID", "OfferID", 1) + `,`, - `Operations:` + strings.Replace(fmt.Sprintf("%v", this.Operations), "Offer_Operation", "Offer_Operation", 1) + `,`, - `Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "Filters", "Filters", 1) + `,`, + `OfferIds:` + strings.Replace(fmt.Sprintf("%v", this.OfferIds), "OfferID", "mesosproto.OfferID", 1) + `,`, + `Operations:` + strings.Replace(fmt.Sprintf("%v", this.Operations), "Offer_Operation", "mesosproto.Offer_Operation", 1) + `,`, + `Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "Filters", "mesosproto.Filters", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4549,8 +4617,8 @@ func (this *Call_Decline) String() string { return "nil" } s := strings.Join([]string{`&Call_Decline{`, - `OfferIds:` + strings.Replace(fmt.Sprintf("%v", this.OfferIds), "OfferID", "OfferID", 1) + `,`, - `Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "Filters", "Filters", 1) + `,`, + `OfferIds:` + strings.Replace(fmt.Sprintf("%v", this.OfferIds), "OfferID", "mesosproto.OfferID", 1) + `,`, + `Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "Filters", "mesosproto.Filters", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4561,8 +4629,8 @@ func (this *Call_Kill) String() string { return "nil" } s := strings.Join([]string{`&Call_Kill{`, - `TaskId:` + strings.Replace(fmt.Sprintf("%v", this.TaskId), "TaskID", "TaskID", 1) + `,`, - `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, + `TaskId:` + strings.Replace(fmt.Sprintf("%v", this.TaskId), "TaskID", "mesosproto.TaskID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "mesosproto.SlaveID", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4573,8 +4641,8 @@ func (this *Call_Shutdown) String() string { return "nil" } s := strings.Join([]string{`&Call_Shutdown{`, - `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, - `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, + `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "mesosproto.ExecutorID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "mesosproto.SlaveID", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4585,8 +4653,8 @@ func (this *Call_Acknowledge) String() string { return "nil" } s := strings.Join([]string{`&Call_Acknowledge{`, - `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `TaskId:` + strings.Replace(fmt.Sprintf("%v", this.TaskId), "TaskID", "TaskID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "mesosproto.SlaveID", 1) + `,`, + `TaskId:` + strings.Replace(fmt.Sprintf("%v", this.TaskId), "TaskID", "mesosproto.TaskID", 1) + `,`, `Uuid:` + valueToStringScheduler(this.Uuid) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -4609,8 +4677,8 @@ func (this *Call_Reconcile_Task) String() string { return "nil" } s := strings.Join([]string{`&Call_Reconcile_Task{`, - `TaskId:` + strings.Replace(fmt.Sprintf("%v", this.TaskId), "TaskID", "TaskID", 1) + `,`, - `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, + `TaskId:` + strings.Replace(fmt.Sprintf("%v", this.TaskId), "TaskID", "mesosproto.TaskID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "mesosproto.SlaveID", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4621,8 +4689,8 @@ func (this *Call_Message) String() string { return "nil" } s := strings.Join([]string{`&Call_Message{`, - `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "mesosproto.SlaveID", 1) + `,`, + `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "mesosproto.ExecutorID", 1) + `,`, `Data:` + valueToStringScheduler(this.Data) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -4634,7 +4702,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), "Request", "mesosproto.Request", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4653,8 +4721,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 +4739,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 +4752,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 +4773,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 +4806,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 +4839,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 +4872,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 +4905,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 +4938,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 +4971,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 +4999,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 +5018,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 +5028,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 +5046,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 +5059,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 } @@ -4970,7 +5080,7 @@ func (m *Event_Subscribed) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.FrameworkId == nil { - m.FrameworkId = &FrameworkID{} + m.FrameworkId = &mesosproto.FrameworkID{} } if err := m.FrameworkId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -4997,15 +5107,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 +5126,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 +5153,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 +5166,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 } @@ -5068,21 +5186,44 @@ func (m *Event_Offers) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Offers = append(m.Offers, &Offer{}) + m.Offers = append(m.Offers, &mesosproto.Offer{}) if err := m.Offers[len(m.Offers)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { 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, &mesosproto.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 +5239,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 +5249,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 +5267,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 +5280,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 } @@ -5144,7 +5301,7 @@ func (m *Event_Rescind) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.OfferId == nil { - m.OfferId = &OfferID{} + m.OfferId = &mesosproto.OfferID{} } if err := m.OfferId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -5152,15 +5309,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 +5328,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 +5338,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 +5356,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 +5369,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 } @@ -5225,7 +5390,7 @@ func (m *Event_Update) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Status == nil { - m.Status = &TaskStatus{} + m.Status = &mesosproto.TaskStatus{} } if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -5233,15 +5398,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 +5417,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 +5427,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 +5445,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 +5458,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 } @@ -5306,7 +5479,7 @@ func (m *Event_Message) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.SlaveId == nil { - m.SlaveId = &SlaveID{} + m.SlaveId = &mesosproto.SlaveID{} } if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -5319,6 +5492,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 } @@ -5337,7 +5513,7 @@ func (m *Event_Message) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.ExecutorId == nil { - m.ExecutorId = &ExecutorID{} + m.ExecutorId = &mesosproto.ExecutorID{} } if err := m.ExecutorId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -5350,6 +5526,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 +5550,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 +5575,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 +5602,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 +5615,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 } @@ -5449,7 +5636,7 @@ func (m *Event_Failure) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.SlaveId == nil { - m.SlaveId = &SlaveID{} + m.SlaveId = &mesosproto.SlaveID{} } if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -5461,6 +5648,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 } @@ -5479,7 +5669,7 @@ func (m *Event_Failure) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.ExecutorId == nil { - m.ExecutorId = &ExecutorID{} + m.ExecutorId = &mesosproto.ExecutorID{} } if err := m.ExecutorId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -5491,6 +5681,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 +5696,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 +5712,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 +5722,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 +5740,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 +5753,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 +5779,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 +5798,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 +5808,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 +5826,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 +5839,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 } @@ -5651,7 +5860,7 @@ func (m *Call) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.FrameworkId == nil { - m.FrameworkId = &FrameworkID{} + m.FrameworkId = &mesosproto.FrameworkID{} } if err := m.FrameworkId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -5663,6 +5872,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 +5893,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 +5926,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 +5959,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 +5992,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 +6025,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 +6058,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 +6091,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 +6124,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 +6157,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 +6185,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 +6204,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 +6214,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 +6232,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 +6245,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 } @@ -6019,7 +6266,7 @@ func (m *Call_Subscribe) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.FrameworkInfo == nil { - m.FrameworkInfo = &FrameworkInfo{} + m.FrameworkInfo = &mesosproto.FrameworkInfo{} } if err := m.FrameworkInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6032,6 +6279,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 +6295,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 +6314,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 +6341,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 +6354,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 } @@ -6116,7 +6374,7 @@ func (m *Call_Accept) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OfferIds = append(m.OfferIds, &OfferID{}) + m.OfferIds = append(m.OfferIds, &mesosproto.OfferID{}) if err := m.OfferIds[len(m.OfferIds)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } @@ -6127,6 +6385,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 } @@ -6144,7 +6405,7 @@ func (m *Call_Accept) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Operations = append(m.Operations, &Offer_Operation{}) + m.Operations = append(m.Operations, &mesosproto.Offer_Operation{}) if err := m.Operations[len(m.Operations)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } @@ -6155,6 +6416,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 } @@ -6173,22 +6437,14 @@ func (m *Call_Accept) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Filters == nil { - m.Filters = &Filters{} + m.Filters = &mesosproto.Filters{} } if err := m.Filters.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 @@ -6204,14 +6460,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 +6487,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 +6500,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 } @@ -6248,7 +6520,7 @@ func (m *Call_Decline) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OfferIds = append(m.OfferIds, &OfferID{}) + m.OfferIds = append(m.OfferIds, &mesosproto.OfferID{}) if err := m.OfferIds[len(m.OfferIds)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } @@ -6259,6 +6531,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 } @@ -6277,22 +6552,14 @@ func (m *Call_Decline) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Filters == nil { - m.Filters = &Filters{} + m.Filters = &mesosproto.Filters{} } if err := m.Filters.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 @@ -6308,6 +6575,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 +6585,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 +6603,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 +6616,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 } @@ -6354,7 +6637,7 @@ func (m *Call_Kill) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.TaskId == nil { - m.TaskId = &TaskID{} + m.TaskId = &mesosproto.TaskID{} } if err := m.TaskId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6367,6 +6650,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 } @@ -6385,22 +6671,14 @@ func (m *Call_Kill) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.SlaveId == nil { - m.SlaveId = &SlaveID{} + m.SlaveId = &mesosproto.SlaveID{} } if err := m.SlaveId.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 @@ -6419,6 +6697,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 +6707,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 +6725,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 +6738,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 } @@ -6465,7 +6759,7 @@ func (m *Call_Shutdown) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.ExecutorId == nil { - m.ExecutorId = &ExecutorID{} + m.ExecutorId = &mesosproto.ExecutorID{} } if err := m.ExecutorId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6478,6 +6772,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 } @@ -6496,7 +6793,7 @@ func (m *Call_Shutdown) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.SlaveId == nil { - m.SlaveId = &SlaveID{} + m.SlaveId = &mesosproto.SlaveID{} } if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6504,15 +6801,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 +6823,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 +6833,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 +6851,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 +6864,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 } @@ -6580,7 +6885,7 @@ func (m *Call_Acknowledge) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.SlaveId == nil { - m.SlaveId = &SlaveID{} + m.SlaveId = &mesosproto.SlaveID{} } if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6593,6 +6898,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 } @@ -6611,7 +6919,7 @@ func (m *Call_Acknowledge) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.TaskId == nil { - m.TaskId = &TaskID{} + m.TaskId = &mesosproto.TaskID{} } if err := m.TaskId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6624,6 +6932,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 +6956,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 +6981,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 +7008,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 +7021,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 +7047,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 +7063,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 +7073,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 +7091,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 +7104,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 } @@ -6798,7 +7125,7 @@ func (m *Call_Reconcile_Task) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.TaskId == nil { - m.TaskId = &TaskID{} + m.TaskId = &mesosproto.TaskID{} } if err := m.TaskId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6811,6 +7138,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 } @@ -6829,22 +7159,14 @@ func (m *Call_Reconcile_Task) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.SlaveId == nil { - m.SlaveId = &SlaveID{} + m.SlaveId = &mesosproto.SlaveID{} } if err := m.SlaveId.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 @@ -6863,6 +7185,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 +7195,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 +7213,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 +7226,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 } @@ -6909,7 +7247,7 @@ func (m *Call_Message) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.SlaveId == nil { - m.SlaveId = &SlaveID{} + m.SlaveId = &mesosproto.SlaveID{} } if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6922,6 +7260,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 } @@ -6940,7 +7281,7 @@ func (m *Call_Message) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.ExecutorId == nil { - m.ExecutorId = &ExecutorID{} + m.ExecutorId = &mesosproto.ExecutorID{} } if err := m.ExecutorId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6953,6 +7294,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 +7318,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 +7343,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 +7370,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 +7383,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 +7403,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, &mesosproto.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 +7425,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 +7436,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 +7452,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 +7471,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 +7494,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 +7532,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/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler/scheduler.proto similarity index 95% rename from Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.proto rename to Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler/scheduler.proto index 6f9a07e07eb..34b6be803dc 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.proto +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler/scheduler.proto @@ -16,11 +16,12 @@ * limitations under the License. */ -package mesosproto; +package mesosproto.scheduler; -import "mesos.proto"; +import "github.com/mesos/mesos-go/mesosproto/mesos.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +option go_package = "scheduler"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -68,17 +69,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 +182,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 diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.pb.go deleted file mode 100644 index db42a71b36f..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.pb.go +++ /dev/null @@ -1,1803 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: state.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 - -type Operation_Type int32 - -const ( - Operation_SNAPSHOT Operation_Type = 1 - Operation_DIFF Operation_Type = 3 - Operation_EXPUNGE Operation_Type = 2 -) - -var Operation_Type_name = map[int32]string{ - 1: "SNAPSHOT", - 3: "DIFF", - 2: "EXPUNGE", -} -var Operation_Type_value = map[string]int32{ - "SNAPSHOT": 1, - "DIFF": 3, - "EXPUNGE": 2, -} - -func (x Operation_Type) Enum() *Operation_Type { - p := new(Operation_Type) - *p = x - return p -} -func (x Operation_Type) String() string { - return proto.EnumName(Operation_Type_name, int32(x)) -} -func (x *Operation_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Operation_Type_value, data, "Operation_Type") - if err != nil { - return err - } - *x = Operation_Type(value) - return nil -} - -// Describes a state entry, a versioned (via a UUID) key/value pair. -type Entry struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Uuid []byte `protobuf:"bytes,2,req,name=uuid" json:"uuid,omitempty"` - Value []byte `protobuf:"bytes,3,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Entry) Reset() { *m = Entry{} } -func (*Entry) ProtoMessage() {} - -func (m *Entry) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Entry) GetUuid() []byte { - if m != nil { - return m.Uuid - } - return nil -} - -func (m *Entry) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -// Describes an operation used in the log storage implementation. -type Operation struct { - Type *Operation_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Operation_Type" json:"type,omitempty"` - Snapshot *Operation_Snapshot `protobuf:"bytes,2,opt,name=snapshot" json:"snapshot,omitempty"` - Diff *Operation_Diff `protobuf:"bytes,4,opt,name=diff" json:"diff,omitempty"` - Expunge *Operation_Expunge `protobuf:"bytes,3,opt,name=expunge" json:"expunge,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Operation) Reset() { *m = Operation{} } -func (*Operation) ProtoMessage() {} - -func (m *Operation) GetType() Operation_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return Operation_SNAPSHOT -} - -func (m *Operation) GetSnapshot() *Operation_Snapshot { - if m != nil { - return m.Snapshot - } - return nil -} - -func (m *Operation) GetDiff() *Operation_Diff { - if m != nil { - return m.Diff - } - return nil -} - -func (m *Operation) GetExpunge() *Operation_Expunge { - if m != nil { - return m.Expunge - } - return nil -} - -// Describes a "snapshot" operation. -type Operation_Snapshot struct { - Entry *Entry `protobuf:"bytes,1,req,name=entry" json:"entry,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Operation_Snapshot) Reset() { *m = Operation_Snapshot{} } -func (*Operation_Snapshot) ProtoMessage() {} - -func (m *Operation_Snapshot) GetEntry() *Entry { - if m != nil { - return m.Entry - } - return nil -} - -// Describes a "diff" operation where the 'value' of the entry is -// just the diff itself, but the 'uuid' represents the UUID of the -// entry after applying this diff. -type Operation_Diff struct { - Entry *Entry `protobuf:"bytes,1,req,name=entry" json:"entry,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Operation_Diff) Reset() { *m = Operation_Diff{} } -func (*Operation_Diff) ProtoMessage() {} - -func (m *Operation_Diff) GetEntry() *Entry { - if m != nil { - return m.Entry - } - return nil -} - -// Describes an "expunge" operation. -type Operation_Expunge struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Operation_Expunge) Reset() { *m = Operation_Expunge{} } -func (*Operation_Expunge) ProtoMessage() {} - -func (m *Operation_Expunge) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func init() { - proto.RegisterEnum("mesosproto.Operation_Type", Operation_Type_name, Operation_Type_value) -} -func (this *Entry) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Entry) - if !ok { - return fmt.Errorf("that is not of type *Entry") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Entry but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Entrybut 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 !bytes.Equal(this.Uuid, that1.Uuid) { - return fmt.Errorf("Uuid this(%v) Not Equal that(%v)", this.Uuid, that1.Uuid) - } - if !bytes.Equal(this.Value, that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - 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 *Entry) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Entry) - 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 !bytes.Equal(this.Uuid, that1.Uuid) { - return false - } - if !bytes.Equal(this.Value, that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Operation) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Operation) - if !ok { - return fmt.Errorf("that is not of type *Operation") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Operation but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Operationbut is not nil && this == nil") - } - 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.Snapshot.Equal(that1.Snapshot) { - return fmt.Errorf("Snapshot this(%v) Not Equal that(%v)", this.Snapshot, that1.Snapshot) - } - if !this.Diff.Equal(that1.Diff) { - return fmt.Errorf("Diff this(%v) Not Equal that(%v)", this.Diff, that1.Diff) - } - if !this.Expunge.Equal(that1.Expunge) { - return fmt.Errorf("Expunge this(%v) Not Equal that(%v)", this.Expunge, that1.Expunge) - } - 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 *Operation) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Operation) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == 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.Snapshot.Equal(that1.Snapshot) { - return false - } - if !this.Diff.Equal(that1.Diff) { - return false - } - if !this.Expunge.Equal(that1.Expunge) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Operation_Snapshot) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Operation_Snapshot) - if !ok { - return fmt.Errorf("that is not of type *Operation_Snapshot") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Operation_Snapshot but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Operation_Snapshotbut is not nil && this == nil") - } - if !this.Entry.Equal(that1.Entry) { - return fmt.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry) - } - 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 *Operation_Snapshot) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Operation_Snapshot) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Entry.Equal(that1.Entry) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Operation_Diff) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Operation_Diff) - if !ok { - return fmt.Errorf("that is not of type *Operation_Diff") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Operation_Diff but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Operation_Diffbut is not nil && this == nil") - } - if !this.Entry.Equal(that1.Entry) { - return fmt.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry) - } - 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 *Operation_Diff) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Operation_Diff) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Entry.Equal(that1.Entry) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Operation_Expunge) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Operation_Expunge) - if !ok { - return fmt.Errorf("that is not of type *Operation_Expunge") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Operation_Expunge but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Operation_Expungebut 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 !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 *Operation_Expunge) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Operation_Expunge) - 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Entry) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&mesosproto.Entry{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringState(this.Name, "string")+",\n") - } - if this.Uuid != nil { - s = append(s, "Uuid: "+valueToGoStringState(this.Uuid, "byte")+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+valueToGoStringState(this.Value, "byte")+",\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 *Operation) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&mesosproto.Operation{") - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringState(this.Type, "mesosproto.Operation_Type")+",\n") - } - if this.Snapshot != nil { - s = append(s, "Snapshot: "+fmt.Sprintf("%#v", this.Snapshot)+",\n") - } - if this.Diff != nil { - s = append(s, "Diff: "+fmt.Sprintf("%#v", this.Diff)+",\n") - } - if this.Expunge != nil { - s = append(s, "Expunge: "+fmt.Sprintf("%#v", this.Expunge)+",\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 *Operation_Snapshot) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Operation_Snapshot{") - if this.Entry != nil { - s = append(s, "Entry: "+fmt.Sprintf("%#v", this.Entry)+",\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 *Operation_Diff) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Operation_Diff{") - if this.Entry != nil { - s = append(s, "Entry: "+fmt.Sprintf("%#v", this.Entry)+",\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 *Operation_Expunge) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mesosproto.Operation_Expunge{") - if this.Name != nil { - s = append(s, "Name: "+valueToGoStringState(this.Name, "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 valueToGoStringState(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 extensionToGoStringState(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 *Entry) 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 *Entry) 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 = encodeVarintState(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) - } - if m.Uuid == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid") - } else { - data[i] = 0x12 - i++ - i = encodeVarintState(data, i, uint64(len(m.Uuid))) - i += copy(data[i:], m.Uuid) - } - if m.Value == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") - } else { - data[i] = 0x1a - i++ - i = encodeVarintState(data, i, uint64(len(m.Value))) - i += copy(data[i:], m.Value) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Operation) 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 *Operation) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") - } else { - data[i] = 0x8 - i++ - i = encodeVarintState(data, i, uint64(*m.Type)) - } - if m.Snapshot != nil { - data[i] = 0x12 - i++ - i = encodeVarintState(data, i, uint64(m.Snapshot.Size())) - n1, err := m.Snapshot.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Expunge != nil { - data[i] = 0x1a - i++ - i = encodeVarintState(data, i, uint64(m.Expunge.Size())) - n2, err := m.Expunge.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Diff != nil { - data[i] = 0x22 - i++ - i = encodeVarintState(data, i, uint64(m.Diff.Size())) - n3, err := m.Diff.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 *Operation_Snapshot) 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 *Operation_Snapshot) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Entry == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry") - } else { - data[i] = 0xa - i++ - i = encodeVarintState(data, i, uint64(m.Entry.Size())) - n4, err := m.Entry.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Operation_Diff) 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 *Operation_Diff) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Entry == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry") - } else { - data[i] = 0xa - i++ - i = encodeVarintState(data, i, uint64(m.Entry.Size())) - n5, err := m.Entry.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 *Operation_Expunge) 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 *Operation_Expunge) 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 = encodeVarintState(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64State(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 encodeFixed32State(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 encodeVarintState(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 NewPopulatedEntry(r randyState, easy bool) *Entry { - this := &Entry{} - v1 := randStringState(r) - this.Name = &v1 - v2 := r.Intn(100) - this.Uuid = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Uuid[i] = byte(r.Intn(256)) - } - v3 := r.Intn(100) - this.Value = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Value[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 4) - } - return this -} - -func NewPopulatedOperation(r randyState, easy bool) *Operation { - this := &Operation{} - v4 := Operation_Type([]int32{1, 3, 2}[r.Intn(3)]) - this.Type = &v4 - if r.Intn(10) != 0 { - this.Snapshot = NewPopulatedOperation_Snapshot(r, easy) - } - if r.Intn(10) != 0 { - this.Expunge = NewPopulatedOperation_Expunge(r, easy) - } - if r.Intn(10) != 0 { - this.Diff = NewPopulatedOperation_Diff(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 5) - } - return this -} - -func NewPopulatedOperation_Snapshot(r randyState, easy bool) *Operation_Snapshot { - this := &Operation_Snapshot{} - this.Entry = NewPopulatedEntry(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 2) - } - return this -} - -func NewPopulatedOperation_Diff(r randyState, easy bool) *Operation_Diff { - this := &Operation_Diff{} - this.Entry = NewPopulatedEntry(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 2) - } - return this -} - -func NewPopulatedOperation_Expunge(r randyState, easy bool) *Operation_Expunge { - this := &Operation_Expunge{} - v5 := randStringState(r) - this.Name = &v5 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 2) - } - return this -} - -type randyState interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneState(r randyState) 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 randStringState(r randyState) string { - v6 := r.Intn(100) - tmps := make([]rune, v6) - for i := 0; i < v6; i++ { - tmps[i] = randUTF8RuneState(r) - } - return string(tmps) -} -func randUnrecognizedState(r randyState, 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 = randFieldState(data, r, fieldNumber, wire) - } - return data -} -func randFieldState(data []byte, r randyState, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateState(data, uint64(key)) - v7 := r.Int63() - if r.Intn(2) == 0 { - v7 *= -1 - } - data = encodeVarintPopulateState(data, uint64(v7)) - case 1: - data = encodeVarintPopulateState(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 = encodeVarintPopulateState(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateState(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateState(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 encodeVarintPopulateState(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 *Entry) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovState(uint64(l)) - } - if m.Uuid != nil { - l = len(m.Uuid) - n += 1 + l + sovState(uint64(l)) - } - if m.Value != nil { - l = len(m.Value) - n += 1 + l + sovState(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovState(uint64(*m.Type)) - } - if m.Snapshot != nil { - l = m.Snapshot.Size() - n += 1 + l + sovState(uint64(l)) - } - if m.Expunge != nil { - l = m.Expunge.Size() - n += 1 + l + sovState(uint64(l)) - } - if m.Diff != nil { - l = m.Diff.Size() - n += 1 + l + sovState(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Snapshot) Size() (n int) { - var l int - _ = l - if m.Entry != nil { - l = m.Entry.Size() - n += 1 + l + sovState(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Diff) Size() (n int) { - var l int - _ = l - if m.Entry != nil { - l = m.Entry.Size() - n += 1 + l + sovState(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation_Expunge) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovState(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovState(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozState(x uint64) (n int) { - return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Entry) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Entry{`, - `Name:` + valueToStringState(this.Name) + `,`, - `Uuid:` + valueToStringState(this.Uuid) + `,`, - `Value:` + valueToStringState(this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Operation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Operation{`, - `Type:` + valueToStringState(this.Type) + `,`, - `Snapshot:` + strings.Replace(fmt.Sprintf("%v", this.Snapshot), "Operation_Snapshot", "Operation_Snapshot", 1) + `,`, - `Expunge:` + strings.Replace(fmt.Sprintf("%v", this.Expunge), "Operation_Expunge", "Operation_Expunge", 1) + `,`, - `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Operation_Diff", "Operation_Diff", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Operation_Snapshot) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Operation_Snapshot{`, - `Entry:` + strings.Replace(fmt.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Operation_Diff) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Operation_Diff{`, - `Entry:` + strings.Replace(fmt.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Operation_Expunge) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Operation_Expunge{`, - `Name:` + valueToStringState(this.Name) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringState(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Entry) 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: - 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 ErrInvalidLengthState - } - 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Uuid = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append([]byte{}, data[iNdEx:postIndex]...) - iNdEx = postIndex - hasFields[0] |= uint64(0x00000004) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipState(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthState - } - 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 hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") - } - - return nil -} -func (m *Operation) 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: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Operation_Type - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (Operation_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", 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 ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Snapshot == nil { - m.Snapshot = &Operation_Snapshot{} - } - if err := m.Snapshot.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expunge", 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 ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Expunge == nil { - m.Expunge = &Operation_Expunge{} - } - if err := m.Expunge.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Diff", 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 ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Diff == nil { - m.Diff = &Operation_Diff{} - } - if err := m.Diff.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipState(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthState - } - 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("type") - } - - return nil -} -func (m *Operation_Snapshot) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entry", 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 ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Entry == nil { - m.Entry = &Entry{} - } - if err := m.Entry.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 - skippy, err := skipState(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthState - } - 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("entry") - } - - return nil -} -func (m *Operation_Diff) 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: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entry", 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 ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Entry == nil { - m.Entry = &Entry{} - } - if err := m.Entry.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 - skippy, err := skipState(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthState - } - 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("entry") - } - - return nil -} -func (m *Operation_Expunge) 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: - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipState(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthState - } - 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 skipState(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - 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 { - 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 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, ErrInvalidLengthState - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - 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 := skipState(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 ( - ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling") -) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.proto deleted file mode 100644 index 69641859bcc..00000000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.proto +++ /dev/null @@ -1,72 +0,0 @@ -/** - * 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 "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 state entry, a versioned (via a UUID) key/value pair. -message Entry { - required string name = 1; - required bytes uuid = 2; - required bytes value = 3; -} - - -// Describes an operation used in the log storage implementation. -message Operation { - enum Type { - SNAPSHOT = 1; - DIFF = 3; - EXPUNGE = 2; - } - - // Describes a "snapshot" operation. - message Snapshot { - required Entry entry = 1; - } - - // Describes a "diff" operation where the 'value' of the entry is - // just the diff itself, but the 'uuid' represents the UUID of the - // entry after applying this diff. - message Diff { - required Entry entry = 1; - } - - // Describes an "expunge" operation. - message Expunge { - required string name = 1; - } - - required Type type = 1; - optional Snapshot snapshot = 2; - optional Diff diff = 4; - optional Expunge expunge = 3; -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/mesosprotoutil.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/mesosprotoutil.go index 5fafaaae258..6ca86c84bb9 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/mesosprotoutil.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/mesosprotoutil.go @@ -36,6 +36,28 @@ func FilterResources(resources []*mesos.Resource, filter func(*mesos.Resource) b return result } +func AddResourceReservation(resource *mesos.Resource, principal string, role string) *mesos.Resource { + resource.Reservation = &mesos.Resource_ReservationInfo{Principal: proto.String(principal)} + resource.Role = proto.String(role) + return resource +} + +func NewScalarResourceWithReservation(name string, value float64, principal string, role string) *mesos.Resource { + return AddResourceReservation(NewScalarResource(name, value), principal, role) +} + +func NewRangesResourceWithReservation(name string, ranges []*mesos.Value_Range, principal string, role string) *mesos.Resource { + return AddResourceReservation(NewRangesResource(name, ranges), principal, role) +} + +func NewSetResourceWithReservation(name string, items []string, principal string, role string) *mesos.Resource { + return AddResourceReservation(NewSetResource(name, items), principal, role) +} + +func NewVolumeResourceWithReservation(val float64, containerPath string, persistenceId string, mode *mesos.Volume_Mode, principal string, role string) *mesos.Resource { + return AddResourceReservation(NewVolumeResource(val, containerPath, persistenceId, mode), principal, role) +} + func NewScalarResource(name string, val float64) *mesos.Resource { return &mesos.Resource{ Name: proto.String(name), @@ -58,7 +80,15 @@ func NewSetResource(name string, items []string) *mesos.Resource { Type: mesos.Value_SET.Enum(), Set: &mesos.Value_Set{Item: items}, } +} +func NewVolumeResource(val float64, containerPath string, persistenceId string, mode *mesos.Volume_Mode) *mesos.Resource { + resource := NewScalarResource("disk", val) + resource.Disk = &mesos.Resource_DiskInfo{ + Persistence: &mesos.Resource_DiskInfo_Persistence{Id: proto.String(persistenceId)}, + Volume: &mesos.Volume{ContainerPath: proto.String(containerPath), Mode: mode}, + } + return resource } func NewFrameworkID(id string) *mesos.FrameworkID { @@ -153,3 +183,38 @@ func NewExecutorInfo(execId *mesos.ExecutorID, command *mesos.CommandInfo) *meso Command: command, } } + +func NewCreateOperation(volumes []*mesos.Resource) *mesos.Offer_Operation { + return &mesos.Offer_Operation{ + Type: mesos.Offer_Operation_CREATE.Enum(), + Create: &mesos.Offer_Operation_Create{Volumes: volumes}, + } +} + +func NewDestroyOperation(volumes []*mesos.Resource) *mesos.Offer_Operation { + return &mesos.Offer_Operation{ + Type: mesos.Offer_Operation_DESTROY.Enum(), + Destroy: &mesos.Offer_Operation_Destroy{Volumes: volumes}, + } +} + +func NewReserveOperation(resources []*mesos.Resource) *mesos.Offer_Operation { + return &mesos.Offer_Operation{ + Type: mesos.Offer_Operation_RESERVE.Enum(), + Reserve: &mesos.Offer_Operation_Reserve{Resources: resources}, + } +} + +func NewUnreserveOperation(resources []*mesos.Resource) *mesos.Offer_Operation { + return &mesos.Offer_Operation{ + Type: mesos.Offer_Operation_UNRESERVE.Enum(), + Unreserve: &mesos.Offer_Operation_Unreserve{Resources: resources}, + } +} + +func NewLaunchOperation(tasks []*mesos.TaskInfo) *mesos.Offer_Operation { + return &mesos.Offer_Operation{ + Type: mesos.Offer_Operation_LAUNCH.Enum(), + Launch: &mesos.Offer_Operation_Launch{TaskInfos: tasks}, + } +} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/node.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/node.go index ac17d47e44e..447b0c94b95 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/node.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/node.go @@ -1,6 +1,7 @@ package mesosutil import ( + "os" "os/exec" "strings" @@ -9,15 +10,20 @@ import ( //TODO(jdef) copied from kubernetes/pkg/util/node.go func GetHostname(hostnameOverride string) string { - hostname := []byte(hostnameOverride) - if string(hostname) == "" { + hostname := hostnameOverride + if hostname == "" { // Note: We use exec here instead of os.Hostname() because we // want the FQDN, and this is the easiest way to get it. fqdn, err := exec.Command("hostname", "-f").Output() - if err != nil { - log.Fatalf("Couldn't determine hostname: %v", err) + if err != nil || len(fqdn) == 0 { + log.Errorf("Couldn't determine hostname fqdn, failing back to hostname: %v", err) + hostname, err = os.Hostname() + if err != nil { + log.Fatalf("Error getting hostname: %v", err) + } + } else { + hostname = string(fqdn) } - hostname = fqdn } - return strings.TrimSpace(string(hostname)) + return strings.TrimSpace(hostname) } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/decoder.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/decoder.go index afed18a208d..df1661bb2cc 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/decoder.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/decoder.go @@ -209,7 +209,7 @@ func (d *httpDecoder) buildResponseEntity(resp *Response) *bytes.Buffer { // updateForRequest updates the chunked and kalive fields of the decoder to align // with the header values of the request -func (d *httpDecoder) updateForRequest() { +func (d *httpDecoder) updateForRequest(bootstrapping bool) { // check "Transfer-Encoding" for "chunked" d.chunked = false for _, v := range d.req.Header["Transfer-Encoding"] { @@ -219,11 +219,16 @@ func (d *httpDecoder) updateForRequest() { } } if !d.chunked && d.req.ContentLength < 0 { - // strongly suspect that Go's internal net/http lib is stripping - // the Transfer-Encoding header from the initial request, so this - // workaround makes a very mesos-specific assumption: an unknown - // Content-Length indicates a chunked stream. - d.chunked = true + if bootstrapping { + // strongly suspect that Go's internal net/http lib is stripping + // the Transfer-Encoding header from the initial request, so this + // workaround makes a very mesos-specific assumption: an unknown + // Content-Length indicates a chunked stream. + d.chunked = true + } else { + // via https://tools.ietf.org/html/rfc7230#section-3.3.2 + d.req.ContentLength = 0 + } } // check "Connection" for "Keep-Alive" @@ -351,7 +356,7 @@ func limit(r *bufio.Reader, limit int64) *io.LimitedReader { func (d *httpDecoder) bootstrapState(res http.ResponseWriter) httpState { log.V(2).Infoln(d.idtag + "bootstrap-state") - d.updateForRequest() + d.updateForRequest(true) // hijack hj, ok := res.(http.Hijacker) @@ -636,6 +641,6 @@ func readHeaderState(d *httpDecoder) httpState { log.V(2).Infoln(d.idtag+"set content length", r.ContentLength) } } - d.updateForRequest() + d.updateForRequest(false) return d.readBodyContent() } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/http_transporter.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/http_transporter.go index 6a28e107d6d..98a2b0af663 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/http_transporter.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/http_transporter.go @@ -590,9 +590,11 @@ func (t *HTTPTransporter) makeLibprocessRequest(msg *Message) (*http.Request, er log.Errorf("Failed to create request: %v\n", err) return nil, err } - req.Header.Add("Libprocess-From", t.upid.String()) + if !msg.isV1API() { + req.Header.Add("Libprocess-From", t.upid.String()) + req.Header.Add("Connection", "Keep-Alive") + } req.Header.Add("Content-Type", "application/x-protobuf") - req.Header.Add("Connection", "Keep-Alive") return req, nil } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/message.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/message.go index 331317f45cd..ae441bb3aa0 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/message.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/message.go @@ -36,9 +36,17 @@ type Message struct { // RequestURI returns the request URI of the message. func (m *Message) RequestURI() string { + if m.isV1API() { + return fmt.Sprintf("/api/v1/%s", m.Name) + } + return fmt.Sprintf("/%s/%s", m.UPID.ID, m.Name) } +func (m *Message) isV1API() bool { + return !strings.HasPrefix(m.Name, "mesos.internal") +} + // NOTE: This should not fail or panic. func extractNameFromRequestURI(requestURI string) string { return strings.Split(requestURI, "/")[2] diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/messenger.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/messenger.go index 279a6f92cf7..e275fda7569 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/messenger.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/messenger/messenger.go @@ -28,6 +28,7 @@ import ( "github.com/gogo/protobuf/proto" log "github.com/golang/glog" mesos "github.com/mesos/mesos-go/mesosproto" + "github.com/mesos/mesos-go/mesosproto/scheduler" "github.com/mesos/mesos-go/mesosutil/process" "github.com/mesos/mesos-go/upid" "golang.org/x/net/context" @@ -391,5 +392,14 @@ func (m *MesosMessenger) decodeLoop() { // getMessageName returns the name of the message in the mesos manner. func getMessageName(msg proto.Message) string { - return fmt.Sprintf("%v.%v", "mesos.internal", reflect.TypeOf(msg).Elem().Name()) + var msgName string + + switch msg := msg.(type) { + case *scheduler.Call: + msgName = "scheduler" + default: + msgName = fmt.Sprintf("%v.%v", "mesos.internal", reflect.TypeOf(msg).Elem().Name()) + } + + return msgName } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/handler.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/handler.go index fc7fe6ab8ad..9492ff818f0 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/handler.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/handler.go @@ -18,7 +18,7 @@ func (h *CredentialHandler) Handle(callbacks ...callback.Interface) error { case *callback.Name: cb.Set(h.credential.GetPrincipal()) case *callback.Password: - cb.Set(h.credential.GetSecret()) + cb.Set(([]byte)(h.credential.GetSecret())) case *callback.Interprocess: cb.Set(*(h.pid), *(h.client)) default: diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/schedtype.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/schedtype.go index b7634efa9e1..0e2c82343dc 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/schedtype.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/schedtype.go @@ -66,6 +66,11 @@ type SchedulerDriver interface { // framework via Scheduler.ResourceOffers callback, asynchronously. RequestResources(requests []*mesos.Request) (mesos.Status, error) + // AcceptOffers utilizes the new HTTP API to send a Scheduler Call Message + // to the Mesos Master. Valid operation types are LAUNCH, RESERVE, UNRESERVE, + // CREATE, DESTROY, and more. + AcceptOffers(offerIDs []*mesos.OfferID, operations []*mesos.Offer_Operation, filters *mesos.Filters) (mesos.Status, error) + // Launches the given set of tasks. Any resources remaining (i.e., // not used by the tasks or their executors) will be considered // declined. The specified filters are applied on all unused diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/scheduler.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/scheduler.go index c2070810e4e..f1a88f348f6 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/scheduler.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/scheduler/scheduler.go @@ -34,6 +34,7 @@ import ( "github.com/mesos/mesos-go/auth" "github.com/mesos/mesos-go/detector" mesos "github.com/mesos/mesos-go/mesosproto" + "github.com/mesos/mesos-go/mesosproto/scheduler" util "github.com/mesos/mesos-go/mesosutil" "github.com/mesos/mesos-go/mesosutil/process" "github.com/mesos/mesos-go/messenger" @@ -1083,7 +1084,7 @@ func (driver *MesosSchedulerDriver) abort(cause error) (stat mesos.Status, err e if driver.connected { _, err = driver.stop(cause, true) } else { - driver.messenger.Stop() + driver._stop(cause, mesos.Status_DRIVER_ABORTED) } stat = mesos.Status_DRIVER_ABORTED @@ -1091,6 +1092,117 @@ func (driver *MesosSchedulerDriver) abort(cause error) (stat mesos.Status, err e return } +func (driver *MesosSchedulerDriver) AcceptOffers(offerIds []*mesos.OfferID, operations []*mesos.Offer_Operation, filters *mesos.Filters) (mesos.Status, error) { + driver.eventLock.Lock() + defer driver.eventLock.Unlock() + + if stat := driver.status; stat != mesos.Status_DRIVER_RUNNING { + return stat, fmt.Errorf("Unable to AcceptOffers, expected driver status %s, but got %s", mesos.Status_DRIVER_RUNNING, stat) + } + + if !driver.connected { + err := fmt.Errorf("Not connected to master.") + for _, operation := range operations { + if *operation.Type == mesos.Offer_Operation_LAUNCH { + for _, task := range operation.Launch.TaskInfos { + driver.pushLostTask(task, "Unable to launch tasks: "+err.Error()) + } + } + } + log.Errorf("Failed to send LaunchTask message: %v\n", err) + return driver.status, err + } + + okOperations := make([]*mesos.Offer_Operation, 0, len(operations)) + + for _, offerId := range offerIds { + for _, operation := range operations { + // Keep only the slave PIDs where we run tasks so we can send + // framework messages directly. + if !driver.cache.containsOffer(offerId) { + log.Warningf("Attempting to accept offers with unknown offer %s\n", offerId.GetValue()) + continue + } + + // Validate + switch *operation.Type { + case mesos.Offer_Operation_LAUNCH: + tasks := []*mesos.TaskInfo{} + // Set TaskInfo.executor.framework_id, if it's missing. + for _, task := range operation.Launch.TaskInfos { + newTask := *task + if newTask.Executor != nil && newTask.Executor.FrameworkId == nil { + newTask.Executor.FrameworkId = driver.frameworkInfo.Id + } + tasks = append(tasks, &newTask) + } + for _, task := range tasks { + if driver.cache.getOffer(offerId).offer.SlaveId.Equal(task.SlaveId) { + // cache the tasked slave, for future communication + pid := driver.cache.getOffer(offerId).slavePid + driver.cache.putSlavePid(task.SlaveId, pid) + } else { + log.Warningf("Attempting to launch task %s with the wrong slaveId offer %s\n", task.TaskId.GetValue(), task.SlaveId.GetValue()) + } + } + operation.Launch.TaskInfos = tasks + okOperations = append(okOperations, operation) + case mesos.Offer_Operation_RESERVE: + // Only send reserved resources + filtered := util.FilterResources(operation.Reserve.Resources, func(res *mesos.Resource) bool { return res.Reservation != nil }) + operation.Reserve.Resources = filtered + okOperations = append(okOperations, operation) + case mesos.Offer_Operation_UNRESERVE: + // Only send reserved resources + filtered := util.FilterResources(operation.Unreserve.Resources, func(res *mesos.Resource) bool { return res.Reservation != nil }) + operation.Unreserve.Resources = filtered + okOperations = append(okOperations, operation) + case mesos.Offer_Operation_CREATE: + // Only send reserved resources disks with volumes + filtered := util.FilterResources(operation.Create.Volumes, func(res *mesos.Resource) bool { + return res.Reservation != nil && res.Disk != nil && res.GetName() == "disk" + }) + operation.Create.Volumes = filtered + okOperations = append(okOperations, operation) + case mesos.Offer_Operation_DESTROY: + // Only send reserved resources disks with volumes + filtered := util.FilterResources(operation.Destroy.Volumes, func(res *mesos.Resource) bool { + return res.Reservation != nil && res.Disk != nil && res.GetName() == "disk" + }) + operation.Destroy.Volumes = filtered + okOperations = append(okOperations, operation) + } + } + + driver.cache.removeOffer(offerId) // if offer + } + + // Accept Offers + message := &scheduler.Call{ + FrameworkId: driver.frameworkInfo.Id, + Type: scheduler.Call_ACCEPT.Enum(), + Accept: &scheduler.Call_Accept{ + OfferIds: offerIds, + Operations: okOperations, + Filters: filters, + }, + } + + if err := driver.send(driver.masterPid, message); err != nil { + for _, operation := range operations { + if *operation.Type == mesos.Offer_Operation_LAUNCH { + for _, task := range operation.Launch.TaskInfos { + driver.pushLostTask(task, "Unable to launch tasks: "+err.Error()) + } + } + } + log.Errorf("Failed to send LaunchTask message: %v\n", err) + return driver.status, err + } + + return driver.status, nil +} + func (driver *MesosSchedulerDriver) LaunchTasks(offerIds []*mesos.OfferID, tasks []*mesos.TaskInfo, filters *mesos.Filters) (mesos.Status, error) { driver.eventLock.Lock() defer driver.eventLock.Unlock() diff --git a/Godeps/_workspace/src/github.com/pmezard/go-difflib/LICENSE b/Godeps/_workspace/src/github.com/pmezard/go-difflib/LICENSE new file mode 100644 index 00000000000..c67dad612a3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/pmezard/go-difflib/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013, Patrick Mezard +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + The names of its contributors may not be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/pmezard/go-difflib/difflib/difflib.go b/Godeps/_workspace/src/github.com/pmezard/go-difflib/difflib/difflib.go new file mode 100644 index 00000000000..64cc40fe1da --- /dev/null +++ b/Godeps/_workspace/src/github.com/pmezard/go-difflib/difflib/difflib.go @@ -0,0 +1,758 @@ +// Package difflib is a partial port of Python difflib module. +// +// It provides tools to compare sequences of strings and generate textual diffs. +// +// The following class and functions have been ported: +// +// - SequenceMatcher +// +// - unified_diff +// +// - context_diff +// +// Getting unified diffs was the main goal of the port. Keep in mind this code +// is mostly suitable to output text differences in a human friendly way, there +// are no guarantees generated diffs are consumable by patch(1). +package difflib + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strings" +) + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +func calculateRatio(matches, length int) float64 { + if length > 0 { + return 2.0 * float64(matches) / float64(length) + } + return 1.0 +} + +type Match struct { + A int + B int + Size int +} + +type OpCode struct { + Tag byte + I1 int + I2 int + J1 int + J2 int +} + +// SequenceMatcher compares sequence of strings. The basic +// algorithm predates, and is a little fancier than, an algorithm +// published in the late 1980's by Ratcliff and Obershelp under the +// hyperbolic name "gestalt pattern matching". The basic idea is to find +// the longest contiguous matching subsequence that contains no "junk" +// elements (R-O doesn't address junk). The same idea is then applied +// recursively to the pieces of the sequences to the left and to the right +// of the matching subsequence. This does not yield minimal edit +// sequences, but does tend to yield matches that "look right" to people. +// +// SequenceMatcher tries to compute a "human-friendly diff" between two +// sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the +// longest *contiguous* & junk-free matching subsequence. That's what +// catches peoples' eyes. The Windows(tm) windiff has another interesting +// notion, pairing up elements that appear uniquely in each sequence. +// That, and the method here, appear to yield more intuitive difference +// reports than does diff. This method appears to be the least vulnerable +// to synching up on blocks of "junk lines", though (like blank lines in +// ordinary text files, or maybe "

" lines in HTML files). That may be +// because this is the only method of the 3 that has a *concept* of +// "junk" . +// +// Timing: Basic R-O is cubic time worst case and quadratic time expected +// case. SequenceMatcher is quadratic time for the worst case and has +// expected-case behavior dependent in a complicated way on how many +// elements the sequences have in common; best case time is linear. +type SequenceMatcher struct { + a []string + b []string + b2j map[string][]int + IsJunk func(string) bool + autoJunk bool + bJunk map[string]struct{} + matchingBlocks []Match + fullBCount map[string]int + bPopular map[string]struct{} + opCodes []OpCode +} + +func NewMatcher(a, b []string) *SequenceMatcher { + m := SequenceMatcher{autoJunk: true} + m.SetSeqs(a, b) + return &m +} + +func NewMatcherWithJunk(a, b []string, autoJunk bool, + isJunk func(string) bool) *SequenceMatcher { + + m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk} + m.SetSeqs(a, b) + return &m +} + +// Set two sequences to be compared. +func (m *SequenceMatcher) SetSeqs(a, b []string) { + m.SetSeq1(a) + m.SetSeq2(b) +} + +// Set the first sequence to be compared. The second sequence to be compared is +// not changed. +// +// SequenceMatcher computes and caches detailed information about the second +// sequence, so if you want to compare one sequence S against many sequences, +// use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other +// sequences. +// +// See also SetSeqs() and SetSeq2(). +func (m *SequenceMatcher) SetSeq1(a []string) { + if &a == &m.a { + return + } + m.a = a + m.matchingBlocks = nil + m.opCodes = nil +} + +// Set the second sequence to be compared. The first sequence to be compared is +// not changed. +func (m *SequenceMatcher) SetSeq2(b []string) { + if &b == &m.b { + return + } + m.b = b + m.matchingBlocks = nil + m.opCodes = nil + m.fullBCount = nil + m.chainB() +} + +func (m *SequenceMatcher) chainB() { + // Populate line -> index mapping + b2j := map[string][]int{} + for i, s := range m.b { + indices := b2j[s] + indices = append(indices, i) + b2j[s] = indices + } + + // Purge junk elements + m.bJunk = map[string]struct{}{} + if m.IsJunk != nil { + junk := m.bJunk + for s, _ := range b2j { + if m.IsJunk(s) { + junk[s] = struct{}{} + } + } + for s, _ := range junk { + delete(b2j, s) + } + } + + // Purge remaining popular elements + popular := map[string]struct{}{} + n := len(m.b) + if m.autoJunk && n >= 200 { + ntest := n/100 + 1 + for s, indices := range b2j { + if len(indices) > ntest { + popular[s] = struct{}{} + } + } + for s, _ := range popular { + delete(b2j, s) + } + } + m.bPopular = popular + m.b2j = b2j +} + +func (m *SequenceMatcher) isBJunk(s string) bool { + _, ok := m.bJunk[s] + return ok +} + +// Find longest matching block in a[alo:ahi] and b[blo:bhi]. +// +// If IsJunk is not defined: +// +// Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where +// alo <= i <= i+k <= ahi +// blo <= j <= j+k <= bhi +// and for all (i',j',k') meeting those conditions, +// k >= k' +// i <= i' +// and if i == i', j <= j' +// +// In other words, of all maximal matching blocks, return one that +// starts earliest in a, and of all those maximal matching blocks that +// start earliest in a, return the one that starts earliest in b. +// +// If IsJunk is defined, first the longest matching block is +// determined as above, but with the additional restriction that no +// junk element appears in the block. Then that block is extended as +// far as possible by matching (only) junk elements on both sides. So +// the resulting block never matches on junk except as identical junk +// happens to be adjacent to an "interesting" match. +// +// If no blocks match, return (alo, blo, 0). +func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match { + // CAUTION: stripping common prefix or suffix would be incorrect. + // E.g., + // ab + // acab + // Longest matching block is "ab", but if common prefix is + // stripped, it's "a" (tied with "b"). UNIX(tm) diff does so + // strip, so ends up claiming that ab is changed to acab by + // inserting "ca" in the middle. That's minimal but unintuitive: + // "it's obvious" that someone inserted "ac" at the front. + // Windiff ends up at the same place as diff, but by pairing up + // the unique 'b's and then matching the first two 'a's. + besti, bestj, bestsize := alo, blo, 0 + + // find longest junk-free match + // during an iteration of the loop, j2len[j] = length of longest + // junk-free match ending with a[i-1] and b[j] + j2len := map[int]int{} + for i := alo; i != ahi; i++ { + // look at all instances of a[i] in b; note that because + // b2j has no junk keys, the loop is skipped if a[i] is junk + newj2len := map[int]int{} + for _, j := range m.b2j[m.a[i]] { + // a[i] matches b[j] + if j < blo { + continue + } + if j >= bhi { + break + } + k := j2len[j-1] + 1 + newj2len[j] = k + if k > bestsize { + besti, bestj, bestsize = i-k+1, j-k+1, k + } + } + j2len = newj2len + } + + // Extend the best by non-junk elements on each end. In particular, + // "popular" non-junk elements aren't in b2j, which greatly speeds + // the inner loop above, but also means "the best" match so far + // doesn't contain any junk *or* popular non-junk elements. + for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) && + m.a[besti-1] == m.b[bestj-1] { + besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 + } + for besti+bestsize < ahi && bestj+bestsize < bhi && + !m.isBJunk(m.b[bestj+bestsize]) && + m.a[besti+bestsize] == m.b[bestj+bestsize] { + bestsize += 1 + } + + // Now that we have a wholly interesting match (albeit possibly + // empty!), we may as well suck up the matching junk on each + // side of it too. Can't think of a good reason not to, and it + // saves post-processing the (possibly considerable) expense of + // figuring out what to do with it. In the case of an empty + // interesting match, this is clearly the right thing to do, + // because no other kind of match is possible in the regions. + for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) && + m.a[besti-1] == m.b[bestj-1] { + besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 + } + for besti+bestsize < ahi && bestj+bestsize < bhi && + m.isBJunk(m.b[bestj+bestsize]) && + m.a[besti+bestsize] == m.b[bestj+bestsize] { + bestsize += 1 + } + + return Match{A: besti, B: bestj, Size: bestsize} +} + +// Return list of triples describing matching subsequences. +// +// Each triple is of the form (i, j, n), and means that +// a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in +// i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are +// adjacent triples in the list, and the second is not the last triple in the +// list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe +// adjacent equal blocks. +// +// The last triple is a dummy, (len(a), len(b), 0), and is the only +// triple with n==0. +func (m *SequenceMatcher) GetMatchingBlocks() []Match { + if m.matchingBlocks != nil { + return m.matchingBlocks + } + + var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match + matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match { + match := m.findLongestMatch(alo, ahi, blo, bhi) + i, j, k := match.A, match.B, match.Size + if match.Size > 0 { + if alo < i && blo < j { + matched = matchBlocks(alo, i, blo, j, matched) + } + matched = append(matched, match) + if i+k < ahi && j+k < bhi { + matched = matchBlocks(i+k, ahi, j+k, bhi, matched) + } + } + return matched + } + matched := matchBlocks(0, len(m.a), 0, len(m.b), nil) + + // It's possible that we have adjacent equal blocks in the + // matching_blocks list now. + nonAdjacent := []Match{} + i1, j1, k1 := 0, 0, 0 + for _, b := range matched { + // Is this block adjacent to i1, j1, k1? + i2, j2, k2 := b.A, b.B, b.Size + if i1+k1 == i2 && j1+k1 == j2 { + // Yes, so collapse them -- this just increases the length of + // the first block by the length of the second, and the first + // block so lengthened remains the block to compare against. + k1 += k2 + } else { + // Not adjacent. Remember the first block (k1==0 means it's + // the dummy we started with), and make the second block the + // new block to compare against. + if k1 > 0 { + nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) + } + i1, j1, k1 = i2, j2, k2 + } + } + if k1 > 0 { + nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) + } + + nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0}) + m.matchingBlocks = nonAdjacent + return m.matchingBlocks +} + +// Return list of 5-tuples describing how to turn a into b. +// +// Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple +// has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the +// tuple preceding it, and likewise for j1 == the previous j2. +// +// The tags are characters, with these meanings: +// +// 'r' (replace): a[i1:i2] should be replaced by b[j1:j2] +// +// 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case. +// +// 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case. +// +// 'e' (equal): a[i1:i2] == b[j1:j2] +func (m *SequenceMatcher) GetOpCodes() []OpCode { + if m.opCodes != nil { + return m.opCodes + } + i, j := 0, 0 + matching := m.GetMatchingBlocks() + opCodes := make([]OpCode, 0, len(matching)) + for _, m := range matching { + // invariant: we've pumped out correct diffs to change + // a[:i] into b[:j], and the next matching block is + // a[ai:ai+size] == b[bj:bj+size]. So we need to pump + // out a diff to change a[i:ai] into b[j:bj], pump out + // the matching block, and move (i,j) beyond the match + ai, bj, size := m.A, m.B, m.Size + tag := byte(0) + if i < ai && j < bj { + tag = 'r' + } else if i < ai { + tag = 'd' + } else if j < bj { + tag = 'i' + } + if tag > 0 { + opCodes = append(opCodes, OpCode{tag, i, ai, j, bj}) + } + i, j = ai+size, bj+size + // the list of matching blocks is terminated by a + // sentinel with size 0 + if size > 0 { + opCodes = append(opCodes, OpCode{'e', ai, i, bj, j}) + } + } + m.opCodes = opCodes + return m.opCodes +} + +// Isolate change clusters by eliminating ranges with no changes. +// +// Return a generator of groups with up to n lines of context. +// Each group is in the same format as returned by GetOpCodes(). +func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { + if n < 0 { + n = 3 + } + codes := m.GetOpCodes() + if len(codes) == 0 { + codes = []OpCode{OpCode{'e', 0, 1, 0, 1}} + } + // Fixup leading and trailing groups if they show no changes. + if codes[0].Tag == 'e' { + c := codes[0] + i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 + codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2} + } + if codes[len(codes)-1].Tag == 'e' { + c := codes[len(codes)-1] + i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 + codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)} + } + nn := n + n + groups := [][]OpCode{} + group := []OpCode{} + for _, c := range codes { + i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 + // End the current group and start a new one whenever + // there is a large range with no changes. + if c.Tag == 'e' && i2-i1 > nn { + group = append(group, OpCode{c.Tag, i1, min(i2, i1+n), + j1, min(j2, j1+n)}) + groups = append(groups, group) + group = []OpCode{} + i1, j1 = max(i1, i2-n), max(j1, j2-n) + } + group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) + } + if len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') { + groups = append(groups, group) + } + return groups +} + +// Return a measure of the sequences' similarity (float in [0,1]). +// +// Where T is the total number of elements in both sequences, and +// M is the number of matches, this is 2.0*M / T. +// Note that this is 1 if the sequences are identical, and 0 if +// they have nothing in common. +// +// .Ratio() is expensive to compute if you haven't already computed +// .GetMatchingBlocks() or .GetOpCodes(), in which case you may +// want to try .QuickRatio() or .RealQuickRation() first to get an +// upper bound. +func (m *SequenceMatcher) Ratio() float64 { + matches := 0 + for _, m := range m.GetMatchingBlocks() { + matches += m.Size + } + return calculateRatio(matches, len(m.a)+len(m.b)) +} + +// Return an upper bound on ratio() relatively quickly. +// +// This isn't defined beyond that it is an upper bound on .Ratio(), and +// is faster to compute. +func (m *SequenceMatcher) QuickRatio() float64 { + // viewing a and b as multisets, set matches to the cardinality + // of their intersection; this counts the number of matches + // without regard to order, so is clearly an upper bound + if m.fullBCount == nil { + m.fullBCount = map[string]int{} + for _, s := range m.b { + m.fullBCount[s] = m.fullBCount[s] + 1 + } + } + + // avail[x] is the number of times x appears in 'b' less the + // number of times we've seen it in 'a' so far ... kinda + avail := map[string]int{} + matches := 0 + for _, s := range m.a { + n, ok := avail[s] + if !ok { + n = m.fullBCount[s] + } + avail[s] = n - 1 + if n > 0 { + matches += 1 + } + } + return calculateRatio(matches, len(m.a)+len(m.b)) +} + +// Return an upper bound on ratio() very quickly. +// +// This isn't defined beyond that it is an upper bound on .Ratio(), and +// is faster to compute than either .Ratio() or .QuickRatio(). +func (m *SequenceMatcher) RealQuickRatio() float64 { + la, lb := len(m.a), len(m.b) + return calculateRatio(min(la, lb), la+lb) +} + +// Convert range to the "ed" format +func formatRangeUnified(start, stop int) string { + // Per the diff spec at http://www.unix.org/single_unix_specification/ + beginning := start + 1 // lines start numbering with one + length := stop - start + if length == 1 { + return fmt.Sprintf("%d", beginning) + } + if length == 0 { + beginning -= 1 // empty ranges begin at line just before the range + } + return fmt.Sprintf("%d,%d", beginning, length) +} + +// Unified diff parameters +type UnifiedDiff struct { + A []string // First sequence lines + FromFile string // First file name + FromDate string // First file time + B []string // Second sequence lines + ToFile string // Second file name + ToDate string // Second file time + Eol string // Headers end of line, defaults to LF + Context int // Number of context lines +} + +// Compare two sequences of lines; generate the delta as a unified diff. +// +// Unified diffs are a compact way of showing line changes and a few +// lines of context. The number of context lines is set by 'n' which +// defaults to three. +// +// By default, the diff control lines (those with ---, +++, or @@) are +// created with a trailing newline. This is helpful so that inputs +// created from file.readlines() result in diffs that are suitable for +// file.writelines() since both the inputs and outputs have trailing +// newlines. +// +// For inputs that do not have trailing newlines, set the lineterm +// argument to "" so that the output will be uniformly newline free. +// +// The unidiff format normally has a header for filenames and modification +// times. Any or all of these may be specified using strings for +// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. +// The modification times are normally expressed in the ISO 8601 format. +func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { + buf := bufio.NewWriter(writer) + defer buf.Flush() + w := func(format string, args ...interface{}) error { + _, err := buf.WriteString(fmt.Sprintf(format, args...)) + return err + } + + if len(diff.Eol) == 0 { + diff.Eol = "\n" + } + + started := false + m := NewMatcher(diff.A, diff.B) + for _, g := range m.GetGroupedOpCodes(diff.Context) { + if !started { + started = true + fromDate := "" + if len(diff.FromDate) > 0 { + fromDate = "\t" + diff.FromDate + } + toDate := "" + if len(diff.ToDate) > 0 { + toDate = "\t" + diff.ToDate + } + err := w("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) + if err != nil { + return err + } + err = w("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) + if err != nil { + return err + } + } + first, last := g[0], g[len(g)-1] + range1 := formatRangeUnified(first.I1, last.I2) + range2 := formatRangeUnified(first.J1, last.J2) + if err := w("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { + return err + } + for _, c := range g { + i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 + if c.Tag == 'e' { + for _, line := range diff.A[i1:i2] { + if err := w(" " + line); err != nil { + return err + } + } + continue + } + if c.Tag == 'r' || c.Tag == 'd' { + for _, line := range diff.A[i1:i2] { + if err := w("-" + line); err != nil { + return err + } + } + } + if c.Tag == 'r' || c.Tag == 'i' { + for _, line := range diff.B[j1:j2] { + if err := w("+" + line); err != nil { + return err + } + } + } + } + } + return nil +} + +// Like WriteUnifiedDiff but returns the diff a string. +func GetUnifiedDiffString(diff UnifiedDiff) (string, error) { + w := &bytes.Buffer{} + err := WriteUnifiedDiff(w, diff) + return string(w.Bytes()), err +} + +// Convert range to the "ed" format. +func formatRangeContext(start, stop int) string { + // Per the diff spec at http://www.unix.org/single_unix_specification/ + beginning := start + 1 // lines start numbering with one + length := stop - start + if length == 0 { + beginning -= 1 // empty ranges begin at line just before the range + } + if length <= 1 { + return fmt.Sprintf("%d", beginning) + } + return fmt.Sprintf("%d,%d", beginning, beginning+length-1) +} + +type ContextDiff UnifiedDiff + +// Compare two sequences of lines; generate the delta as a context diff. +// +// Context diffs are a compact way of showing line changes and a few +// lines of context. The number of context lines is set by diff.Context +// which defaults to three. +// +// By default, the diff control lines (those with *** or ---) are +// created with a trailing newline. +// +// For inputs that do not have trailing newlines, set the diff.Eol +// argument to "" so that the output will be uniformly newline free. +// +// The context diff format normally has a header for filenames and +// modification times. Any or all of these may be specified using +// strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate. +// The modification times are normally expressed in the ISO 8601 format. +// If not specified, the strings default to blanks. +func WriteContextDiff(writer io.Writer, diff ContextDiff) error { + buf := bufio.NewWriter(writer) + defer buf.Flush() + var diffErr error + w := func(format string, args ...interface{}) { + _, err := buf.WriteString(fmt.Sprintf(format, args...)) + if diffErr == nil && err != nil { + diffErr = err + } + } + + if len(diff.Eol) == 0 { + diff.Eol = "\n" + } + + prefix := map[byte]string{ + 'i': "+ ", + 'd': "- ", + 'r': "! ", + 'e': " ", + } + + started := false + m := NewMatcher(diff.A, diff.B) + for _, g := range m.GetGroupedOpCodes(diff.Context) { + if !started { + started = true + fromDate := "" + if len(diff.FromDate) > 0 { + fromDate = "\t" + diff.FromDate + } + toDate := "" + if len(diff.ToDate) > 0 { + toDate = "\t" + diff.ToDate + } + w("*** %s%s%s", diff.FromFile, fromDate, diff.Eol) + w("--- %s%s%s", diff.ToFile, toDate, diff.Eol) + } + + first, last := g[0], g[len(g)-1] + w("***************" + diff.Eol) + + range1 := formatRangeContext(first.I1, last.I2) + w("*** %s ****%s", range1, diff.Eol) + for _, c := range g { + if c.Tag == 'r' || c.Tag == 'd' { + for _, cc := range g { + if cc.Tag == 'i' { + continue + } + for _, line := range diff.A[cc.I1:cc.I2] { + w(prefix[cc.Tag] + line) + } + } + break + } + } + + range2 := formatRangeContext(first.J1, last.J2) + w("--- %s ----%s", range2, diff.Eol) + for _, c := range g { + if c.Tag == 'r' || c.Tag == 'i' { + for _, cc := range g { + if cc.Tag == 'd' { + continue + } + for _, line := range diff.B[cc.J1:cc.J2] { + w(prefix[cc.Tag] + line) + } + } + break + } + } + } + return diffErr +} + +// Like WriteContextDiff but returns the diff a string. +func GetContextDiffString(diff ContextDiff) (string, error) { + w := &bytes.Buffer{} + err := WriteContextDiff(w, diff) + return string(w.Bytes()), err +} + +// Split a string on "\n" while preserving them. The output can be used +// as input for UnifiedDiff and ContextDiff structures. +func SplitLines(s string) []string { + lines := strings.SplitAfter(s, "\n") + lines[len(lines)-1] += "\n" + return lines +} diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/LICENCE.txt b/Godeps/_workspace/src/github.com/stretchr/testify/LICENCE.txt index a009ba467ce..473b670a7c6 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/LICENCE.txt +++ b/Godeps/_workspace/src/github.com/stretchr/testify/LICENCE.txt @@ -2,8 +2,21 @@ Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell Please consider promoting this project if you find it useful. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT +OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/LICENSE b/Godeps/_workspace/src/github.com/stretchr/testify/LICENSE new file mode 100644 index 00000000000..473b670a7c6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/stretchr/testify/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell + +Please consider promoting this project if you find it useful. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT +OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/assert/assertions.go b/Godeps/_workspace/src/github.com/stretchr/testify/assert/assertions.go index fbf03f4d82f..e95357d29c8 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/assert/assertions.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/assert/assertions.go @@ -3,6 +3,7 @@ package assert import ( "bufio" "bytes" + "encoding/json" "fmt" "math" "reflect" @@ -12,6 +13,9 @@ import ( "time" "unicode" "unicode/utf8" + + "github.com/davecgh/go-spew/spew" + "github.com/pmezard/go-difflib/difflib" ) // TestingT is an interface wrapper around *testing.T @@ -35,11 +39,7 @@ func ObjectsAreEqual(expected, actual interface{}) bool { return expected == actual } - if reflect.DeepEqual(expected, actual) { - return true - } - - return false + return reflect.DeepEqual(expected, actual) } @@ -51,12 +51,13 @@ func ObjectsAreEqualValues(expected, actual interface{}) bool { } actualType := reflect.TypeOf(actual) + if actualType == nil { + return false + } expectedValue := reflect.ValueOf(expected) - if expectedValue.Type().ConvertibleTo(actualType) { + if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) { // Attempt comparison after type conversion - if reflect.DeepEqual(actual, expectedValue.Convert(actualType).Interface()) { - return true - } + return reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), actual) } return false @@ -213,7 +214,7 @@ func Implements(t TestingT, interfaceObject interface{}, object interface{}, msg interfaceType := reflect.TypeOf(interfaceObject).Elem() if !reflect.TypeOf(object).Implements(interfaceType) { - return Fail(t, fmt.Sprintf("Object must implement %v", interfaceType), msgAndArgs...) + return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...) } return true @@ -238,8 +239,9 @@ func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if !ObjectsAreEqual(expected, actual) { + diff := diff(expected, actual) return Fail(t, fmt.Sprintf("Not equal: %#v (expected)\n"+ - " != %#v (actual)", expected, actual), msgAndArgs...) + " != %#v (actual)%s", expected, actual, diff), msgAndArgs...) } return true @@ -274,7 +276,7 @@ func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{} bType := reflect.TypeOf(actual) if aType != bType { - return Fail(t, "Types expected to match exactly", "%v != %v", aType, bType) + return Fail(t, fmt.Sprintf("Types expected to match exactly\n\r\t%v != %v", aType, bType), msgAndArgs...) } return Equal(t, expected, actual, msgAndArgs...) @@ -287,24 +289,10 @@ func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{} // // Returns whether the assertion was successful (true) or not (false). func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - - success := true - - if object == nil { - success = false - } else { - value := reflect.ValueOf(object) - kind := value.Kind() - if kind >= reflect.Chan && kind <= reflect.Slice && value.IsNil() { - success = false - } + if !isNil(object) { + return true } - - if !success { - Fail(t, "Expected value not to be nil.", msgAndArgs...) - } - - return success + return Fail(t, "Expected value not to be nil.", msgAndArgs...) } // isNil checks if a specified object is nil or not, without Failing. @@ -334,7 +322,7 @@ func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...) } -var zeros = []interface{}{ +var numericZeros = []interface{}{ int(0), int8(0), int16(0), @@ -360,7 +348,7 @@ func isEmpty(object interface{}) bool { return true } - for _, v := range zeros { + for _, v := range numericZeros { if object == v { return true } @@ -377,6 +365,9 @@ func isEmpty(object interface{}) bool { } case reflect.Ptr: { + if objValue.IsNil() { + return true + } switch object.(type) { case *time.Time: return object.(*time.Time).IsZero() @@ -391,7 +382,7 @@ func isEmpty(object interface{}) bool { // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // -// assert.Empty(t, obj) +// assert.Empty(t, obj) // // Returns whether the assertion was successful (true) or not (false). func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { @@ -408,9 +399,9 @@ func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // -// if assert.NotEmpty(t, obj) { -// assert.Equal(t, "two", obj[1]) -// } +// if assert.NotEmpty(t, obj) { +// assert.Equal(t, "two", obj[1]) +// } // // Returns whether the assertion was successful (true) or not (false). func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { @@ -469,7 +460,7 @@ func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { } -// False asserts that the specified value is true. +// False asserts that the specified value is false. // // assert.False(t, myBool, "myBool should be false") // @@ -492,7 +483,7 @@ func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if ObjectsAreEqual(expected, actual) { - return Fail(t, "Should not be equal", msgAndArgs...) + return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) } return true @@ -518,6 +509,16 @@ func includeElement(list interface{}, element interface{}) (ok, found bool) { return true, strings.Contains(listValue.String(), elementValue.String()) } + if reflect.TypeOf(list).Kind() == reflect.Map { + mapKeys := listValue.MapKeys() + for i := 0; i < len(mapKeys); i++ { + if ObjectsAreEqual(mapKeys[i].Interface(), element) { + return true, true + } + } + return true, false + } + for i := 0; i < listValue.Len(); i++ { if ObjectsAreEqual(listValue.Index(i).Interface(), element) { return true, true @@ -527,11 +528,12 @@ func includeElement(list interface{}, element interface{}) (ok, found bool) { } -// Contains asserts that the specified string or list(array, slice...) contains the +// Contains asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // // assert.Contains(t, "Hello World", "World", "But 'Hello World' does contain 'World'") // assert.Contains(t, ["Hello", "World"], "World", "But ["Hello", "World"] does contain 'World'") +// assert.Contains(t, {"Hello": "World"}, "Hello", "But {'Hello': 'World'} does contain 'Hello'") // // Returns whether the assertion was successful (true) or not (false). func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { @@ -548,11 +550,12 @@ func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bo } -// NotContains asserts that the specified string or list(array, slice...) does NOT contain the +// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // // assert.NotContains(t, "Hello World", "Earth", "But 'Hello World' does NOT contain 'Earth'") // assert.NotContains(t, ["Hello", "World"], "Earth", "But ['Hello', 'World'] does NOT contain 'Earth'") +// assert.NotContains(t, {"Hello": "World"}, "Earth", "But {'Hello': 'World'} does NOT contain 'Earth'") // // Returns whether the assertion was successful (true) or not (false). func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { @@ -808,7 +811,7 @@ func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { return true } - return Fail(t, fmt.Sprintf("No error is expected but got %v", err), msgAndArgs...) + return Fail(t, fmt.Sprintf("Received unexpected error %q", err), msgAndArgs...) } // Error asserts that a function returned an error (i.e. not `nil`). @@ -842,7 +845,7 @@ func EqualError(t TestingT, theError error, errString string, msgAndArgs ...inte return false } s := "An error with value \"%s\" is expected but got \"%s\". %s" - return Equal(t, theError.Error(), errString, + return Equal(t, errString, theError.Error(), s, errString, theError.Error(), message) } @@ -893,3 +896,84 @@ func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interf return !match } + +// Zero asserts that i is the zero value for its type and returns the truth. +func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { + if i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { + return Fail(t, fmt.Sprintf("Should be zero, but was %v", i), msgAndArgs...) + } + return true +} + +// NotZero asserts that i is not the zero value for its type and returns the truth. +func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { + if i == nil || reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { + return Fail(t, fmt.Sprintf("Should not be zero, but was %v", i), msgAndArgs...) + } + return true +} + +// JSONEq asserts that two JSON strings are equivalent. +// +// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) +// +// Returns whether the assertion was successful (true) or not (false). +func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { + var expectedJSONAsInterface, actualJSONAsInterface interface{} + + if err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil { + return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid json.\nJSON parsing error: '%s'", expected, err.Error()), msgAndArgs...) + } + + if err := json.Unmarshal([]byte(actual), &actualJSONAsInterface); err != nil { + return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid json.\nJSON parsing error: '%s'", actual, err.Error()), msgAndArgs...) + } + + return Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...) +} + +func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) { + t := reflect.TypeOf(v) + k := t.Kind() + + if k == reflect.Ptr { + t = t.Elem() + k = t.Kind() + } + return t, k +} + +// diff returns a diff of both values as long as both are of the same type and +// are a struct, map, slice or array. Otherwise it returns an empty string. +func diff(expected interface{}, actual interface{}) string { + if expected == nil || actual == nil { + return "" + } + + et, ek := typeAndKind(expected) + at, _ := typeAndKind(actual) + + if et != at { + return "" + } + + if ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array { + return "" + } + + spew.Config.SortKeys = true + e := spew.Sdump(expected) + a := spew.Sdump(actual) + + diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{ + A: difflib.SplitLines(e), + B: difflib.SplitLines(a), + FromFile: "Expected", + FromDate: "", + ToFile: "Actual", + ToDate: "", + Context: 1, + }) + + return "\n\nDiff:\n" + diff +} diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/assert/doc.go b/Godeps/_workspace/src/github.com/stretchr/testify/assert/doc.go index f678106287b..c9dccc4d6cd 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/assert/doc.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/assert/doc.go @@ -17,7 +17,7 @@ // // } // -// if you assert many times, use the below: +// if you assert many times, use the format below: // // import ( // "testing" @@ -42,113 +42,4 @@ // // Every assertion function also takes an optional string message as the final argument, // allowing custom error messages to be appended to the message the assertion method outputs. -// -// Here is an overview of the assert functions: -// -// assert.Equal(t, expected, actual [, message [, format-args]]) -// -// assert.EqualValues(t, expected, actual [, message [, format-args]]) -// -// assert.NotEqual(t, notExpected, actual [, message [, format-args]]) -// -// assert.True(t, actualBool [, message [, format-args]]) -// -// assert.False(t, actualBool [, message [, format-args]]) -// -// assert.Nil(t, actualObject [, message [, format-args]]) -// -// assert.NotNil(t, actualObject [, message [, format-args]]) -// -// assert.Empty(t, actualObject [, message [, format-args]]) -// -// assert.NotEmpty(t, actualObject [, message [, format-args]]) -// -// assert.Len(t, actualObject, expectedLength, [, message [, format-args]]) -// -// assert.Error(t, errorObject [, message [, format-args]]) -// -// assert.NoError(t, errorObject [, message [, format-args]]) -// -// assert.EqualError(t, theError, errString [, message [, format-args]]) -// -// assert.Implements(t, (*MyInterface)(nil), new(MyObject) [,message [, format-args]]) -// -// assert.IsType(t, expectedObject, actualObject [, message [, format-args]]) -// -// assert.Contains(t, stringOrSlice, substringOrElement [, message [, format-args]]) -// -// assert.NotContains(t, stringOrSlice, substringOrElement [, message [, format-args]]) -// -// assert.Panics(t, func(){ -// -// // call code that should panic -// -// } [, message [, format-args]]) -// -// assert.NotPanics(t, func(){ -// -// // call code that should not panic -// -// } [, message [, format-args]]) -// -// assert.WithinDuration(t, timeA, timeB, deltaTime, [, message [, format-args]]) -// -// assert.InDelta(t, numA, numB, delta, [, message [, format-args]]) -// -// assert.InEpsilon(t, numA, numB, epsilon, [, message [, format-args]]) -// -// assert package contains Assertions object. it has assertion methods. -// -// Here is an overview of the assert functions: -// assert.Equal(expected, actual [, message [, format-args]]) -// -// assert.EqualValues(expected, actual [, message [, format-args]]) -// -// assert.NotEqual(notExpected, actual [, message [, format-args]]) -// -// assert.True(actualBool [, message [, format-args]]) -// -// assert.False(actualBool [, message [, format-args]]) -// -// assert.Nil(actualObject [, message [, format-args]]) -// -// assert.NotNil(actualObject [, message [, format-args]]) -// -// assert.Empty(actualObject [, message [, format-args]]) -// -// assert.NotEmpty(actualObject [, message [, format-args]]) -// -// assert.Len(actualObject, expectedLength, [, message [, format-args]]) -// -// assert.Error(errorObject [, message [, format-args]]) -// -// assert.NoError(errorObject [, message [, format-args]]) -// -// assert.EqualError(theError, errString [, message [, format-args]]) -// -// assert.Implements((*MyInterface)(nil), new(MyObject) [,message [, format-args]]) -// -// assert.IsType(expectedObject, actualObject [, message [, format-args]]) -// -// assert.Contains(stringOrSlice, substringOrElement [, message [, format-args]]) -// -// assert.NotContains(stringOrSlice, substringOrElement [, message [, format-args]]) -// -// assert.Panics(func(){ -// -// // call code that should panic -// -// } [, message [, format-args]]) -// -// assert.NotPanics(func(){ -// -// // call code that should not panic -// -// } [, message [, format-args]]) -// -// assert.WithinDuration(timeA, timeB, deltaTime, [, message [, format-args]]) -// -// assert.InDelta(numA, numB, delta, [, message [, format-args]]) -// -// assert.InEpsilon(numA, numB, epsilon, [, message [, format-args]]) package assert diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/assert/forward_assertions.go b/Godeps/_workspace/src/github.com/stretchr/testify/assert/forward_assertions.go index d8d3f531ea1..fe6b664e076 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/assert/forward_assertions.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/assert/forward_assertions.go @@ -81,7 +81,7 @@ func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or a // slice with len == 0. // -// assert.Empty(obj) +// assert.Empty(obj) // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { @@ -91,9 +91,9 @@ func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or a // slice with len == 0. // -// if assert.NotEmpty(obj) { -// assert.Equal("two", obj[1]) -// } +// if assert.NotEmpty(obj) { +// assert.Equal("two", obj[1]) +// } // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { @@ -119,7 +119,7 @@ func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { return True(a.t, value, msgAndArgs...) } -// False asserts that the specified value is true. +// False asserts that the specified value is false. // // assert.False(myBool, "myBool should be false") // @@ -263,3 +263,22 @@ func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...inter func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { return NotRegexp(a.t, rx, str, msgAndArgs...) } + +// Zero asserts that i is the zero value for its type and returns the truth. +func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool { + return Zero(a.t, i, msgAndArgs...) +} + +// NotZero asserts that i is not the zero value for its type and returns the truth. +func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool { + return NotZero(a.t, i, msgAndArgs...) +} + +// JSONEq asserts that two JSON strings are equivalent. +// +// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) +// +// Returns whether the assertion was successful (true) or not (false). +func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool { + return JSONEq(a.t, expected, actual, msgAndArgs...) +} diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/assert/http_assertions.go b/Godeps/_workspace/src/github.com/stretchr/testify/assert/http_assertions.go index 1246e58e0ef..437a86ce476 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/assert/http_assertions.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/assert/http_assertions.go @@ -10,9 +10,9 @@ import ( // httpCode is a helper that returns HTTP code of the response. It returns -1 // if building a new request fails. -func httpCode(handler http.HandlerFunc, mode, url string, values url.Values) int { +func httpCode(handler http.HandlerFunc, method, url string, values url.Values) int { w := httptest.NewRecorder() - req, err := http.NewRequest(mode, url+"?"+values.Encode(), nil) + req, err := http.NewRequest(method, url+"?"+values.Encode(), nil) if err != nil { return -1 } @@ -25,8 +25,8 @@ func httpCode(handler http.HandlerFunc, mode, url string, values url.Values) int // assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) // // Returns whether the assertion was successful (true) or not (false). -func HTTPSuccess(t TestingT, handler http.HandlerFunc, mode, url string, values url.Values) bool { - code := httpCode(handler, mode, url, values) +func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool { + code := httpCode(handler, method, url, values) if code == -1 { return false } @@ -38,8 +38,8 @@ func HTTPSuccess(t TestingT, handler http.HandlerFunc, mode, url string, values // assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). -func HTTPRedirect(t TestingT, handler http.HandlerFunc, mode, url string, values url.Values) bool { - code := httpCode(handler, mode, url, values) +func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool { + code := httpCode(handler, method, url, values) if code == -1 { return false } @@ -51,8 +51,8 @@ func HTTPRedirect(t TestingT, handler http.HandlerFunc, mode, url string, values // assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). -func HTTPError(t TestingT, handler http.HandlerFunc, mode, url string, values url.Values) bool { - code := httpCode(handler, mode, url, values) +func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool { + code := httpCode(handler, method, url, values) if code == -1 { return false } @@ -61,9 +61,9 @@ func HTTPError(t TestingT, handler http.HandlerFunc, mode, url string, values ur // HTTPBody is a helper that returns HTTP body of the response. It returns // empty string if building a new request fails. -func HTTPBody(handler http.HandlerFunc, mode, url string, values url.Values) string { +func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string { w := httptest.NewRecorder() - req, err := http.NewRequest(mode, url+"?"+values.Encode(), nil) + req, err := http.NewRequest(method, url+"?"+values.Encode(), nil) if err != nil { return "" } @@ -77,8 +77,8 @@ func HTTPBody(handler http.HandlerFunc, mode, url string, values url.Values) str // assert.HTTPBodyContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContains(t TestingT, handler http.HandlerFunc, mode, url string, values url.Values, str interface{}) bool { - body := HTTPBody(handler, mode, url, values) +func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}) bool { + body := HTTPBody(handler, method, url, values) contains := strings.Contains(body, fmt.Sprint(str)) if !contains { @@ -94,8 +94,8 @@ func HTTPBodyContains(t TestingT, handler http.HandlerFunc, mode, url string, va // assert.HTTPBodyNotContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, mode, url string, values url.Values, str interface{}) bool { - body := HTTPBody(handler, mode, url, values) +func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}) bool { + body := HTTPBody(handler, method, url, values) contains := strings.Contains(body, fmt.Sprint(str)) if contains { @@ -114,8 +114,8 @@ func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, mode, url string, // assert.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, mode, url string, values url.Values) bool { - return HTTPSuccess(a.t, handler, mode, url, values) +func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method, url string, values url.Values) bool { + return HTTPSuccess(a.t, handler, method, url, values) } // HTTPRedirect asserts that a specified handler returns a redirect status code. @@ -123,8 +123,8 @@ func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, mode, url string, val // assert.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, mode, url string, values url.Values) bool { - return HTTPRedirect(a.t, handler, mode, url, values) +func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method, url string, values url.Values) bool { + return HTTPRedirect(a.t, handler, method, url, values) } // HTTPError asserts that a specified handler returns an error status code. @@ -132,8 +132,8 @@ func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, mode, url string, va // assert.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPError(handler http.HandlerFunc, mode, url string, values url.Values) bool { - return HTTPError(a.t, handler, mode, url, values) +func (a *Assertions) HTTPError(handler http.HandlerFunc, method, url string, values url.Values) bool { + return HTTPError(a.t, handler, method, url, values) } // HTTPBodyContains asserts that a specified handler returns a @@ -142,8 +142,8 @@ func (a *Assertions) HTTPError(handler http.HandlerFunc, mode, url string, value // assert.HTTPBodyContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, mode, url string, values url.Values, str interface{}) bool { - return HTTPBodyContains(a.t, handler, mode, url, values, str) +func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method, url string, values url.Values, str interface{}) bool { + return HTTPBodyContains(a.t, handler, method, url, values, str) } // HTTPBodyNotContains asserts that a specified handler returns a @@ -152,6 +152,6 @@ func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, mode, url string // assert.HTTPBodyNotContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, mode, url string, values url.Values, str interface{}) bool { - return HTTPBodyNotContains(a.t, handler, mode, url, values, str) +func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method, url string, values url.Values, str interface{}) bool { + return HTTPBodyNotContains(a.t, handler, method, url, values, str) } diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/mock/mock.go b/Godeps/_workspace/src/github.com/stretchr/testify/mock/mock.go index 007643f624f..111a281b4d3 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/mock/mock.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/mock/mock.go @@ -3,6 +3,7 @@ package mock import ( "fmt" "reflect" + "regexp" "runtime" "strings" "sync" @@ -25,6 +26,7 @@ type TestingT interface { // Call represents a method call and is used for setting expectations, // as well as recording activity. type Call struct { + Parent *Mock // The name of the method that was or will be called. Method string @@ -47,24 +49,113 @@ type Call struct { // Holds a handler used to manipulate arguments content that are passed by // reference. It's useful when mocking methods such as unmarshalers or // decoders. - Run func(Arguments) + RunFn func(Arguments) +} + +func newCall(parent *Mock, methodName string, methodArguments ...interface{}) *Call { + return &Call{ + Parent: parent, + Method: methodName, + Arguments: methodArguments, + ReturnArguments: make([]interface{}, 0), + Repeatability: 0, + WaitFor: nil, + RunFn: nil, + } +} + +func (self *Call) lock() { + self.Parent.mutex.Lock() +} + +func (self *Call) unlock() { + self.Parent.mutex.Unlock() +} + +func (self *Call) Return(returnArguments ...interface{}) *Call { + self.lock() + defer self.unlock() + + self.ReturnArguments = returnArguments + + return self +} + +// Once indicates that that the mock should only return the value once. +// +// Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Once() +func (self *Call) Once() *Call { + return self.Times(1) +} + +// Twice indicates that that the mock should only return the value twice. +// +// Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Twice() +func (self *Call) Twice() *Call { + return self.Times(2) +} + +// Times indicates that that the mock should only return the indicated number +// of times. +// +// Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Times(5) +func (self *Call) Times(i int) *Call { + self.lock() + defer self.unlock() + self.Repeatability = i + return self +} + +// WaitUntil sets the channel that will block the mock's return until its closed +// or a message is received. +// +// Mock.On("MyMethod", arg1, arg2).WaitUntil(time.After(time.Second)) +func (self *Call) WaitUntil(w <-chan time.Time) *Call { + self.lock() + defer self.unlock() + self.WaitFor = w + return self +} + +// After sets how long to block until the call returns +// +// Mock.On("MyMethod", arg1, arg2).After(time.Second) +func (self *Call) After(d time.Duration) *Call { + return self.WaitUntil(time.After(d)) +} + +// Run sets a handler to be called before returning. It can be used when +// mocking a method such as unmarshalers that takes a pointer to a struct and +// sets properties in such struct +// +// Mock.On("Unmarshal", AnythingOfType("*map[string]interface{}").Return().Run(function(args Arguments) { +// arg := args.Get(0).(*map[string]interface{}) +// arg["foo"] = "bar" +// }) +func (self *Call) Run(fn func(Arguments)) *Call { + self.lock() + defer self.unlock() + self.RunFn = fn + return self +} + +// On chains a new expectation description onto the mocked interface. This +// allows syntax like. +// +// Mock. +// On("MyMethod", 1).Return(nil). +// On("MyOtherMethod", 'a', 'b', 'c').Return(errors.New("Some Error")) +func (self *Call) On(methodName string, arguments ...interface{}) *Call { + return self.Parent.On(methodName, arguments...) } // Mock is the workhorse used to track activity on another object. -// For an example of its usage, refer to the "Example Usage" section at the top of this document. +// For an example of its usage, refer to the "Example Usage" section at the top +// of this document. type Mock struct { - - // The method name that is currently - // being referred to by the On method. - onMethodName string - - // An array of the arguments that are - // currently being referred to by the On method. - onMethodArguments Arguments - // Represents the calls that are expected of // an object. - ExpectedCalls []Call + ExpectedCalls []*Call // Holds the calls that were made to this mocked object. Calls []Call @@ -95,103 +186,33 @@ func (m *Mock) TestData() objx.Map { // being called. // // Mock.On("MyMethod", arg1, arg2) -func (m *Mock) On(methodName string, arguments ...interface{}) *Mock { - m.onMethodName = methodName - m.onMethodArguments = arguments - +func (self *Mock) On(methodName string, arguments ...interface{}) *Call { for _, arg := range arguments { if v := reflect.ValueOf(arg); v.Kind() == reflect.Func { panic(fmt.Sprintf("cannot use Func in expectations. Use mock.AnythingOfType(\"%T\")", arg)) } } - return m + self.mutex.Lock() + defer self.mutex.Unlock() + c := newCall(self, methodName, arguments...) + self.ExpectedCalls = append(self.ExpectedCalls, c) + return c } -// Return finishes a description of an expectation of the method (and arguments) -// specified in the most recent On method call. -// -// Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2) -func (m *Mock) Return(returnArguments ...interface{}) *Mock { - m.mutex.Lock() - defer m.mutex.Unlock() - - m.ExpectedCalls = append(m.ExpectedCalls, Call{m.onMethodName, m.onMethodArguments, returnArguments, 0, nil, nil}) - return m -} - -// Once indicates that that the mock should only return the value once. -// -// Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Once() -func (m *Mock) Once() { - m.mutex.Lock() - m.ExpectedCalls[len(m.ExpectedCalls)-1].Repeatability = 1 - m.mutex.Unlock() -} - -// Twice indicates that that the mock should only return the value twice. -// -// Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Twice() -func (m *Mock) Twice() { - m.mutex.Lock() - m.ExpectedCalls[len(m.ExpectedCalls)-1].Repeatability = 2 - m.mutex.Unlock() -} - -// Times indicates that that the mock should only return the indicated number -// of times. -// -// Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Times(5) -func (m *Mock) Times(i int) { - m.mutex.Lock() - m.ExpectedCalls[len(m.ExpectedCalls)-1].Repeatability = i - m.mutex.Unlock() -} - -// WaitUntil sets the channel that will block the mock's return until its closed -// or a message is received. -// -// Mock.On("MyMethod", arg1, arg2).WaitUntil(time.After(time.Second)) -func (m *Mock) WaitUntil(w <-chan time.Time) *Mock { - m.mutex.Lock() - m.ExpectedCalls[len(m.ExpectedCalls)-1].WaitFor = w - m.mutex.Unlock() - return m -} - -// After sets how long to block until the call returns -// -// Mock.On("MyMethod", arg1, arg2).After(time.Second) -func (m *Mock) After(d time.Duration) *Mock { - return m.WaitUntil(time.After(d)) -} - -// Run sets a handler to be called before returning. It can be used when -// mocking a method such as unmarshalers that takes a pointer to a struct and -// sets properties in such struct -// -// Mock.On("Unmarshal", AnythingOfType("*map[string]interface{}").Return().Run(function(args Arguments) { -// arg := args.Get(0).(*map[string]interface{}) -// arg["foo"] = "bar" -// }) -func (m *Mock) Run(fn func(Arguments)) *Mock { - m.mutex.Lock() - m.ExpectedCalls[len(m.ExpectedCalls)-1].Run = fn - m.mutex.Unlock() - return m -} - -/* - Recording and responding to activity -*/ +// /* +// Recording and responding to activity +// */ func (m *Mock) findExpectedCall(method string, arguments ...interface{}) (int, *Call) { - for i, call := range m.expectedCalls() { + m.mutex.Lock() + defer m.mutex.Unlock() + for i, call := range m.ExpectedCalls { if call.Method == method && call.Repeatability > -1 { _, diffCount := call.Arguments.Diff(arguments) if diffCount == 0 { - return i, &call + return i, call } } @@ -209,7 +230,7 @@ func (m *Mock) findClosestCall(method string, arguments ...interface{}) (bool, * _, tempDiffCount := call.Arguments.Diff(arguments) if tempDiffCount < diffCount || diffCount == 0 { diffCount = tempDiffCount - closestCall = &call + closestCall = call } } @@ -228,7 +249,7 @@ func callString(method string, arguments Arguments, includeArgumentValues bool) if includeArgumentValues { var argVals []string for argIndex, arg := range arguments { - argVals = append(argVals, fmt.Sprintf("%d: %v", argIndex, arg)) + argVals = append(argVals, fmt.Sprintf("%d: %#v", argIndex, arg)) } argValsString = fmt.Sprintf("\n\t\t%s", strings.Join(argVals, "\n\t\t")) } @@ -247,6 +268,14 @@ func (m *Mock) Called(arguments ...interface{}) Arguments { panic("Couldn't get the caller information") } functionPath := runtime.FuncForPC(pc).Name() + //Next four lines are required to use GCCGO function naming conventions. + //For Ex: github_com_docker_libkv_store_mock.WatchTree.pN39_github_com_docker_libkv_store_mock.Mock + //uses inteface information unlike golang github.com/docker/libkv/store/mock.(*Mock).WatchTree + //With GCCGO we need to remove interface information starting from pN

. + re := regexp.MustCompile("\\.pN\\d+_") + if re.MatchString(functionPath) { + functionPath = re.Split(functionPath, -1)[0] + } parts := strings.Split(functionPath, ".") functionName := parts[len(parts)-1] @@ -272,17 +301,16 @@ func (m *Mock) Called(arguments ...interface{}) Arguments { switch { case call.Repeatability == 1: call.Repeatability = -1 - m.ExpectedCalls[found] = *call + case call.Repeatability > 1: call.Repeatability -= 1 - m.ExpectedCalls[found] = *call } m.mutex.Unlock() } // add the call m.mutex.Lock() - m.Calls = append(m.Calls, Call{functionName, arguments, make([]interface{}, 0), 0, nil, nil}) + m.Calls = append(m.Calls, *newCall(m, functionName, arguments...)) m.mutex.Unlock() // block if specified @@ -290,12 +318,11 @@ func (m *Mock) Called(arguments ...interface{}) Arguments { <-call.WaitFor } - if call.Run != nil { - call.Run(arguments) + if call.RunFn != nil { + call.RunFn(arguments) } return call.ReturnArguments - } /* @@ -324,16 +351,19 @@ func (m *Mock) AssertExpectations(t TestingT) bool { // iterate through each expectation expectedCalls := m.expectedCalls() for _, expectedCall := range expectedCalls { - switch { - case !m.methodWasCalled(expectedCall.Method, expectedCall.Arguments): + if !m.methodWasCalled(expectedCall.Method, expectedCall.Arguments) { somethingMissing = true failedExpectations++ t.Logf("\u274C\t%s(%s)", expectedCall.Method, expectedCall.Arguments.String()) - case expectedCall.Repeatability > 0: - somethingMissing = true - failedExpectations++ - default: - t.Logf("\u2705\t%s(%s)", expectedCall.Method, expectedCall.Arguments.String()) + } else { + m.mutex.Lock() + if expectedCall.Repeatability > 0 { + somethingMissing = true + failedExpectations++ + } else { + t.Logf("\u2705\t%s(%s)", expectedCall.Method, expectedCall.Arguments.String()) + } + m.mutex.Unlock() } } @@ -352,7 +382,7 @@ func (m *Mock) AssertNumberOfCalls(t TestingT, methodName string, expectedCalls actualCalls++ } } - return assert.Equal(t, actualCalls, expectedCalls, fmt.Sprintf("Expected number of calls (%d) does not match the actual number of calls (%d).", expectedCalls, actualCalls)) + return assert.Equal(t, expectedCalls, actualCalls, fmt.Sprintf("Expected number of calls (%d) does not match the actual number of calls (%d).", expectedCalls, actualCalls)) } // AssertCalled asserts that the method was called. @@ -390,10 +420,10 @@ func (m *Mock) methodWasCalled(methodName string, expected []interface{}) bool { return false } -func (m *Mock) expectedCalls() []Call { +func (m *Mock) expectedCalls() []*Call { m.mutex.Lock() defer m.mutex.Unlock() - return append([]Call{}, m.ExpectedCalls...) + return append([]*Call{}, m.ExpectedCalls...) } func (m *Mock) calls() []Call { diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/require/doc.go b/Godeps/_workspace/src/github.com/stretchr/testify/require/doc.go index 7b38438f5a9..bc16147041f 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/require/doc.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/require/doc.go @@ -24,54 +24,4 @@ // // Every assertion function also takes an optional string message as the final argument, // allowing custom error messages to be appended to the message the assertion method outputs. -// -// Here is an overview of the assert functions: -// -// require.Equal(t, expected, actual [, message [, format-args]) -// -// require.NotEqual(t, notExpected, actual [, message [, format-args]]) -// -// require.True(t, actualBool [, message [, format-args]]) -// -// require.False(t, actualBool [, message [, format-args]]) -// -// require.Nil(t, actualObject [, message [, format-args]]) -// -// require.NotNil(t, actualObject [, message [, format-args]]) -// -// require.Empty(t, actualObject [, message [, format-args]]) -// -// require.NotEmpty(t, actualObject [, message [, format-args]]) -// -// require.Error(t, errorObject [, message [, format-args]]) -// -// require.NoError(t, errorObject [, message [, format-args]]) -// -// require.EqualError(t, theError, errString [, message [, format-args]]) -// -// require.Implements(t, (*MyInterface)(nil), new(MyObject) [,message [, format-args]]) -// -// require.IsType(t, expectedObject, actualObject [, message [, format-args]]) -// -// require.Contains(t, string, substring [, message [, format-args]]) -// -// require.NotContains(t, string, substring [, message [, format-args]]) -// -// require.Panics(t, func(){ -// -// // call code that should panic -// -// } [, message [, format-args]]) -// -// require.NotPanics(t, func(){ -// -// // call code that should not panic -// -// } [, message [, format-args]]) -// -// require.WithinDuration(t, timeA, timeB, deltaTime, [, message [, format-args]]) -// -// require.InDelta(t, numA, numB, delta, [, message [, format-args]]) -// -// require.InEpsilon(t, numA, numB, epsilon, [, message [, format-args]]) package require diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/require/forward_requirements.go b/Godeps/_workspace/src/github.com/stretchr/testify/require/forward_requirements.go index 069d4198400..ee84abc346c 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/require/forward_requirements.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/require/forward_requirements.go @@ -93,7 +93,7 @@ func (a *Assertions) True(value bool, msgAndArgs ...interface{}) { True(a.t, value, msgAndArgs...) } -// False asserts that the specified value is true. +// False asserts that the specified value is false. // // require.False(myBool, "myBool should be false") func (a *Assertions) False(value bool, msgAndArgs ...interface{}) { @@ -209,3 +209,22 @@ func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...inter func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) { NotRegexp(a.t, rx, str, msgAndArgs...) } + +// Zero asserts that i is the zero value for its type and returns the truth. +func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) { + Zero(a.t, i, msgAndArgs...) +} + +// NotZero asserts that i is not the zero value for its type and returns the truth. +func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) { + NotZero(a.t, i, msgAndArgs...) +} + +// JSONEq asserts that two JSON strings are equivalent. +// +// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) +// +// Returns whether the assertion was successful (true) or not (false). +func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) { + JSONEq(a.t, expected, actual, msgAndArgs...) +} diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/require/requirements.go b/Godeps/_workspace/src/github.com/stretchr/testify/require/requirements.go index 122a3f3abd8..d46cfe5a291 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/require/requirements.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/require/requirements.go @@ -1,6 +1,7 @@ package require import ( + "encoding/json" "time" "github.com/stretchr/testify/assert" @@ -118,7 +119,7 @@ func True(t TestingT, value bool, msgAndArgs ...interface{}) { } } -// False asserts that the specified value is true. +// False asserts that the specified value is false. // // require.False(t, myBool, "myBool should be false") func False(t TestingT, value bool, msgAndArgs ...interface{}) { @@ -136,9 +137,12 @@ func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{ } } -// Contains asserts that the specified string contains the specified substring. +// Contains asserts that the specified string, list(array, slice...) or map contains the +// specified substring or element. // // require.Contains(t, "Hello World", "World", "But 'Hello World' does contain 'World'") +// require.Contains(t, ["Hello", "World"], "World", "But ["Hello", "World"] does contain 'World'") +// require.Contains(t, {"Hello": "World"}, "Hello", "But {'Hello': 'World'} does contain 'Hello'") func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) { if !assert.Contains(t, s, contains, msgAndArgs...) { t.FailNow() @@ -228,6 +232,25 @@ func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interf } } +// JSONEq asserts that two JSON strings are equivalent. +// +// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) +// +// Returns whether the assertion was successful (true) or not (false). +func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) { + var expectedJSONAsInterface, actualJSONAsInterface interface{} + + if err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil { + t.FailNow() + } + + if err := json.Unmarshal([]byte(actual), &actualJSONAsInterface); err != nil { + t.FailNow() + } + + Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...) +} + /* Errors */ @@ -269,3 +292,17 @@ func EqualError(t TestingT, theError error, errString string, msgAndArgs ...inte t.FailNow() } } + +// Zero asserts that i is the zero value for its type and returns the truth. +func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) { + if !assert.Zero(t, i, msgAndArgs...) { + t.FailNow() + } +} + +// NotZero asserts that i is not the zero value for its type and returns the truth. +func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) { + if !assert.NotZero(t, i, msgAndArgs...) { + t.FailNow() + } +} diff --git a/cluster/mesos/docker/docker-compose.yml b/cluster/mesos/docker/docker-compose.yml index 072aed889e2..df098f69689 100644 --- a/cluster/mesos/docker/docker-compose.yml +++ b/cluster/mesos/docker/docker-compose.yml @@ -13,7 +13,7 @@ etcd: --initial-cluster-state new mesosmaster1: hostname: mesosmaster1 - image: mesosphere/mesos:0.24.0-1.0.27.ubuntu1404 + image: mesosphere/mesos:0.26.0-0.2.145.ubuntu1404 entrypoint: [ "mesos-master" ] ports: [ "5050:5050" ] environment: @@ -30,7 +30,7 @@ mesosmaster1: mesosslave: hostname: mesosslave privileged: true - image: mesosphere/mesos-slave-dind:0.2.2_mesos-0.24.0_docker-1.8.2_ubuntu-14.04.3 + image: mesosphere/mesos-slave-dind:0.2.4_mesos-0.26.0_docker-1.8.2_ubuntu-14.04.3 ports: [ "10248","10249" ] entrypoint: - bash diff --git a/contrib/mesos/pkg/scheduler/components/framework/driver_mock.go b/contrib/mesos/pkg/scheduler/components/framework/driver_mock.go index 6074ff2a8c3..98dc1b13dd6 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/driver_mock.go +++ b/contrib/mesos/pkg/scheduler/components/framework/driver_mock.go @@ -56,10 +56,11 @@ type extendedMock struct { // Upon returns a chan that closes upon the execution of the most recently registered call. func (m *extendedMock) Upon() <-chan struct{} { + // TODO(jdef) this isn't thread safe, should make it so ch := make(chan struct{}) - call := &m.ExpectedCalls[len(m.ExpectedCalls)-1] - f := call.Run - call.Run = func(args mock.Arguments) { + call := m.ExpectedCalls[len(m.ExpectedCalls)-1] + f := call.RunFn + call.RunFn = func(args mock.Arguments) { defer close(ch) if f != nil { f(args) @@ -107,6 +108,11 @@ func (m *MockSchedulerDriver) RequestResources(r []*mesos.Request) (mesos.Status return status(args, 0), args.Error(1) } +func (m *MockSchedulerDriver) AcceptOffers(ids []*mesos.OfferID, ops []*mesos.Offer_Operation, f *mesos.Filters) (mesos.Status, error) { + args := m.Called(ids, ops, f) + return status(args, 0), args.Error(1) +} + func (m *MockSchedulerDriver) ReconcileTasks(statuses []*mesos.TaskStatus) (mesos.Status, error) { args := m.Called(statuses) return status(args, 0), args.Error(1) diff --git a/contrib/mesos/pkg/scheduler/service/service.go b/contrib/mesos/pkg/scheduler/service/service.go index 1ceb05cc975..e67c9606141 100644 --- a/contrib/mesos/pkg/scheduler/service/service.go +++ b/contrib/mesos/pkg/scheduler/service/service.go @@ -18,7 +18,6 @@ package service import ( "bufio" - "errors" "fmt" "io/ioutil" "net" @@ -947,16 +946,15 @@ func (s *SchedulerServer) buildFrameworkInfo() (info *mesos.FrameworkInfo, cred if s.mesosAuthPrincipal != "" { info.Principal = proto.String(s.mesosAuthPrincipal) - if s.mesosAuthSecretFile == "" { - return nil, nil, errors.New("authentication principal specified without the required credentials file") - } - secret, err := ioutil.ReadFile(s.mesosAuthSecretFile) - if err != nil { - return nil, nil, err - } cred = &mesos.Credential{ Principal: proto.String(s.mesosAuthPrincipal), - Secret: secret, + } + if s.mesosAuthSecretFile != "" { + secret, err := ioutil.ReadFile(s.mesosAuthSecretFile) + if err != nil { + return nil, nil, err + } + cred.Secret = proto.String(string(secret)) } } return diff --git a/hack/update-godep-licenses.sh b/hack/update-godep-licenses.sh index 4f0c70bf629..d6bd8cc4bb2 100755 --- a/hack/update-godep-licenses.sh +++ b/hack/update-godep-licenses.sh @@ -40,6 +40,6 @@ exec docker run --rm -i -v "${KUBE_ROOT}:/repo" mesosphere/godep-licenses:latest -e github.com/shurcooL/sanitized_anchor_name:MIT? \ -e github.com/spf13/cobra:Apache-2 \ -e github.com/stretchr/objx:MIT? \ - -e github.com/stretchr/testify:MIT? \ -e github.com/docker/spdystream:SeeFile \ + -e gopkg.in/yaml.v2:LesserExceptionGPLVer3-TOOLONG \ -o md > Godeps/LICENSES.md