github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/vm/proxyapp/proxyrpc/proxyrpc.go (about) 1 // Copyright 2022 syzkaller project authors. All rights reserved. 2 // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 package proxyrpc 5 6 // ProxyAppInterface is the interface you need to implement. 7 type ProxyAppInterface interface { 8 CreatePool(in CreatePoolParams, out *CreatePoolResult) error 9 CreateInstance(in CreateInstanceParams, out *CreateInstanceResult) error 10 Diagnose(in DiagnoseParams, out *DiagnoseReply) error 11 Copy(in CopyParams, out *CopyResult) error 12 Forward(in ForwardParams, out *ForwardResult) error 13 RunStart(in RunStartParams, out *RunStartReply) error 14 RunStop(in RunStopParams, out *RunStopReply) error 15 RunReadProgress(in RunReadProgressParams, out *RunReadProgressReply) error 16 Close(in CloseParams, out *CloseReply) error 17 PoolLogs(in PoolLogsParam, out *PoolLogsReply) error 18 } 19 20 type CreatePoolParams struct { 21 Debug bool 22 Param string 23 Image string 24 ImageData []byte 25 } 26 27 type CreatePoolResult struct { 28 Count int // signal the created pool size 29 } 30 31 type CreateInstanceParams struct { 32 Workdir string 33 Index int 34 WorkdirData map[string][]byte 35 } 36 37 type CreateInstanceResult struct { 38 ID string // allocated instance id 39 } 40 41 type CopyParams struct { 42 ID string 43 HostSrc string 44 Data []byte 45 } 46 47 type CopyResult struct { 48 VMFileName string 49 } 50 51 type ForwardParams struct { 52 ID string 53 Port int 54 } 55 56 type ForwardResult struct { 57 ManagerAddress string 58 } 59 60 type RunStartParams struct { 61 ID string 62 Command string 63 } 64 65 type RunStartReply struct { 66 RunID string 67 } 68 69 type RunStopParams struct { 70 ID string 71 RunID string 72 } 73 74 type RunStopReply struct { 75 } 76 77 type RunReadProgressParams struct { 78 ID string 79 RunID string 80 } 81 82 type RunReadProgressReply struct { 83 StdoutChunk string 84 StderrChunk string 85 ConsoleOutChunk string 86 Error string 87 Finished bool 88 } 89 90 type CloseParams struct { 91 ID string 92 } 93 94 type CloseReply struct { 95 } 96 97 type DiagnoseParams struct { 98 ID string 99 ReasonTitle string 100 } 101 102 type DiagnoseReply struct { 103 Diagnosis string 104 } 105 106 type PoolLogsParam struct { 107 } 108 109 type PoolLogsReply struct { 110 Log string 111 // Verbosity follows pkg/log rules. 112 // Messages with Verbosity 0 are printed by default. 113 // The higher is this value - the lower is importance of the message. 114 Verbosity int 115 }