github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/clusterversion/cluster_version.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: clusterversion/cluster_version.proto 3 4 package clusterversion 5 6 import proto "github.com/gogo/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 import roachpb "github.com/cockroachdb/cockroach/pkg/roachpb" 10 11 import io "io" 12 13 // Reference imports to suppress errors if they are not otherwise used. 14 var _ = proto.Marshal 15 var _ = fmt.Errorf 16 var _ = math.Inf 17 18 // This is a compile-time assertion to ensure that this generated file 19 // is compatible with the proto package it is being compiled against. 20 // A compilation error at this line likely means your copy of the 21 // proto package needs to be updated. 22 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 23 24 // ClusterVersion represents a cluster's "active version". It is returned by the 25 // Version cluster setting. Its IsActive() method can be used to determine if a 26 // particular migration is to be considered enabled or disabled. 27 type ClusterVersion struct { 28 // The version of functionality in use in the cluster. This value must 29 // monotonically increase. 30 roachpb.Version `protobuf:"bytes,2,opt,name=active_version,json=activeVersion,proto3,embedded=active_version" json:"active_version"` 31 } 32 33 func (m *ClusterVersion) Reset() { *m = ClusterVersion{} } 34 func (*ClusterVersion) ProtoMessage() {} 35 func (*ClusterVersion) Descriptor() ([]byte, []int) { 36 return fileDescriptor_cluster_version_3f03e67a33fb82fb, []int{0} 37 } 38 func (m *ClusterVersion) XXX_Unmarshal(b []byte) error { 39 return m.Unmarshal(b) 40 } 41 func (m *ClusterVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 b = b[:cap(b)] 43 n, err := m.MarshalTo(b) 44 if err != nil { 45 return nil, err 46 } 47 return b[:n], nil 48 } 49 func (dst *ClusterVersion) XXX_Merge(src proto.Message) { 50 xxx_messageInfo_ClusterVersion.Merge(dst, src) 51 } 52 func (m *ClusterVersion) XXX_Size() int { 53 return m.Size() 54 } 55 func (m *ClusterVersion) XXX_DiscardUnknown() { 56 xxx_messageInfo_ClusterVersion.DiscardUnknown(m) 57 } 58 59 var xxx_messageInfo_ClusterVersion proto.InternalMessageInfo 60 61 func init() { 62 proto.RegisterType((*ClusterVersion)(nil), "cockroach.base.ClusterVersion") 63 } 64 func (m *ClusterVersion) Marshal() (dAtA []byte, err error) { 65 size := m.Size() 66 dAtA = make([]byte, size) 67 n, err := m.MarshalTo(dAtA) 68 if err != nil { 69 return nil, err 70 } 71 return dAtA[:n], nil 72 } 73 74 func (m *ClusterVersion) MarshalTo(dAtA []byte) (int, error) { 75 var i int 76 _ = i 77 var l int 78 _ = l 79 dAtA[i] = 0x12 80 i++ 81 i = encodeVarintClusterVersion(dAtA, i, uint64(m.Version.Size())) 82 n1, err := m.Version.MarshalTo(dAtA[i:]) 83 if err != nil { 84 return 0, err 85 } 86 i += n1 87 return i, nil 88 } 89 90 func encodeVarintClusterVersion(dAtA []byte, offset int, v uint64) int { 91 for v >= 1<<7 { 92 dAtA[offset] = uint8(v&0x7f | 0x80) 93 v >>= 7 94 offset++ 95 } 96 dAtA[offset] = uint8(v) 97 return offset + 1 98 } 99 func (m *ClusterVersion) Size() (n int) { 100 if m == nil { 101 return 0 102 } 103 var l int 104 _ = l 105 l = m.Version.Size() 106 n += 1 + l + sovClusterVersion(uint64(l)) 107 return n 108 } 109 110 func sovClusterVersion(x uint64) (n int) { 111 for { 112 n++ 113 x >>= 7 114 if x == 0 { 115 break 116 } 117 } 118 return n 119 } 120 func sozClusterVersion(x uint64) (n int) { 121 return sovClusterVersion(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 122 } 123 func (m *ClusterVersion) Unmarshal(dAtA []byte) error { 124 l := len(dAtA) 125 iNdEx := 0 126 for iNdEx < l { 127 preIndex := iNdEx 128 var wire uint64 129 for shift := uint(0); ; shift += 7 { 130 if shift >= 64 { 131 return ErrIntOverflowClusterVersion 132 } 133 if iNdEx >= l { 134 return io.ErrUnexpectedEOF 135 } 136 b := dAtA[iNdEx] 137 iNdEx++ 138 wire |= (uint64(b) & 0x7F) << shift 139 if b < 0x80 { 140 break 141 } 142 } 143 fieldNum := int32(wire >> 3) 144 wireType := int(wire & 0x7) 145 if wireType == 4 { 146 return fmt.Errorf("proto: ClusterVersion: wiretype end group for non-group") 147 } 148 if fieldNum <= 0 { 149 return fmt.Errorf("proto: ClusterVersion: illegal tag %d (wire type %d)", fieldNum, wire) 150 } 151 switch fieldNum { 152 case 2: 153 if wireType != 2 { 154 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 155 } 156 var msglen int 157 for shift := uint(0); ; shift += 7 { 158 if shift >= 64 { 159 return ErrIntOverflowClusterVersion 160 } 161 if iNdEx >= l { 162 return io.ErrUnexpectedEOF 163 } 164 b := dAtA[iNdEx] 165 iNdEx++ 166 msglen |= (int(b) & 0x7F) << shift 167 if b < 0x80 { 168 break 169 } 170 } 171 if msglen < 0 { 172 return ErrInvalidLengthClusterVersion 173 } 174 postIndex := iNdEx + msglen 175 if postIndex > l { 176 return io.ErrUnexpectedEOF 177 } 178 if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 179 return err 180 } 181 iNdEx = postIndex 182 default: 183 iNdEx = preIndex 184 skippy, err := skipClusterVersion(dAtA[iNdEx:]) 185 if err != nil { 186 return err 187 } 188 if skippy < 0 { 189 return ErrInvalidLengthClusterVersion 190 } 191 if (iNdEx + skippy) > l { 192 return io.ErrUnexpectedEOF 193 } 194 iNdEx += skippy 195 } 196 } 197 198 if iNdEx > l { 199 return io.ErrUnexpectedEOF 200 } 201 return nil 202 } 203 func skipClusterVersion(dAtA []byte) (n int, err error) { 204 l := len(dAtA) 205 iNdEx := 0 206 for iNdEx < l { 207 var wire uint64 208 for shift := uint(0); ; shift += 7 { 209 if shift >= 64 { 210 return 0, ErrIntOverflowClusterVersion 211 } 212 if iNdEx >= l { 213 return 0, io.ErrUnexpectedEOF 214 } 215 b := dAtA[iNdEx] 216 iNdEx++ 217 wire |= (uint64(b) & 0x7F) << shift 218 if b < 0x80 { 219 break 220 } 221 } 222 wireType := int(wire & 0x7) 223 switch wireType { 224 case 0: 225 for shift := uint(0); ; shift += 7 { 226 if shift >= 64 { 227 return 0, ErrIntOverflowClusterVersion 228 } 229 if iNdEx >= l { 230 return 0, io.ErrUnexpectedEOF 231 } 232 iNdEx++ 233 if dAtA[iNdEx-1] < 0x80 { 234 break 235 } 236 } 237 return iNdEx, nil 238 case 1: 239 iNdEx += 8 240 return iNdEx, nil 241 case 2: 242 var length int 243 for shift := uint(0); ; shift += 7 { 244 if shift >= 64 { 245 return 0, ErrIntOverflowClusterVersion 246 } 247 if iNdEx >= l { 248 return 0, io.ErrUnexpectedEOF 249 } 250 b := dAtA[iNdEx] 251 iNdEx++ 252 length |= (int(b) & 0x7F) << shift 253 if b < 0x80 { 254 break 255 } 256 } 257 iNdEx += length 258 if length < 0 { 259 return 0, ErrInvalidLengthClusterVersion 260 } 261 return iNdEx, nil 262 case 3: 263 for { 264 var innerWire uint64 265 var start int = iNdEx 266 for shift := uint(0); ; shift += 7 { 267 if shift >= 64 { 268 return 0, ErrIntOverflowClusterVersion 269 } 270 if iNdEx >= l { 271 return 0, io.ErrUnexpectedEOF 272 } 273 b := dAtA[iNdEx] 274 iNdEx++ 275 innerWire |= (uint64(b) & 0x7F) << shift 276 if b < 0x80 { 277 break 278 } 279 } 280 innerWireType := int(innerWire & 0x7) 281 if innerWireType == 4 { 282 break 283 } 284 next, err := skipClusterVersion(dAtA[start:]) 285 if err != nil { 286 return 0, err 287 } 288 iNdEx = start + next 289 } 290 return iNdEx, nil 291 case 4: 292 return iNdEx, nil 293 case 5: 294 iNdEx += 4 295 return iNdEx, nil 296 default: 297 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 298 } 299 } 300 panic("unreachable") 301 } 302 303 var ( 304 ErrInvalidLengthClusterVersion = fmt.Errorf("proto: negative length found during unmarshaling") 305 ErrIntOverflowClusterVersion = fmt.Errorf("proto: integer overflow") 306 ) 307 308 func init() { 309 proto.RegisterFile("clusterversion/cluster_version.proto", fileDescriptor_cluster_version_3f03e67a33fb82fb) 310 } 311 312 var fileDescriptor_cluster_version_3f03e67a33fb82fb = []byte{ 313 // 210 bytes of a gzipped FileDescriptorProto 314 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xce, 0x29, 0x2d, 315 0x2e, 0x49, 0x2d, 0x2a, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0xd3, 0x87, 0x72, 0xe3, 0xa1, 0x7c, 316 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0xbe, 0xe4, 0xfc, 0xe4, 0xec, 0xa2, 0xfc, 0xc4, 0xe4, 317 0x0c, 0xbd, 0xa4, 0xc4, 0xe2, 0x54, 0x29, 0x31, 0x30, 0xbb, 0x20, 0x49, 0x3f, 0x37, 0xb5, 0x24, 318 0x31, 0x25, 0xb1, 0x24, 0x11, 0xa2, 0x4e, 0x4a, 0x24, 0x3d, 0x3f, 0x3d, 0x1f, 0xcc, 0xd4, 0x07, 319 0xb1, 0x20, 0xa2, 0x4a, 0x99, 0x5c, 0x7c, 0xce, 0x10, 0x63, 0xc3, 0x20, 0xa6, 0x0a, 0x79, 0x73, 320 0xf1, 0x25, 0x26, 0x97, 0x64, 0x96, 0xa5, 0xc2, 0xec, 0x91, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x36, 321 0x92, 0xd2, 0x43, 0x58, 0x04, 0xb5, 0x42, 0x0f, 0xaa, 0xc7, 0x89, 0xe3, 0xc4, 0x3d, 0x79, 0x86, 322 0x0b, 0xf7, 0xe4, 0x19, 0x83, 0x78, 0x21, 0x7a, 0xa1, 0x12, 0x56, 0x2c, 0x33, 0x16, 0xc8, 0x33, 323 0x78, 0xb1, 0x70, 0x30, 0x0a, 0x30, 0x39, 0x19, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 324 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 325 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xf1, 0xa1, 0x7a, 0x38, 0x89, 326 0x0d, 0xec, 0x46, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x5f, 0x63, 0x79, 0x09, 0x01, 327 0x00, 0x00, 328 }