introspection.pb.go 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: github.com/containerd/containerd/api/services/introspection/v1/introspection.proto
  3. package introspection
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. types "github.com/containerd/containerd/api/types"
  8. rpc "github.com/gogo/googleapis/google/rpc"
  9. proto "github.com/gogo/protobuf/proto"
  10. github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
  11. types1 "github.com/gogo/protobuf/types"
  12. grpc "google.golang.org/grpc"
  13. codes "google.golang.org/grpc/codes"
  14. status "google.golang.org/grpc/status"
  15. io "io"
  16. math "math"
  17. math_bits "math/bits"
  18. reflect "reflect"
  19. strings "strings"
  20. )
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ = proto.Marshal
  23. var _ = fmt.Errorf
  24. var _ = math.Inf
  25. // This is a compile-time assertion to ensure that this generated file
  26. // is compatible with the proto package it is being compiled against.
  27. // A compilation error at this line likely means your copy of the
  28. // proto package needs to be updated.
  29. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  30. type Plugin struct {
  31. // Type defines the type of plugin.
  32. //
  33. // See package plugin for a list of possible values. Non core plugins may
  34. // define their own values during registration.
  35. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  36. // ID identifies the plugin uniquely in the system.
  37. ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
  38. // Requires lists the plugin types required by this plugin.
  39. Requires []string `protobuf:"bytes,3,rep,name=requires,proto3" json:"requires,omitempty"`
  40. // Platforms enumerates the platforms this plugin will support.
  41. //
  42. // If values are provided here, the plugin will only be operable under the
  43. // provided platforms.
  44. //
  45. // If this is empty, the plugin will work across all platforms.
  46. //
  47. // If the plugin prefers certain platforms over others, they should be
  48. // listed from most to least preferred.
  49. Platforms []types.Platform `protobuf:"bytes,4,rep,name=platforms,proto3" json:"platforms"`
  50. // Exports allows plugins to provide values about state or configuration to
  51. // interested parties.
  52. //
  53. // One example is exposing the configured path of a snapshotter plugin.
  54. Exports map[string]string `protobuf:"bytes,5,rep,name=exports,proto3" json:"exports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  55. // Capabilities allows plugins to communicate feature switches to allow
  56. // clients to detect features that may not be on be default or may be
  57. // different from version to version.
  58. //
  59. // Use this sparingly.
  60. Capabilities []string `protobuf:"bytes,6,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
  61. // InitErr will be set if the plugin fails initialization.
  62. //
  63. // This means the plugin may have been registered but a non-terminal error
  64. // was encountered during initialization.
  65. //
  66. // Plugins that have this value set cannot be used.
  67. InitErr *rpc.Status `protobuf:"bytes,7,opt,name=init_err,json=initErr,proto3" json:"init_err,omitempty"`
  68. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  69. XXX_unrecognized []byte `json:"-"`
  70. XXX_sizecache int32 `json:"-"`
  71. }
  72. func (m *Plugin) Reset() { *m = Plugin{} }
  73. func (*Plugin) ProtoMessage() {}
  74. func (*Plugin) Descriptor() ([]byte, []int) {
  75. return fileDescriptor_1a14fda866f10715, []int{0}
  76. }
  77. func (m *Plugin) XXX_Unmarshal(b []byte) error {
  78. return m.Unmarshal(b)
  79. }
  80. func (m *Plugin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  81. if deterministic {
  82. return xxx_messageInfo_Plugin.Marshal(b, m, deterministic)
  83. } else {
  84. b = b[:cap(b)]
  85. n, err := m.MarshalToSizedBuffer(b)
  86. if err != nil {
  87. return nil, err
  88. }
  89. return b[:n], nil
  90. }
  91. }
  92. func (m *Plugin) XXX_Merge(src proto.Message) {
  93. xxx_messageInfo_Plugin.Merge(m, src)
  94. }
  95. func (m *Plugin) XXX_Size() int {
  96. return m.Size()
  97. }
  98. func (m *Plugin) XXX_DiscardUnknown() {
  99. xxx_messageInfo_Plugin.DiscardUnknown(m)
  100. }
  101. var xxx_messageInfo_Plugin proto.InternalMessageInfo
  102. type PluginsRequest struct {
  103. // Filters contains one or more filters using the syntax defined in the
  104. // containerd filter package.
  105. //
  106. // The returned result will be those that match any of the provided
  107. // filters. Expanded, plugins that match the following will be
  108. // returned:
  109. //
  110. // filters[0] or filters[1] or ... or filters[n-1] or filters[n]
  111. //
  112. // If filters is zero-length or nil, all items will be returned.
  113. Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
  114. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  115. XXX_unrecognized []byte `json:"-"`
  116. XXX_sizecache int32 `json:"-"`
  117. }
  118. func (m *PluginsRequest) Reset() { *m = PluginsRequest{} }
  119. func (*PluginsRequest) ProtoMessage() {}
  120. func (*PluginsRequest) Descriptor() ([]byte, []int) {
  121. return fileDescriptor_1a14fda866f10715, []int{1}
  122. }
  123. func (m *PluginsRequest) XXX_Unmarshal(b []byte) error {
  124. return m.Unmarshal(b)
  125. }
  126. func (m *PluginsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  127. if deterministic {
  128. return xxx_messageInfo_PluginsRequest.Marshal(b, m, deterministic)
  129. } else {
  130. b = b[:cap(b)]
  131. n, err := m.MarshalToSizedBuffer(b)
  132. if err != nil {
  133. return nil, err
  134. }
  135. return b[:n], nil
  136. }
  137. }
  138. func (m *PluginsRequest) XXX_Merge(src proto.Message) {
  139. xxx_messageInfo_PluginsRequest.Merge(m, src)
  140. }
  141. func (m *PluginsRequest) XXX_Size() int {
  142. return m.Size()
  143. }
  144. func (m *PluginsRequest) XXX_DiscardUnknown() {
  145. xxx_messageInfo_PluginsRequest.DiscardUnknown(m)
  146. }
  147. var xxx_messageInfo_PluginsRequest proto.InternalMessageInfo
  148. type PluginsResponse struct {
  149. Plugins []Plugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins"`
  150. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  151. XXX_unrecognized []byte `json:"-"`
  152. XXX_sizecache int32 `json:"-"`
  153. }
  154. func (m *PluginsResponse) Reset() { *m = PluginsResponse{} }
  155. func (*PluginsResponse) ProtoMessage() {}
  156. func (*PluginsResponse) Descriptor() ([]byte, []int) {
  157. return fileDescriptor_1a14fda866f10715, []int{2}
  158. }
  159. func (m *PluginsResponse) XXX_Unmarshal(b []byte) error {
  160. return m.Unmarshal(b)
  161. }
  162. func (m *PluginsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  163. if deterministic {
  164. return xxx_messageInfo_PluginsResponse.Marshal(b, m, deterministic)
  165. } else {
  166. b = b[:cap(b)]
  167. n, err := m.MarshalToSizedBuffer(b)
  168. if err != nil {
  169. return nil, err
  170. }
  171. return b[:n], nil
  172. }
  173. }
  174. func (m *PluginsResponse) XXX_Merge(src proto.Message) {
  175. xxx_messageInfo_PluginsResponse.Merge(m, src)
  176. }
  177. func (m *PluginsResponse) XXX_Size() int {
  178. return m.Size()
  179. }
  180. func (m *PluginsResponse) XXX_DiscardUnknown() {
  181. xxx_messageInfo_PluginsResponse.DiscardUnknown(m)
  182. }
  183. var xxx_messageInfo_PluginsResponse proto.InternalMessageInfo
  184. type ServerResponse struct {
  185. UUID string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
  186. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  187. XXX_unrecognized []byte `json:"-"`
  188. XXX_sizecache int32 `json:"-"`
  189. }
  190. func (m *ServerResponse) Reset() { *m = ServerResponse{} }
  191. func (*ServerResponse) ProtoMessage() {}
  192. func (*ServerResponse) Descriptor() ([]byte, []int) {
  193. return fileDescriptor_1a14fda866f10715, []int{3}
  194. }
  195. func (m *ServerResponse) XXX_Unmarshal(b []byte) error {
  196. return m.Unmarshal(b)
  197. }
  198. func (m *ServerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  199. if deterministic {
  200. return xxx_messageInfo_ServerResponse.Marshal(b, m, deterministic)
  201. } else {
  202. b = b[:cap(b)]
  203. n, err := m.MarshalToSizedBuffer(b)
  204. if err != nil {
  205. return nil, err
  206. }
  207. return b[:n], nil
  208. }
  209. }
  210. func (m *ServerResponse) XXX_Merge(src proto.Message) {
  211. xxx_messageInfo_ServerResponse.Merge(m, src)
  212. }
  213. func (m *ServerResponse) XXX_Size() int {
  214. return m.Size()
  215. }
  216. func (m *ServerResponse) XXX_DiscardUnknown() {
  217. xxx_messageInfo_ServerResponse.DiscardUnknown(m)
  218. }
  219. var xxx_messageInfo_ServerResponse proto.InternalMessageInfo
  220. func init() {
  221. proto.RegisterType((*Plugin)(nil), "containerd.services.introspection.v1.Plugin")
  222. proto.RegisterMapType((map[string]string)(nil), "containerd.services.introspection.v1.Plugin.ExportsEntry")
  223. proto.RegisterType((*PluginsRequest)(nil), "containerd.services.introspection.v1.PluginsRequest")
  224. proto.RegisterType((*PluginsResponse)(nil), "containerd.services.introspection.v1.PluginsResponse")
  225. proto.RegisterType((*ServerResponse)(nil), "containerd.services.introspection.v1.ServerResponse")
  226. }
  227. func init() {
  228. proto.RegisterFile("github.com/containerd/containerd/api/services/introspection/v1/introspection.proto", fileDescriptor_1a14fda866f10715)
  229. }
  230. var fileDescriptor_1a14fda866f10715 = []byte{
  231. // 549 bytes of a gzipped FileDescriptorProto
  232. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xc1, 0x6e, 0xd3, 0x40,
  233. 0x10, 0xad, 0x9d, 0x34, 0x6e, 0x37, 0xa5, 0xa0, 0x55, 0x55, 0x2c, 0x83, 0x9c, 0x28, 0xe2, 0x10,
  234. 0x21, 0x58, 0xab, 0x01, 0x24, 0x5a, 0x24, 0x0e, 0x51, 0x73, 0x88, 0xd4, 0x43, 0xe5, 0xa8, 0x08,
  235. 0x71, 0xa9, 0x1c, 0x67, 0x63, 0x56, 0x38, 0xde, 0xed, 0xee, 0xda, 0x22, 0x37, 0x3e, 0x2f, 0x47,
  236. 0x8e, 0x9c, 0x02, 0xf5, 0x37, 0xf0, 0x01, 0xc8, 0xbb, 0x76, 0x9a, 0xdc, 0x12, 0x71, 0x9b, 0x79,
  237. 0x33, 0x6f, 0xe6, 0xcd, 0xf3, 0xca, 0xc0, 0x8f, 0x88, 0xfc, 0x9a, 0x8e, 0x51, 0x48, 0x67, 0x5e,
  238. 0x48, 0x13, 0x19, 0x90, 0x04, 0xf3, 0xc9, 0x7a, 0x18, 0x30, 0xe2, 0x09, 0xcc, 0x33, 0x12, 0x62,
  239. 0xe1, 0x91, 0x44, 0x72, 0x2a, 0x18, 0x0e, 0x25, 0xa1, 0x89, 0x97, 0x9d, 0x6d, 0x02, 0x88, 0x71,
  240. 0x2a, 0x29, 0x7c, 0xf1, 0xc0, 0x46, 0x15, 0x13, 0x6d, 0x36, 0x66, 0x67, 0xce, 0xf9, 0x56, 0x9b,
  241. 0xe5, 0x9c, 0x61, 0xe1, 0xb1, 0x38, 0x90, 0x53, 0xca, 0x67, 0x7a, 0x81, 0xf3, 0x34, 0xa2, 0x34,
  242. 0x8a, 0xb1, 0xc7, 0x59, 0xe8, 0x09, 0x19, 0xc8, 0x54, 0x94, 0x85, 0x67, 0x65, 0x41, 0x65, 0xe3,
  243. 0x74, 0xea, 0xe1, 0x19, 0x93, 0xf3, 0xb2, 0x78, 0x12, 0xd1, 0x88, 0xaa, 0xd0, 0x2b, 0x22, 0x8d,
  244. 0x76, 0xfe, 0x9a, 0xa0, 0x71, 0x1d, 0xa7, 0x11, 0x49, 0x20, 0x04, 0xf5, 0x62, 0x9d, 0x6d, 0xb4,
  245. 0x8d, 0xee, 0xa1, 0xaf, 0x62, 0x78, 0x0a, 0x4c, 0x32, 0xb1, 0xcd, 0x02, 0xe9, 0x37, 0xf2, 0x65,
  246. 0xcb, 0x1c, 0x5e, 0xfa, 0x26, 0x99, 0x40, 0x07, 0x1c, 0x70, 0x7c, 0x97, 0x12, 0x8e, 0x85, 0x5d,
  247. 0x6b, 0xd7, 0xba, 0x87, 0xfe, 0x2a, 0x87, 0x1f, 0xc1, 0x61, 0x25, 0x58, 0xd8, 0xf5, 0x76, 0xad,
  248. 0xdb, 0xec, 0x39, 0x68, 0xcd, 0x13, 0x75, 0x13, 0xba, 0x2e, 0x5b, 0xfa, 0xf5, 0xc5, 0xb2, 0xb5,
  249. 0xe7, 0x3f, 0x50, 0xe0, 0x08, 0x58, 0xf8, 0x3b, 0xa3, 0x5c, 0x0a, 0x7b, 0x5f, 0xb1, 0xcf, 0xd1,
  250. 0x36, 0x8e, 0x22, 0x7d, 0x06, 0x1a, 0x68, 0xee, 0x20, 0x91, 0x7c, 0xee, 0x57, 0x93, 0x60, 0x07,
  251. 0x1c, 0x85, 0x01, 0x0b, 0xc6, 0x24, 0x26, 0x92, 0x60, 0x61, 0x37, 0x94, 0xe8, 0x0d, 0x0c, 0xbe,
  252. 0x06, 0x07, 0x24, 0x21, 0xf2, 0x16, 0x73, 0x6e, 0x5b, 0x6d, 0xa3, 0xdb, 0xec, 0x41, 0xa4, 0x1d,
  253. 0x45, 0x9c, 0x85, 0x68, 0xa4, 0xac, 0xf6, 0xad, 0xa2, 0x67, 0xc0, 0xb9, 0x73, 0x01, 0x8e, 0xd6,
  254. 0x77, 0xc1, 0x27, 0xa0, 0xf6, 0x0d, 0xcf, 0x4b, 0xfb, 0x8a, 0x10, 0x9e, 0x80, 0xfd, 0x2c, 0x88,
  255. 0x53, 0xac, 0x0d, 0xf4, 0x75, 0x72, 0x61, 0xbe, 0x37, 0x3a, 0x2f, 0xc1, 0xb1, 0x96, 0x2b, 0x7c,
  256. 0x7c, 0x97, 0x62, 0x21, 0xa1, 0x0d, 0xac, 0x29, 0x89, 0x25, 0xe6, 0xc2, 0x36, 0x94, 0xb6, 0x2a,
  257. 0xed, 0xdc, 0x82, 0xc7, 0xab, 0x5e, 0xc1, 0x68, 0x22, 0x30, 0xbc, 0x02, 0x16, 0xd3, 0x90, 0x6a,
  258. 0x6e, 0xf6, 0x5e, 0xed, 0x62, 0x51, 0x69, 0x79, 0x35, 0xa2, 0x83, 0xc0, 0xf1, 0x08, 0xf3, 0x0c,
  259. 0xf3, 0xd5, 0xfc, 0xe7, 0xa0, 0x9e, 0xa6, 0x64, 0xa2, 0x6f, 0xe9, 0x1f, 0xe4, 0xcb, 0x56, 0xfd,
  260. 0xe6, 0x66, 0x78, 0xe9, 0x2b, 0xb4, 0xf7, 0xdb, 0x00, 0x8f, 0x86, 0xeb, 0xa3, 0x61, 0x06, 0xac,
  261. 0x52, 0x22, 0x7c, 0xbb, 0x8b, 0x92, 0xea, 0x7a, 0xe7, 0xdd, 0x8e, 0xac, 0x52, 0xe7, 0x27, 0xd0,
  262. 0xd0, 0xca, 0xe1, 0x69, 0xf5, 0xa5, 0xaa, 0xb7, 0x8f, 0x06, 0xc5, 0xdb, 0x77, 0xb6, 0x94, 0xb3,
  263. 0x79, 0x7f, 0x7f, 0xba, 0xb8, 0x77, 0xf7, 0x7e, 0xdd, 0xbb, 0x7b, 0x3f, 0x72, 0xd7, 0x58, 0xe4,
  264. 0xae, 0xf1, 0x33, 0x77, 0x8d, 0x3f, 0xb9, 0x6b, 0x7c, 0xb9, 0xfa, 0xbf, 0x1f, 0xc6, 0x87, 0x0d,
  265. 0xe0, 0x73, 0x6d, 0xdc, 0x50, 0x7a, 0xdf, 0xfc, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xb3, 0x50,
  266. 0xdc, 0x89, 0x04, 0x00, 0x00,
  267. }
  268. // Reference imports to suppress errors if they are not otherwise used.
  269. var _ context.Context
  270. var _ grpc.ClientConn
  271. // This is a compile-time assertion to ensure that this generated file
  272. // is compatible with the grpc package it is being compiled against.
  273. const _ = grpc.SupportPackageIsVersion4
  274. // IntrospectionClient is the client API for Introspection service.
  275. //
  276. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  277. type IntrospectionClient interface {
  278. // Plugins returns a list of plugins in containerd.
  279. //
  280. // Clients can use this to detect features and capabilities when using
  281. // containerd.
  282. Plugins(ctx context.Context, in *PluginsRequest, opts ...grpc.CallOption) (*PluginsResponse, error)
  283. // Server returns information about the containerd server
  284. Server(ctx context.Context, in *types1.Empty, opts ...grpc.CallOption) (*ServerResponse, error)
  285. }
  286. type introspectionClient struct {
  287. cc *grpc.ClientConn
  288. }
  289. func NewIntrospectionClient(cc *grpc.ClientConn) IntrospectionClient {
  290. return &introspectionClient{cc}
  291. }
  292. func (c *introspectionClient) Plugins(ctx context.Context, in *PluginsRequest, opts ...grpc.CallOption) (*PluginsResponse, error) {
  293. out := new(PluginsResponse)
  294. err := c.cc.Invoke(ctx, "/containerd.services.introspection.v1.Introspection/Plugins", in, out, opts...)
  295. if err != nil {
  296. return nil, err
  297. }
  298. return out, nil
  299. }
  300. func (c *introspectionClient) Server(ctx context.Context, in *types1.Empty, opts ...grpc.CallOption) (*ServerResponse, error) {
  301. out := new(ServerResponse)
  302. err := c.cc.Invoke(ctx, "/containerd.services.introspection.v1.Introspection/Server", in, out, opts...)
  303. if err != nil {
  304. return nil, err
  305. }
  306. return out, nil
  307. }
  308. // IntrospectionServer is the server API for Introspection service.
  309. type IntrospectionServer interface {
  310. // Plugins returns a list of plugins in containerd.
  311. //
  312. // Clients can use this to detect features and capabilities when using
  313. // containerd.
  314. Plugins(context.Context, *PluginsRequest) (*PluginsResponse, error)
  315. // Server returns information about the containerd server
  316. Server(context.Context, *types1.Empty) (*ServerResponse, error)
  317. }
  318. // UnimplementedIntrospectionServer can be embedded to have forward compatible implementations.
  319. type UnimplementedIntrospectionServer struct {
  320. }
  321. func (*UnimplementedIntrospectionServer) Plugins(ctx context.Context, req *PluginsRequest) (*PluginsResponse, error) {
  322. return nil, status.Errorf(codes.Unimplemented, "method Plugins not implemented")
  323. }
  324. func (*UnimplementedIntrospectionServer) Server(ctx context.Context, req *types1.Empty) (*ServerResponse, error) {
  325. return nil, status.Errorf(codes.Unimplemented, "method Server not implemented")
  326. }
  327. func RegisterIntrospectionServer(s *grpc.Server, srv IntrospectionServer) {
  328. s.RegisterService(&_Introspection_serviceDesc, srv)
  329. }
  330. func _Introspection_Plugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  331. in := new(PluginsRequest)
  332. if err := dec(in); err != nil {
  333. return nil, err
  334. }
  335. if interceptor == nil {
  336. return srv.(IntrospectionServer).Plugins(ctx, in)
  337. }
  338. info := &grpc.UnaryServerInfo{
  339. Server: srv,
  340. FullMethod: "/containerd.services.introspection.v1.Introspection/Plugins",
  341. }
  342. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  343. return srv.(IntrospectionServer).Plugins(ctx, req.(*PluginsRequest))
  344. }
  345. return interceptor(ctx, in, info, handler)
  346. }
  347. func _Introspection_Server_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  348. in := new(types1.Empty)
  349. if err := dec(in); err != nil {
  350. return nil, err
  351. }
  352. if interceptor == nil {
  353. return srv.(IntrospectionServer).Server(ctx, in)
  354. }
  355. info := &grpc.UnaryServerInfo{
  356. Server: srv,
  357. FullMethod: "/containerd.services.introspection.v1.Introspection/Server",
  358. }
  359. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  360. return srv.(IntrospectionServer).Server(ctx, req.(*types1.Empty))
  361. }
  362. return interceptor(ctx, in, info, handler)
  363. }
  364. var _Introspection_serviceDesc = grpc.ServiceDesc{
  365. ServiceName: "containerd.services.introspection.v1.Introspection",
  366. HandlerType: (*IntrospectionServer)(nil),
  367. Methods: []grpc.MethodDesc{
  368. {
  369. MethodName: "Plugins",
  370. Handler: _Introspection_Plugins_Handler,
  371. },
  372. {
  373. MethodName: "Server",
  374. Handler: _Introspection_Server_Handler,
  375. },
  376. },
  377. Streams: []grpc.StreamDesc{},
  378. Metadata: "github.com/containerd/containerd/api/services/introspection/v1/introspection.proto",
  379. }
  380. func (m *Plugin) Marshal() (dAtA []byte, err error) {
  381. size := m.Size()
  382. dAtA = make([]byte, size)
  383. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  384. if err != nil {
  385. return nil, err
  386. }
  387. return dAtA[:n], nil
  388. }
  389. func (m *Plugin) MarshalTo(dAtA []byte) (int, error) {
  390. size := m.Size()
  391. return m.MarshalToSizedBuffer(dAtA[:size])
  392. }
  393. func (m *Plugin) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  394. i := len(dAtA)
  395. _ = i
  396. var l int
  397. _ = l
  398. if m.XXX_unrecognized != nil {
  399. i -= len(m.XXX_unrecognized)
  400. copy(dAtA[i:], m.XXX_unrecognized)
  401. }
  402. if m.InitErr != nil {
  403. {
  404. size, err := m.InitErr.MarshalToSizedBuffer(dAtA[:i])
  405. if err != nil {
  406. return 0, err
  407. }
  408. i -= size
  409. i = encodeVarintIntrospection(dAtA, i, uint64(size))
  410. }
  411. i--
  412. dAtA[i] = 0x3a
  413. }
  414. if len(m.Capabilities) > 0 {
  415. for iNdEx := len(m.Capabilities) - 1; iNdEx >= 0; iNdEx-- {
  416. i -= len(m.Capabilities[iNdEx])
  417. copy(dAtA[i:], m.Capabilities[iNdEx])
  418. i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Capabilities[iNdEx])))
  419. i--
  420. dAtA[i] = 0x32
  421. }
  422. }
  423. if len(m.Exports) > 0 {
  424. for k := range m.Exports {
  425. v := m.Exports[k]
  426. baseI := i
  427. i -= len(v)
  428. copy(dAtA[i:], v)
  429. i = encodeVarintIntrospection(dAtA, i, uint64(len(v)))
  430. i--
  431. dAtA[i] = 0x12
  432. i -= len(k)
  433. copy(dAtA[i:], k)
  434. i = encodeVarintIntrospection(dAtA, i, uint64(len(k)))
  435. i--
  436. dAtA[i] = 0xa
  437. i = encodeVarintIntrospection(dAtA, i, uint64(baseI-i))
  438. i--
  439. dAtA[i] = 0x2a
  440. }
  441. }
  442. if len(m.Platforms) > 0 {
  443. for iNdEx := len(m.Platforms) - 1; iNdEx >= 0; iNdEx-- {
  444. {
  445. size, err := m.Platforms[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  446. if err != nil {
  447. return 0, err
  448. }
  449. i -= size
  450. i = encodeVarintIntrospection(dAtA, i, uint64(size))
  451. }
  452. i--
  453. dAtA[i] = 0x22
  454. }
  455. }
  456. if len(m.Requires) > 0 {
  457. for iNdEx := len(m.Requires) - 1; iNdEx >= 0; iNdEx-- {
  458. i -= len(m.Requires[iNdEx])
  459. copy(dAtA[i:], m.Requires[iNdEx])
  460. i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Requires[iNdEx])))
  461. i--
  462. dAtA[i] = 0x1a
  463. }
  464. }
  465. if len(m.ID) > 0 {
  466. i -= len(m.ID)
  467. copy(dAtA[i:], m.ID)
  468. i = encodeVarintIntrospection(dAtA, i, uint64(len(m.ID)))
  469. i--
  470. dAtA[i] = 0x12
  471. }
  472. if len(m.Type) > 0 {
  473. i -= len(m.Type)
  474. copy(dAtA[i:], m.Type)
  475. i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Type)))
  476. i--
  477. dAtA[i] = 0xa
  478. }
  479. return len(dAtA) - i, nil
  480. }
  481. func (m *PluginsRequest) Marshal() (dAtA []byte, err error) {
  482. size := m.Size()
  483. dAtA = make([]byte, size)
  484. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  485. if err != nil {
  486. return nil, err
  487. }
  488. return dAtA[:n], nil
  489. }
  490. func (m *PluginsRequest) MarshalTo(dAtA []byte) (int, error) {
  491. size := m.Size()
  492. return m.MarshalToSizedBuffer(dAtA[:size])
  493. }
  494. func (m *PluginsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  495. i := len(dAtA)
  496. _ = i
  497. var l int
  498. _ = l
  499. if m.XXX_unrecognized != nil {
  500. i -= len(m.XXX_unrecognized)
  501. copy(dAtA[i:], m.XXX_unrecognized)
  502. }
  503. if len(m.Filters) > 0 {
  504. for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- {
  505. i -= len(m.Filters[iNdEx])
  506. copy(dAtA[i:], m.Filters[iNdEx])
  507. i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Filters[iNdEx])))
  508. i--
  509. dAtA[i] = 0xa
  510. }
  511. }
  512. return len(dAtA) - i, nil
  513. }
  514. func (m *PluginsResponse) Marshal() (dAtA []byte, err error) {
  515. size := m.Size()
  516. dAtA = make([]byte, size)
  517. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  518. if err != nil {
  519. return nil, err
  520. }
  521. return dAtA[:n], nil
  522. }
  523. func (m *PluginsResponse) MarshalTo(dAtA []byte) (int, error) {
  524. size := m.Size()
  525. return m.MarshalToSizedBuffer(dAtA[:size])
  526. }
  527. func (m *PluginsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  528. i := len(dAtA)
  529. _ = i
  530. var l int
  531. _ = l
  532. if m.XXX_unrecognized != nil {
  533. i -= len(m.XXX_unrecognized)
  534. copy(dAtA[i:], m.XXX_unrecognized)
  535. }
  536. if len(m.Plugins) > 0 {
  537. for iNdEx := len(m.Plugins) - 1; iNdEx >= 0; iNdEx-- {
  538. {
  539. size, err := m.Plugins[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  540. if err != nil {
  541. return 0, err
  542. }
  543. i -= size
  544. i = encodeVarintIntrospection(dAtA, i, uint64(size))
  545. }
  546. i--
  547. dAtA[i] = 0xa
  548. }
  549. }
  550. return len(dAtA) - i, nil
  551. }
  552. func (m *ServerResponse) Marshal() (dAtA []byte, err error) {
  553. size := m.Size()
  554. dAtA = make([]byte, size)
  555. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  556. if err != nil {
  557. return nil, err
  558. }
  559. return dAtA[:n], nil
  560. }
  561. func (m *ServerResponse) MarshalTo(dAtA []byte) (int, error) {
  562. size := m.Size()
  563. return m.MarshalToSizedBuffer(dAtA[:size])
  564. }
  565. func (m *ServerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  566. i := len(dAtA)
  567. _ = i
  568. var l int
  569. _ = l
  570. if m.XXX_unrecognized != nil {
  571. i -= len(m.XXX_unrecognized)
  572. copy(dAtA[i:], m.XXX_unrecognized)
  573. }
  574. if len(m.UUID) > 0 {
  575. i -= len(m.UUID)
  576. copy(dAtA[i:], m.UUID)
  577. i = encodeVarintIntrospection(dAtA, i, uint64(len(m.UUID)))
  578. i--
  579. dAtA[i] = 0xa
  580. }
  581. return len(dAtA) - i, nil
  582. }
  583. func encodeVarintIntrospection(dAtA []byte, offset int, v uint64) int {
  584. offset -= sovIntrospection(v)
  585. base := offset
  586. for v >= 1<<7 {
  587. dAtA[offset] = uint8(v&0x7f | 0x80)
  588. v >>= 7
  589. offset++
  590. }
  591. dAtA[offset] = uint8(v)
  592. return base
  593. }
  594. func (m *Plugin) Size() (n int) {
  595. if m == nil {
  596. return 0
  597. }
  598. var l int
  599. _ = l
  600. l = len(m.Type)
  601. if l > 0 {
  602. n += 1 + l + sovIntrospection(uint64(l))
  603. }
  604. l = len(m.ID)
  605. if l > 0 {
  606. n += 1 + l + sovIntrospection(uint64(l))
  607. }
  608. if len(m.Requires) > 0 {
  609. for _, s := range m.Requires {
  610. l = len(s)
  611. n += 1 + l + sovIntrospection(uint64(l))
  612. }
  613. }
  614. if len(m.Platforms) > 0 {
  615. for _, e := range m.Platforms {
  616. l = e.Size()
  617. n += 1 + l + sovIntrospection(uint64(l))
  618. }
  619. }
  620. if len(m.Exports) > 0 {
  621. for k, v := range m.Exports {
  622. _ = k
  623. _ = v
  624. mapEntrySize := 1 + len(k) + sovIntrospection(uint64(len(k))) + 1 + len(v) + sovIntrospection(uint64(len(v)))
  625. n += mapEntrySize + 1 + sovIntrospection(uint64(mapEntrySize))
  626. }
  627. }
  628. if len(m.Capabilities) > 0 {
  629. for _, s := range m.Capabilities {
  630. l = len(s)
  631. n += 1 + l + sovIntrospection(uint64(l))
  632. }
  633. }
  634. if m.InitErr != nil {
  635. l = m.InitErr.Size()
  636. n += 1 + l + sovIntrospection(uint64(l))
  637. }
  638. if m.XXX_unrecognized != nil {
  639. n += len(m.XXX_unrecognized)
  640. }
  641. return n
  642. }
  643. func (m *PluginsRequest) Size() (n int) {
  644. if m == nil {
  645. return 0
  646. }
  647. var l int
  648. _ = l
  649. if len(m.Filters) > 0 {
  650. for _, s := range m.Filters {
  651. l = len(s)
  652. n += 1 + l + sovIntrospection(uint64(l))
  653. }
  654. }
  655. if m.XXX_unrecognized != nil {
  656. n += len(m.XXX_unrecognized)
  657. }
  658. return n
  659. }
  660. func (m *PluginsResponse) Size() (n int) {
  661. if m == nil {
  662. return 0
  663. }
  664. var l int
  665. _ = l
  666. if len(m.Plugins) > 0 {
  667. for _, e := range m.Plugins {
  668. l = e.Size()
  669. n += 1 + l + sovIntrospection(uint64(l))
  670. }
  671. }
  672. if m.XXX_unrecognized != nil {
  673. n += len(m.XXX_unrecognized)
  674. }
  675. return n
  676. }
  677. func (m *ServerResponse) Size() (n int) {
  678. if m == nil {
  679. return 0
  680. }
  681. var l int
  682. _ = l
  683. l = len(m.UUID)
  684. if l > 0 {
  685. n += 1 + l + sovIntrospection(uint64(l))
  686. }
  687. if m.XXX_unrecognized != nil {
  688. n += len(m.XXX_unrecognized)
  689. }
  690. return n
  691. }
  692. func sovIntrospection(x uint64) (n int) {
  693. return (math_bits.Len64(x|1) + 6) / 7
  694. }
  695. func sozIntrospection(x uint64) (n int) {
  696. return sovIntrospection(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  697. }
  698. func (this *Plugin) String() string {
  699. if this == nil {
  700. return "nil"
  701. }
  702. repeatedStringForPlatforms := "[]Platform{"
  703. for _, f := range this.Platforms {
  704. repeatedStringForPlatforms += fmt.Sprintf("%v", f) + ","
  705. }
  706. repeatedStringForPlatforms += "}"
  707. keysForExports := make([]string, 0, len(this.Exports))
  708. for k, _ := range this.Exports {
  709. keysForExports = append(keysForExports, k)
  710. }
  711. github_com_gogo_protobuf_sortkeys.Strings(keysForExports)
  712. mapStringForExports := "map[string]string{"
  713. for _, k := range keysForExports {
  714. mapStringForExports += fmt.Sprintf("%v: %v,", k, this.Exports[k])
  715. }
  716. mapStringForExports += "}"
  717. s := strings.Join([]string{`&Plugin{`,
  718. `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
  719. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  720. `Requires:` + fmt.Sprintf("%v", this.Requires) + `,`,
  721. `Platforms:` + repeatedStringForPlatforms + `,`,
  722. `Exports:` + mapStringForExports + `,`,
  723. `Capabilities:` + fmt.Sprintf("%v", this.Capabilities) + `,`,
  724. `InitErr:` + strings.Replace(fmt.Sprintf("%v", this.InitErr), "Status", "rpc.Status", 1) + `,`,
  725. `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
  726. `}`,
  727. }, "")
  728. return s
  729. }
  730. func (this *PluginsRequest) String() string {
  731. if this == nil {
  732. return "nil"
  733. }
  734. s := strings.Join([]string{`&PluginsRequest{`,
  735. `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
  736. `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
  737. `}`,
  738. }, "")
  739. return s
  740. }
  741. func (this *PluginsResponse) String() string {
  742. if this == nil {
  743. return "nil"
  744. }
  745. repeatedStringForPlugins := "[]Plugin{"
  746. for _, f := range this.Plugins {
  747. repeatedStringForPlugins += strings.Replace(strings.Replace(f.String(), "Plugin", "Plugin", 1), `&`, ``, 1) + ","
  748. }
  749. repeatedStringForPlugins += "}"
  750. s := strings.Join([]string{`&PluginsResponse{`,
  751. `Plugins:` + repeatedStringForPlugins + `,`,
  752. `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
  753. `}`,
  754. }, "")
  755. return s
  756. }
  757. func (this *ServerResponse) String() string {
  758. if this == nil {
  759. return "nil"
  760. }
  761. s := strings.Join([]string{`&ServerResponse{`,
  762. `UUID:` + fmt.Sprintf("%v", this.UUID) + `,`,
  763. `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
  764. `}`,
  765. }, "")
  766. return s
  767. }
  768. func valueToStringIntrospection(v interface{}) string {
  769. rv := reflect.ValueOf(v)
  770. if rv.IsNil() {
  771. return "nil"
  772. }
  773. pv := reflect.Indirect(rv).Interface()
  774. return fmt.Sprintf("*%v", pv)
  775. }
  776. func (m *Plugin) Unmarshal(dAtA []byte) error {
  777. l := len(dAtA)
  778. iNdEx := 0
  779. for iNdEx < l {
  780. preIndex := iNdEx
  781. var wire uint64
  782. for shift := uint(0); ; shift += 7 {
  783. if shift >= 64 {
  784. return ErrIntOverflowIntrospection
  785. }
  786. if iNdEx >= l {
  787. return io.ErrUnexpectedEOF
  788. }
  789. b := dAtA[iNdEx]
  790. iNdEx++
  791. wire |= uint64(b&0x7F) << shift
  792. if b < 0x80 {
  793. break
  794. }
  795. }
  796. fieldNum := int32(wire >> 3)
  797. wireType := int(wire & 0x7)
  798. if wireType == 4 {
  799. return fmt.Errorf("proto: Plugin: wiretype end group for non-group")
  800. }
  801. if fieldNum <= 0 {
  802. return fmt.Errorf("proto: Plugin: illegal tag %d (wire type %d)", fieldNum, wire)
  803. }
  804. switch fieldNum {
  805. case 1:
  806. if wireType != 2 {
  807. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  808. }
  809. var stringLen uint64
  810. for shift := uint(0); ; shift += 7 {
  811. if shift >= 64 {
  812. return ErrIntOverflowIntrospection
  813. }
  814. if iNdEx >= l {
  815. return io.ErrUnexpectedEOF
  816. }
  817. b := dAtA[iNdEx]
  818. iNdEx++
  819. stringLen |= uint64(b&0x7F) << shift
  820. if b < 0x80 {
  821. break
  822. }
  823. }
  824. intStringLen := int(stringLen)
  825. if intStringLen < 0 {
  826. return ErrInvalidLengthIntrospection
  827. }
  828. postIndex := iNdEx + intStringLen
  829. if postIndex < 0 {
  830. return ErrInvalidLengthIntrospection
  831. }
  832. if postIndex > l {
  833. return io.ErrUnexpectedEOF
  834. }
  835. m.Type = string(dAtA[iNdEx:postIndex])
  836. iNdEx = postIndex
  837. case 2:
  838. if wireType != 2 {
  839. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  840. }
  841. var stringLen uint64
  842. for shift := uint(0); ; shift += 7 {
  843. if shift >= 64 {
  844. return ErrIntOverflowIntrospection
  845. }
  846. if iNdEx >= l {
  847. return io.ErrUnexpectedEOF
  848. }
  849. b := dAtA[iNdEx]
  850. iNdEx++
  851. stringLen |= uint64(b&0x7F) << shift
  852. if b < 0x80 {
  853. break
  854. }
  855. }
  856. intStringLen := int(stringLen)
  857. if intStringLen < 0 {
  858. return ErrInvalidLengthIntrospection
  859. }
  860. postIndex := iNdEx + intStringLen
  861. if postIndex < 0 {
  862. return ErrInvalidLengthIntrospection
  863. }
  864. if postIndex > l {
  865. return io.ErrUnexpectedEOF
  866. }
  867. m.ID = string(dAtA[iNdEx:postIndex])
  868. iNdEx = postIndex
  869. case 3:
  870. if wireType != 2 {
  871. return fmt.Errorf("proto: wrong wireType = %d for field Requires", wireType)
  872. }
  873. var stringLen uint64
  874. for shift := uint(0); ; shift += 7 {
  875. if shift >= 64 {
  876. return ErrIntOverflowIntrospection
  877. }
  878. if iNdEx >= l {
  879. return io.ErrUnexpectedEOF
  880. }
  881. b := dAtA[iNdEx]
  882. iNdEx++
  883. stringLen |= uint64(b&0x7F) << shift
  884. if b < 0x80 {
  885. break
  886. }
  887. }
  888. intStringLen := int(stringLen)
  889. if intStringLen < 0 {
  890. return ErrInvalidLengthIntrospection
  891. }
  892. postIndex := iNdEx + intStringLen
  893. if postIndex < 0 {
  894. return ErrInvalidLengthIntrospection
  895. }
  896. if postIndex > l {
  897. return io.ErrUnexpectedEOF
  898. }
  899. m.Requires = append(m.Requires, string(dAtA[iNdEx:postIndex]))
  900. iNdEx = postIndex
  901. case 4:
  902. if wireType != 2 {
  903. return fmt.Errorf("proto: wrong wireType = %d for field Platforms", wireType)
  904. }
  905. var msglen int
  906. for shift := uint(0); ; shift += 7 {
  907. if shift >= 64 {
  908. return ErrIntOverflowIntrospection
  909. }
  910. if iNdEx >= l {
  911. return io.ErrUnexpectedEOF
  912. }
  913. b := dAtA[iNdEx]
  914. iNdEx++
  915. msglen |= int(b&0x7F) << shift
  916. if b < 0x80 {
  917. break
  918. }
  919. }
  920. if msglen < 0 {
  921. return ErrInvalidLengthIntrospection
  922. }
  923. postIndex := iNdEx + msglen
  924. if postIndex < 0 {
  925. return ErrInvalidLengthIntrospection
  926. }
  927. if postIndex > l {
  928. return io.ErrUnexpectedEOF
  929. }
  930. m.Platforms = append(m.Platforms, types.Platform{})
  931. if err := m.Platforms[len(m.Platforms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  932. return err
  933. }
  934. iNdEx = postIndex
  935. case 5:
  936. if wireType != 2 {
  937. return fmt.Errorf("proto: wrong wireType = %d for field Exports", wireType)
  938. }
  939. var msglen int
  940. for shift := uint(0); ; shift += 7 {
  941. if shift >= 64 {
  942. return ErrIntOverflowIntrospection
  943. }
  944. if iNdEx >= l {
  945. return io.ErrUnexpectedEOF
  946. }
  947. b := dAtA[iNdEx]
  948. iNdEx++
  949. msglen |= int(b&0x7F) << shift
  950. if b < 0x80 {
  951. break
  952. }
  953. }
  954. if msglen < 0 {
  955. return ErrInvalidLengthIntrospection
  956. }
  957. postIndex := iNdEx + msglen
  958. if postIndex < 0 {
  959. return ErrInvalidLengthIntrospection
  960. }
  961. if postIndex > l {
  962. return io.ErrUnexpectedEOF
  963. }
  964. if m.Exports == nil {
  965. m.Exports = make(map[string]string)
  966. }
  967. var mapkey string
  968. var mapvalue string
  969. for iNdEx < postIndex {
  970. entryPreIndex := iNdEx
  971. var wire uint64
  972. for shift := uint(0); ; shift += 7 {
  973. if shift >= 64 {
  974. return ErrIntOverflowIntrospection
  975. }
  976. if iNdEx >= l {
  977. return io.ErrUnexpectedEOF
  978. }
  979. b := dAtA[iNdEx]
  980. iNdEx++
  981. wire |= uint64(b&0x7F) << shift
  982. if b < 0x80 {
  983. break
  984. }
  985. }
  986. fieldNum := int32(wire >> 3)
  987. if fieldNum == 1 {
  988. var stringLenmapkey uint64
  989. for shift := uint(0); ; shift += 7 {
  990. if shift >= 64 {
  991. return ErrIntOverflowIntrospection
  992. }
  993. if iNdEx >= l {
  994. return io.ErrUnexpectedEOF
  995. }
  996. b := dAtA[iNdEx]
  997. iNdEx++
  998. stringLenmapkey |= uint64(b&0x7F) << shift
  999. if b < 0x80 {
  1000. break
  1001. }
  1002. }
  1003. intStringLenmapkey := int(stringLenmapkey)
  1004. if intStringLenmapkey < 0 {
  1005. return ErrInvalidLengthIntrospection
  1006. }
  1007. postStringIndexmapkey := iNdEx + intStringLenmapkey
  1008. if postStringIndexmapkey < 0 {
  1009. return ErrInvalidLengthIntrospection
  1010. }
  1011. if postStringIndexmapkey > l {
  1012. return io.ErrUnexpectedEOF
  1013. }
  1014. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  1015. iNdEx = postStringIndexmapkey
  1016. } else if fieldNum == 2 {
  1017. var stringLenmapvalue uint64
  1018. for shift := uint(0); ; shift += 7 {
  1019. if shift >= 64 {
  1020. return ErrIntOverflowIntrospection
  1021. }
  1022. if iNdEx >= l {
  1023. return io.ErrUnexpectedEOF
  1024. }
  1025. b := dAtA[iNdEx]
  1026. iNdEx++
  1027. stringLenmapvalue |= uint64(b&0x7F) << shift
  1028. if b < 0x80 {
  1029. break
  1030. }
  1031. }
  1032. intStringLenmapvalue := int(stringLenmapvalue)
  1033. if intStringLenmapvalue < 0 {
  1034. return ErrInvalidLengthIntrospection
  1035. }
  1036. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  1037. if postStringIndexmapvalue < 0 {
  1038. return ErrInvalidLengthIntrospection
  1039. }
  1040. if postStringIndexmapvalue > l {
  1041. return io.ErrUnexpectedEOF
  1042. }
  1043. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  1044. iNdEx = postStringIndexmapvalue
  1045. } else {
  1046. iNdEx = entryPreIndex
  1047. skippy, err := skipIntrospection(dAtA[iNdEx:])
  1048. if err != nil {
  1049. return err
  1050. }
  1051. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1052. return ErrInvalidLengthIntrospection
  1053. }
  1054. if (iNdEx + skippy) > postIndex {
  1055. return io.ErrUnexpectedEOF
  1056. }
  1057. iNdEx += skippy
  1058. }
  1059. }
  1060. m.Exports[mapkey] = mapvalue
  1061. iNdEx = postIndex
  1062. case 6:
  1063. if wireType != 2 {
  1064. return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType)
  1065. }
  1066. var stringLen uint64
  1067. for shift := uint(0); ; shift += 7 {
  1068. if shift >= 64 {
  1069. return ErrIntOverflowIntrospection
  1070. }
  1071. if iNdEx >= l {
  1072. return io.ErrUnexpectedEOF
  1073. }
  1074. b := dAtA[iNdEx]
  1075. iNdEx++
  1076. stringLen |= uint64(b&0x7F) << shift
  1077. if b < 0x80 {
  1078. break
  1079. }
  1080. }
  1081. intStringLen := int(stringLen)
  1082. if intStringLen < 0 {
  1083. return ErrInvalidLengthIntrospection
  1084. }
  1085. postIndex := iNdEx + intStringLen
  1086. if postIndex < 0 {
  1087. return ErrInvalidLengthIntrospection
  1088. }
  1089. if postIndex > l {
  1090. return io.ErrUnexpectedEOF
  1091. }
  1092. m.Capabilities = append(m.Capabilities, string(dAtA[iNdEx:postIndex]))
  1093. iNdEx = postIndex
  1094. case 7:
  1095. if wireType != 2 {
  1096. return fmt.Errorf("proto: wrong wireType = %d for field InitErr", wireType)
  1097. }
  1098. var msglen int
  1099. for shift := uint(0); ; shift += 7 {
  1100. if shift >= 64 {
  1101. return ErrIntOverflowIntrospection
  1102. }
  1103. if iNdEx >= l {
  1104. return io.ErrUnexpectedEOF
  1105. }
  1106. b := dAtA[iNdEx]
  1107. iNdEx++
  1108. msglen |= int(b&0x7F) << shift
  1109. if b < 0x80 {
  1110. break
  1111. }
  1112. }
  1113. if msglen < 0 {
  1114. return ErrInvalidLengthIntrospection
  1115. }
  1116. postIndex := iNdEx + msglen
  1117. if postIndex < 0 {
  1118. return ErrInvalidLengthIntrospection
  1119. }
  1120. if postIndex > l {
  1121. return io.ErrUnexpectedEOF
  1122. }
  1123. if m.InitErr == nil {
  1124. m.InitErr = &rpc.Status{}
  1125. }
  1126. if err := m.InitErr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1127. return err
  1128. }
  1129. iNdEx = postIndex
  1130. default:
  1131. iNdEx = preIndex
  1132. skippy, err := skipIntrospection(dAtA[iNdEx:])
  1133. if err != nil {
  1134. return err
  1135. }
  1136. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1137. return ErrInvalidLengthIntrospection
  1138. }
  1139. if (iNdEx + skippy) > l {
  1140. return io.ErrUnexpectedEOF
  1141. }
  1142. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1143. iNdEx += skippy
  1144. }
  1145. }
  1146. if iNdEx > l {
  1147. return io.ErrUnexpectedEOF
  1148. }
  1149. return nil
  1150. }
  1151. func (m *PluginsRequest) Unmarshal(dAtA []byte) error {
  1152. l := len(dAtA)
  1153. iNdEx := 0
  1154. for iNdEx < l {
  1155. preIndex := iNdEx
  1156. var wire uint64
  1157. for shift := uint(0); ; shift += 7 {
  1158. if shift >= 64 {
  1159. return ErrIntOverflowIntrospection
  1160. }
  1161. if iNdEx >= l {
  1162. return io.ErrUnexpectedEOF
  1163. }
  1164. b := dAtA[iNdEx]
  1165. iNdEx++
  1166. wire |= uint64(b&0x7F) << shift
  1167. if b < 0x80 {
  1168. break
  1169. }
  1170. }
  1171. fieldNum := int32(wire >> 3)
  1172. wireType := int(wire & 0x7)
  1173. if wireType == 4 {
  1174. return fmt.Errorf("proto: PluginsRequest: wiretype end group for non-group")
  1175. }
  1176. if fieldNum <= 0 {
  1177. return fmt.Errorf("proto: PluginsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1178. }
  1179. switch fieldNum {
  1180. case 1:
  1181. if wireType != 2 {
  1182. return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
  1183. }
  1184. var stringLen uint64
  1185. for shift := uint(0); ; shift += 7 {
  1186. if shift >= 64 {
  1187. return ErrIntOverflowIntrospection
  1188. }
  1189. if iNdEx >= l {
  1190. return io.ErrUnexpectedEOF
  1191. }
  1192. b := dAtA[iNdEx]
  1193. iNdEx++
  1194. stringLen |= uint64(b&0x7F) << shift
  1195. if b < 0x80 {
  1196. break
  1197. }
  1198. }
  1199. intStringLen := int(stringLen)
  1200. if intStringLen < 0 {
  1201. return ErrInvalidLengthIntrospection
  1202. }
  1203. postIndex := iNdEx + intStringLen
  1204. if postIndex < 0 {
  1205. return ErrInvalidLengthIntrospection
  1206. }
  1207. if postIndex > l {
  1208. return io.ErrUnexpectedEOF
  1209. }
  1210. m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex]))
  1211. iNdEx = postIndex
  1212. default:
  1213. iNdEx = preIndex
  1214. skippy, err := skipIntrospection(dAtA[iNdEx:])
  1215. if err != nil {
  1216. return err
  1217. }
  1218. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1219. return ErrInvalidLengthIntrospection
  1220. }
  1221. if (iNdEx + skippy) > l {
  1222. return io.ErrUnexpectedEOF
  1223. }
  1224. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1225. iNdEx += skippy
  1226. }
  1227. }
  1228. if iNdEx > l {
  1229. return io.ErrUnexpectedEOF
  1230. }
  1231. return nil
  1232. }
  1233. func (m *PluginsResponse) Unmarshal(dAtA []byte) error {
  1234. l := len(dAtA)
  1235. iNdEx := 0
  1236. for iNdEx < l {
  1237. preIndex := iNdEx
  1238. var wire uint64
  1239. for shift := uint(0); ; shift += 7 {
  1240. if shift >= 64 {
  1241. return ErrIntOverflowIntrospection
  1242. }
  1243. if iNdEx >= l {
  1244. return io.ErrUnexpectedEOF
  1245. }
  1246. b := dAtA[iNdEx]
  1247. iNdEx++
  1248. wire |= uint64(b&0x7F) << shift
  1249. if b < 0x80 {
  1250. break
  1251. }
  1252. }
  1253. fieldNum := int32(wire >> 3)
  1254. wireType := int(wire & 0x7)
  1255. if wireType == 4 {
  1256. return fmt.Errorf("proto: PluginsResponse: wiretype end group for non-group")
  1257. }
  1258. if fieldNum <= 0 {
  1259. return fmt.Errorf("proto: PluginsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1260. }
  1261. switch fieldNum {
  1262. case 1:
  1263. if wireType != 2 {
  1264. return fmt.Errorf("proto: wrong wireType = %d for field Plugins", wireType)
  1265. }
  1266. var msglen int
  1267. for shift := uint(0); ; shift += 7 {
  1268. if shift >= 64 {
  1269. return ErrIntOverflowIntrospection
  1270. }
  1271. if iNdEx >= l {
  1272. return io.ErrUnexpectedEOF
  1273. }
  1274. b := dAtA[iNdEx]
  1275. iNdEx++
  1276. msglen |= int(b&0x7F) << shift
  1277. if b < 0x80 {
  1278. break
  1279. }
  1280. }
  1281. if msglen < 0 {
  1282. return ErrInvalidLengthIntrospection
  1283. }
  1284. postIndex := iNdEx + msglen
  1285. if postIndex < 0 {
  1286. return ErrInvalidLengthIntrospection
  1287. }
  1288. if postIndex > l {
  1289. return io.ErrUnexpectedEOF
  1290. }
  1291. m.Plugins = append(m.Plugins, Plugin{})
  1292. if err := m.Plugins[len(m.Plugins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1293. return err
  1294. }
  1295. iNdEx = postIndex
  1296. default:
  1297. iNdEx = preIndex
  1298. skippy, err := skipIntrospection(dAtA[iNdEx:])
  1299. if err != nil {
  1300. return err
  1301. }
  1302. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1303. return ErrInvalidLengthIntrospection
  1304. }
  1305. if (iNdEx + skippy) > l {
  1306. return io.ErrUnexpectedEOF
  1307. }
  1308. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1309. iNdEx += skippy
  1310. }
  1311. }
  1312. if iNdEx > l {
  1313. return io.ErrUnexpectedEOF
  1314. }
  1315. return nil
  1316. }
  1317. func (m *ServerResponse) Unmarshal(dAtA []byte) error {
  1318. l := len(dAtA)
  1319. iNdEx := 0
  1320. for iNdEx < l {
  1321. preIndex := iNdEx
  1322. var wire uint64
  1323. for shift := uint(0); ; shift += 7 {
  1324. if shift >= 64 {
  1325. return ErrIntOverflowIntrospection
  1326. }
  1327. if iNdEx >= l {
  1328. return io.ErrUnexpectedEOF
  1329. }
  1330. b := dAtA[iNdEx]
  1331. iNdEx++
  1332. wire |= uint64(b&0x7F) << shift
  1333. if b < 0x80 {
  1334. break
  1335. }
  1336. }
  1337. fieldNum := int32(wire >> 3)
  1338. wireType := int(wire & 0x7)
  1339. if wireType == 4 {
  1340. return fmt.Errorf("proto: ServerResponse: wiretype end group for non-group")
  1341. }
  1342. if fieldNum <= 0 {
  1343. return fmt.Errorf("proto: ServerResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1344. }
  1345. switch fieldNum {
  1346. case 1:
  1347. if wireType != 2 {
  1348. return fmt.Errorf("proto: wrong wireType = %d for field UUID", wireType)
  1349. }
  1350. var stringLen uint64
  1351. for shift := uint(0); ; shift += 7 {
  1352. if shift >= 64 {
  1353. return ErrIntOverflowIntrospection
  1354. }
  1355. if iNdEx >= l {
  1356. return io.ErrUnexpectedEOF
  1357. }
  1358. b := dAtA[iNdEx]
  1359. iNdEx++
  1360. stringLen |= uint64(b&0x7F) << shift
  1361. if b < 0x80 {
  1362. break
  1363. }
  1364. }
  1365. intStringLen := int(stringLen)
  1366. if intStringLen < 0 {
  1367. return ErrInvalidLengthIntrospection
  1368. }
  1369. postIndex := iNdEx + intStringLen
  1370. if postIndex < 0 {
  1371. return ErrInvalidLengthIntrospection
  1372. }
  1373. if postIndex > l {
  1374. return io.ErrUnexpectedEOF
  1375. }
  1376. m.UUID = string(dAtA[iNdEx:postIndex])
  1377. iNdEx = postIndex
  1378. default:
  1379. iNdEx = preIndex
  1380. skippy, err := skipIntrospection(dAtA[iNdEx:])
  1381. if err != nil {
  1382. return err
  1383. }
  1384. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1385. return ErrInvalidLengthIntrospection
  1386. }
  1387. if (iNdEx + skippy) > l {
  1388. return io.ErrUnexpectedEOF
  1389. }
  1390. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1391. iNdEx += skippy
  1392. }
  1393. }
  1394. if iNdEx > l {
  1395. return io.ErrUnexpectedEOF
  1396. }
  1397. return nil
  1398. }
  1399. func skipIntrospection(dAtA []byte) (n int, err error) {
  1400. l := len(dAtA)
  1401. iNdEx := 0
  1402. depth := 0
  1403. for iNdEx < l {
  1404. var wire uint64
  1405. for shift := uint(0); ; shift += 7 {
  1406. if shift >= 64 {
  1407. return 0, ErrIntOverflowIntrospection
  1408. }
  1409. if iNdEx >= l {
  1410. return 0, io.ErrUnexpectedEOF
  1411. }
  1412. b := dAtA[iNdEx]
  1413. iNdEx++
  1414. wire |= (uint64(b) & 0x7F) << shift
  1415. if b < 0x80 {
  1416. break
  1417. }
  1418. }
  1419. wireType := int(wire & 0x7)
  1420. switch wireType {
  1421. case 0:
  1422. for shift := uint(0); ; shift += 7 {
  1423. if shift >= 64 {
  1424. return 0, ErrIntOverflowIntrospection
  1425. }
  1426. if iNdEx >= l {
  1427. return 0, io.ErrUnexpectedEOF
  1428. }
  1429. iNdEx++
  1430. if dAtA[iNdEx-1] < 0x80 {
  1431. break
  1432. }
  1433. }
  1434. case 1:
  1435. iNdEx += 8
  1436. case 2:
  1437. var length int
  1438. for shift := uint(0); ; shift += 7 {
  1439. if shift >= 64 {
  1440. return 0, ErrIntOverflowIntrospection
  1441. }
  1442. if iNdEx >= l {
  1443. return 0, io.ErrUnexpectedEOF
  1444. }
  1445. b := dAtA[iNdEx]
  1446. iNdEx++
  1447. length |= (int(b) & 0x7F) << shift
  1448. if b < 0x80 {
  1449. break
  1450. }
  1451. }
  1452. if length < 0 {
  1453. return 0, ErrInvalidLengthIntrospection
  1454. }
  1455. iNdEx += length
  1456. case 3:
  1457. depth++
  1458. case 4:
  1459. if depth == 0 {
  1460. return 0, ErrUnexpectedEndOfGroupIntrospection
  1461. }
  1462. depth--
  1463. case 5:
  1464. iNdEx += 4
  1465. default:
  1466. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1467. }
  1468. if iNdEx < 0 {
  1469. return 0, ErrInvalidLengthIntrospection
  1470. }
  1471. if depth == 0 {
  1472. return iNdEx, nil
  1473. }
  1474. }
  1475. return 0, io.ErrUnexpectedEOF
  1476. }
  1477. var (
  1478. ErrInvalidLengthIntrospection = fmt.Errorf("proto: negative length found during unmarshaling")
  1479. ErrIntOverflowIntrospection = fmt.Errorf("proto: integer overflow")
  1480. ErrUnexpectedEndOfGroupIntrospection = fmt.Errorf("proto: unexpected end of group")
  1481. )