snakesimulator.pb.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: snakesimulator.proto
  3. package snakesimulator
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. math "math"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  22. type Direction int32
  23. const (
  24. Direction_Unknown Direction = 0
  25. Direction_Up Direction = 1
  26. Direction_Down Direction = 2
  27. Direction_Left Direction = 3
  28. Direction_Right Direction = 4
  29. )
  30. var Direction_name = map[int32]string{
  31. 0: "Unknown",
  32. 1: "Up",
  33. 2: "Down",
  34. 3: "Left",
  35. 4: "Right",
  36. }
  37. var Direction_value = map[string]int32{
  38. "Unknown": 0,
  39. "Up": 1,
  40. "Down": 2,
  41. "Left": 3,
  42. "Right": 4,
  43. }
  44. func (x Direction) String() string {
  45. return proto.EnumName(Direction_name, int32(x))
  46. }
  47. func (Direction) EnumDescriptor() ([]byte, []int) {
  48. return fileDescriptor_b704e55df18a3970, []int{0}
  49. }
  50. type Point struct {
  51. X uint32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
  52. Y uint32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
  53. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  54. XXX_unrecognized []byte `json:"-"`
  55. XXX_sizecache int32 `json:"-"`
  56. }
  57. func (m *Point) Reset() { *m = Point{} }
  58. func (m *Point) String() string { return proto.CompactTextString(m) }
  59. func (*Point) ProtoMessage() {}
  60. func (*Point) Descriptor() ([]byte, []int) {
  61. return fileDescriptor_b704e55df18a3970, []int{0}
  62. }
  63. func (m *Point) XXX_Unmarshal(b []byte) error {
  64. return xxx_messageInfo_Point.Unmarshal(m, b)
  65. }
  66. func (m *Point) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  67. return xxx_messageInfo_Point.Marshal(b, m, deterministic)
  68. }
  69. func (m *Point) XXX_Merge(src proto.Message) {
  70. xxx_messageInfo_Point.Merge(m, src)
  71. }
  72. func (m *Point) XXX_Size() int {
  73. return xxx_messageInfo_Point.Size(m)
  74. }
  75. func (m *Point) XXX_DiscardUnknown() {
  76. xxx_messageInfo_Point.DiscardUnknown(m)
  77. }
  78. var xxx_messageInfo_Point proto.InternalMessageInfo
  79. func (m *Point) GetX() uint32 {
  80. if m != nil {
  81. return m.X
  82. }
  83. return 0
  84. }
  85. func (m *Point) GetY() uint32 {
  86. if m != nil {
  87. return m.Y
  88. }
  89. return 0
  90. }
  91. type Snake struct {
  92. Points []*Point `protobuf:"bytes,1,rep,name=points,proto3" json:"points,omitempty"`
  93. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  94. XXX_unrecognized []byte `json:"-"`
  95. XXX_sizecache int32 `json:"-"`
  96. }
  97. func (m *Snake) Reset() { *m = Snake{} }
  98. func (m *Snake) String() string { return proto.CompactTextString(m) }
  99. func (*Snake) ProtoMessage() {}
  100. func (*Snake) Descriptor() ([]byte, []int) {
  101. return fileDescriptor_b704e55df18a3970, []int{1}
  102. }
  103. func (m *Snake) XXX_Unmarshal(b []byte) error {
  104. return xxx_messageInfo_Snake.Unmarshal(m, b)
  105. }
  106. func (m *Snake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  107. return xxx_messageInfo_Snake.Marshal(b, m, deterministic)
  108. }
  109. func (m *Snake) XXX_Merge(src proto.Message) {
  110. xxx_messageInfo_Snake.Merge(m, src)
  111. }
  112. func (m *Snake) XXX_Size() int {
  113. return xxx_messageInfo_Snake.Size(m)
  114. }
  115. func (m *Snake) XXX_DiscardUnknown() {
  116. xxx_messageInfo_Snake.DiscardUnknown(m)
  117. }
  118. var xxx_messageInfo_Snake proto.InternalMessageInfo
  119. func (m *Snake) GetPoints() []*Point {
  120. if m != nil {
  121. return m.Points
  122. }
  123. return nil
  124. }
  125. type Field struct {
  126. Width uint32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
  127. Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
  128. Food *Point `protobuf:"bytes,3,opt,name=food,proto3" json:"food,omitempty"`
  129. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  130. XXX_unrecognized []byte `json:"-"`
  131. XXX_sizecache int32 `json:"-"`
  132. }
  133. func (m *Field) Reset() { *m = Field{} }
  134. func (m *Field) String() string { return proto.CompactTextString(m) }
  135. func (*Field) ProtoMessage() {}
  136. func (*Field) Descriptor() ([]byte, []int) {
  137. return fileDescriptor_b704e55df18a3970, []int{2}
  138. }
  139. func (m *Field) XXX_Unmarshal(b []byte) error {
  140. return xxx_messageInfo_Field.Unmarshal(m, b)
  141. }
  142. func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  143. return xxx_messageInfo_Field.Marshal(b, m, deterministic)
  144. }
  145. func (m *Field) XXX_Merge(src proto.Message) {
  146. xxx_messageInfo_Field.Merge(m, src)
  147. }
  148. func (m *Field) XXX_Size() int {
  149. return xxx_messageInfo_Field.Size(m)
  150. }
  151. func (m *Field) XXX_DiscardUnknown() {
  152. xxx_messageInfo_Field.DiscardUnknown(m)
  153. }
  154. var xxx_messageInfo_Field proto.InternalMessageInfo
  155. func (m *Field) GetWidth() uint32 {
  156. if m != nil {
  157. return m.Width
  158. }
  159. return 0
  160. }
  161. func (m *Field) GetHeight() uint32 {
  162. if m != nil {
  163. return m.Height
  164. }
  165. return 0
  166. }
  167. func (m *Field) GetFood() *Point {
  168. if m != nil {
  169. return m.Food
  170. }
  171. return nil
  172. }
  173. type Stats struct {
  174. Generation uint32 `protobuf:"varint,1,opt,name=generation,proto3" json:"generation,omitempty"`
  175. Individual uint32 `protobuf:"varint,2,opt,name=individual,proto3" json:"individual,omitempty"`
  176. Move uint32 `protobuf:"varint,3,opt,name=move,proto3" json:"move,omitempty"`
  177. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  178. XXX_unrecognized []byte `json:"-"`
  179. XXX_sizecache int32 `json:"-"`
  180. }
  181. func (m *Stats) Reset() { *m = Stats{} }
  182. func (m *Stats) String() string { return proto.CompactTextString(m) }
  183. func (*Stats) ProtoMessage() {}
  184. func (*Stats) Descriptor() ([]byte, []int) {
  185. return fileDescriptor_b704e55df18a3970, []int{3}
  186. }
  187. func (m *Stats) XXX_Unmarshal(b []byte) error {
  188. return xxx_messageInfo_Stats.Unmarshal(m, b)
  189. }
  190. func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  191. return xxx_messageInfo_Stats.Marshal(b, m, deterministic)
  192. }
  193. func (m *Stats) XXX_Merge(src proto.Message) {
  194. xxx_messageInfo_Stats.Merge(m, src)
  195. }
  196. func (m *Stats) XXX_Size() int {
  197. return xxx_messageInfo_Stats.Size(m)
  198. }
  199. func (m *Stats) XXX_DiscardUnknown() {
  200. xxx_messageInfo_Stats.DiscardUnknown(m)
  201. }
  202. var xxx_messageInfo_Stats proto.InternalMessageInfo
  203. func (m *Stats) GetGeneration() uint32 {
  204. if m != nil {
  205. return m.Generation
  206. }
  207. return 0
  208. }
  209. func (m *Stats) GetIndividual() uint32 {
  210. if m != nil {
  211. return m.Individual
  212. }
  213. return 0
  214. }
  215. func (m *Stats) GetMove() uint32 {
  216. if m != nil {
  217. return m.Move
  218. }
  219. return 0
  220. }
  221. type None struct {
  222. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  223. XXX_unrecognized []byte `json:"-"`
  224. XXX_sizecache int32 `json:"-"`
  225. }
  226. func (m *None) Reset() { *m = None{} }
  227. func (m *None) String() string { return proto.CompactTextString(m) }
  228. func (*None) ProtoMessage() {}
  229. func (*None) Descriptor() ([]byte, []int) {
  230. return fileDescriptor_b704e55df18a3970, []int{4}
  231. }
  232. func (m *None) XXX_Unmarshal(b []byte) error {
  233. return xxx_messageInfo_None.Unmarshal(m, b)
  234. }
  235. func (m *None) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  236. return xxx_messageInfo_None.Marshal(b, m, deterministic)
  237. }
  238. func (m *None) XXX_Merge(src proto.Message) {
  239. xxx_messageInfo_None.Merge(m, src)
  240. }
  241. func (m *None) XXX_Size() int {
  242. return xxx_messageInfo_None.Size(m)
  243. }
  244. func (m *None) XXX_DiscardUnknown() {
  245. xxx_messageInfo_None.DiscardUnknown(m)
  246. }
  247. var xxx_messageInfo_None proto.InternalMessageInfo
  248. func init() {
  249. proto.RegisterEnum("snakesimulator.Direction", Direction_name, Direction_value)
  250. proto.RegisterType((*Point)(nil), "snakesimulator.Point")
  251. proto.RegisterType((*Snake)(nil), "snakesimulator.Snake")
  252. proto.RegisterType((*Field)(nil), "snakesimulator.Field")
  253. proto.RegisterType((*Stats)(nil), "snakesimulator.Stats")
  254. proto.RegisterType((*None)(nil), "snakesimulator.None")
  255. }
  256. func init() { proto.RegisterFile("snakesimulator.proto", fileDescriptor_b704e55df18a3970) }
  257. var fileDescriptor_b704e55df18a3970 = []byte{
  258. // 329 bytes of a gzipped FileDescriptorProto
  259. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4b, 0xfb, 0x30,
  260. 0x18, 0xc6, 0x97, 0xad, 0xe9, 0xf7, 0xbb, 0x77, 0x6e, 0x94, 0x97, 0x29, 0xc5, 0x83, 0x8c, 0x78,
  261. 0x99, 0x82, 0x43, 0x26, 0x88, 0x37, 0x2f, 0xc3, 0x93, 0x88, 0x74, 0xec, 0xe4, 0xc5, 0x6a, 0xb3,
  262. 0x35, 0xac, 0x4b, 0x4a, 0x9b, 0xfd, 0xfa, 0xe7, 0xfc, 0xdb, 0x24, 0x69, 0x06, 0x73, 0x22, 0xec,
  263. 0x96, 0xf7, 0xe9, 0xf3, 0xe4, 0xc3, 0xf3, 0x36, 0xd0, 0x2d, 0x65, 0x3c, 0xe7, 0xa5, 0x58, 0x2c,
  264. 0xb3, 0x58, 0xab, 0x62, 0x90, 0x17, 0x4a, 0x2b, 0xec, 0xfc, 0x54, 0xd9, 0x25, 0xd0, 0x57, 0x25,
  265. 0xa4, 0xc6, 0x13, 0x20, 0x9b, 0x90, 0xf4, 0x48, 0xbf, 0x1d, 0x91, 0x8d, 0x99, 0xb6, 0x61, 0xbd,
  266. 0x9a, 0xb6, 0xec, 0x1e, 0xe8, 0xd8, 0xc4, 0xf0, 0x06, 0xfc, 0xdc, 0xb8, 0xcb, 0x90, 0xf4, 0x1a,
  267. 0xfd, 0xd6, 0xf0, 0x74, 0x70, 0x00, 0xb1, 0x77, 0x45, 0xce, 0xc4, 0xde, 0x81, 0x3e, 0x09, 0x9e,
  268. 0x25, 0xd8, 0x05, 0xba, 0x16, 0x89, 0x4e, 0x1d, 0xa0, 0x1a, 0xf0, 0x0c, 0xfc, 0x94, 0x8b, 0x59,
  269. 0xaa, 0x1d, 0xc9, 0x4d, 0x78, 0x05, 0xde, 0x54, 0xa9, 0x24, 0x6c, 0xf4, 0xc8, 0xdf, 0x0c, 0x6b,
  270. 0x61, 0x6f, 0x40, 0xc7, 0x3a, 0xd6, 0x25, 0x5e, 0x00, 0xcc, 0xb8, 0xe4, 0x45, 0xac, 0x85, 0x92,
  271. 0x0e, 0xb3, 0xa7, 0x98, 0xef, 0x42, 0x26, 0x62, 0x25, 0x92, 0x65, 0x9c, 0x39, 0xde, 0x9e, 0x82,
  272. 0x08, 0xde, 0x42, 0xad, 0xb8, 0x65, 0xb6, 0x23, 0x7b, 0x66, 0x3e, 0x78, 0x2f, 0x4a, 0xf2, 0xeb,
  273. 0x47, 0x68, 0x8e, 0x44, 0xc1, 0x3f, 0xed, 0x45, 0x2d, 0xf8, 0x37, 0x91, 0x73, 0xa9, 0xd6, 0x32,
  274. 0xa8, 0xa1, 0x0f, 0xf5, 0x49, 0x1e, 0x10, 0xfc, 0x0f, 0xde, 0xc8, 0x28, 0x75, 0x73, 0x7a, 0xe6,
  275. 0x53, 0x1d, 0x34, 0xb0, 0x09, 0x34, 0x32, 0x75, 0x02, 0x6f, 0xf8, 0x45, 0xa0, 0x63, 0x17, 0x38,
  276. 0xde, 0x95, 0xc0, 0x07, 0xa0, 0xb6, 0x16, 0x76, 0x0f, 0xeb, 0x19, 0xe4, 0xf9, 0xaf, 0xd2, 0x36,
  277. 0xce, 0x6a, 0xb7, 0xc4, 0x24, 0xa7, 0xd5, 0x52, 0x8f, 0x4b, 0xda, 0x3f, 0xb0, 0x4b, 0x96, 0x76,
  278. 0x59, 0xc7, 0x32, 0x8d, 0xd9, 0x24, 0x3f, 0x7c, 0xfb, 0x78, 0xee, 0xbe, 0x03, 0x00, 0x00, 0xff,
  279. 0xff, 0x74, 0x50, 0xa2, 0x2d, 0x54, 0x02, 0x00, 0x00,
  280. }
  281. // Reference imports to suppress errors if they are not otherwise used.
  282. var _ context.Context
  283. var _ grpc.ClientConn
  284. // This is a compile-time assertion to ensure that this generated file
  285. // is compatible with the grpc package it is being compiled against.
  286. const _ = grpc.SupportPackageIsVersion4
  287. // SnakeSimulatorClient is the client API for SnakeSimulator service.
  288. //
  289. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  290. type SnakeSimulatorClient interface {
  291. Snake(ctx context.Context, in *None, opts ...grpc.CallOption) (SnakeSimulator_SnakeClient, error)
  292. Field(ctx context.Context, in *None, opts ...grpc.CallOption) (SnakeSimulator_FieldClient, error)
  293. Stats(ctx context.Context, in *None, opts ...grpc.CallOption) (SnakeSimulator_StatsClient, error)
  294. }
  295. type snakeSimulatorClient struct {
  296. cc *grpc.ClientConn
  297. }
  298. func NewSnakeSimulatorClient(cc *grpc.ClientConn) SnakeSimulatorClient {
  299. return &snakeSimulatorClient{cc}
  300. }
  301. func (c *snakeSimulatorClient) Snake(ctx context.Context, in *None, opts ...grpc.CallOption) (SnakeSimulator_SnakeClient, error) {
  302. stream, err := c.cc.NewStream(ctx, &_SnakeSimulator_serviceDesc.Streams[0], "/snakesimulator.SnakeSimulator/snake", opts...)
  303. if err != nil {
  304. return nil, err
  305. }
  306. x := &snakeSimulatorSnakeClient{stream}
  307. if err := x.ClientStream.SendMsg(in); err != nil {
  308. return nil, err
  309. }
  310. if err := x.ClientStream.CloseSend(); err != nil {
  311. return nil, err
  312. }
  313. return x, nil
  314. }
  315. type SnakeSimulator_SnakeClient interface {
  316. Recv() (*Snake, error)
  317. grpc.ClientStream
  318. }
  319. type snakeSimulatorSnakeClient struct {
  320. grpc.ClientStream
  321. }
  322. func (x *snakeSimulatorSnakeClient) Recv() (*Snake, error) {
  323. m := new(Snake)
  324. if err := x.ClientStream.RecvMsg(m); err != nil {
  325. return nil, err
  326. }
  327. return m, nil
  328. }
  329. func (c *snakeSimulatorClient) Field(ctx context.Context, in *None, opts ...grpc.CallOption) (SnakeSimulator_FieldClient, error) {
  330. stream, err := c.cc.NewStream(ctx, &_SnakeSimulator_serviceDesc.Streams[1], "/snakesimulator.SnakeSimulator/field", opts...)
  331. if err != nil {
  332. return nil, err
  333. }
  334. x := &snakeSimulatorFieldClient{stream}
  335. if err := x.ClientStream.SendMsg(in); err != nil {
  336. return nil, err
  337. }
  338. if err := x.ClientStream.CloseSend(); err != nil {
  339. return nil, err
  340. }
  341. return x, nil
  342. }
  343. type SnakeSimulator_FieldClient interface {
  344. Recv() (*Field, error)
  345. grpc.ClientStream
  346. }
  347. type snakeSimulatorFieldClient struct {
  348. grpc.ClientStream
  349. }
  350. func (x *snakeSimulatorFieldClient) Recv() (*Field, error) {
  351. m := new(Field)
  352. if err := x.ClientStream.RecvMsg(m); err != nil {
  353. return nil, err
  354. }
  355. return m, nil
  356. }
  357. func (c *snakeSimulatorClient) Stats(ctx context.Context, in *None, opts ...grpc.CallOption) (SnakeSimulator_StatsClient, error) {
  358. stream, err := c.cc.NewStream(ctx, &_SnakeSimulator_serviceDesc.Streams[2], "/snakesimulator.SnakeSimulator/stats", opts...)
  359. if err != nil {
  360. return nil, err
  361. }
  362. x := &snakeSimulatorStatsClient{stream}
  363. if err := x.ClientStream.SendMsg(in); err != nil {
  364. return nil, err
  365. }
  366. if err := x.ClientStream.CloseSend(); err != nil {
  367. return nil, err
  368. }
  369. return x, nil
  370. }
  371. type SnakeSimulator_StatsClient interface {
  372. Recv() (*Stats, error)
  373. grpc.ClientStream
  374. }
  375. type snakeSimulatorStatsClient struct {
  376. grpc.ClientStream
  377. }
  378. func (x *snakeSimulatorStatsClient) Recv() (*Stats, error) {
  379. m := new(Stats)
  380. if err := x.ClientStream.RecvMsg(m); err != nil {
  381. return nil, err
  382. }
  383. return m, nil
  384. }
  385. // SnakeSimulatorServer is the server API for SnakeSimulator service.
  386. type SnakeSimulatorServer interface {
  387. Snake(*None, SnakeSimulator_SnakeServer) error
  388. Field(*None, SnakeSimulator_FieldServer) error
  389. Stats(*None, SnakeSimulator_StatsServer) error
  390. }
  391. // UnimplementedSnakeSimulatorServer can be embedded to have forward compatible implementations.
  392. type UnimplementedSnakeSimulatorServer struct {
  393. }
  394. func (*UnimplementedSnakeSimulatorServer) Snake(req *None, srv SnakeSimulator_SnakeServer) error {
  395. return status.Errorf(codes.Unimplemented, "method Snake not implemented")
  396. }
  397. func (*UnimplementedSnakeSimulatorServer) Field(req *None, srv SnakeSimulator_FieldServer) error {
  398. return status.Errorf(codes.Unimplemented, "method Field not implemented")
  399. }
  400. func (*UnimplementedSnakeSimulatorServer) Stats(req *None, srv SnakeSimulator_StatsServer) error {
  401. return status.Errorf(codes.Unimplemented, "method Stats not implemented")
  402. }
  403. func RegisterSnakeSimulatorServer(s *grpc.Server, srv SnakeSimulatorServer) {
  404. s.RegisterService(&_SnakeSimulator_serviceDesc, srv)
  405. }
  406. func _SnakeSimulator_Snake_Handler(srv interface{}, stream grpc.ServerStream) error {
  407. m := new(None)
  408. if err := stream.RecvMsg(m); err != nil {
  409. return err
  410. }
  411. return srv.(SnakeSimulatorServer).Snake(m, &snakeSimulatorSnakeServer{stream})
  412. }
  413. type SnakeSimulator_SnakeServer interface {
  414. Send(*Snake) error
  415. grpc.ServerStream
  416. }
  417. type snakeSimulatorSnakeServer struct {
  418. grpc.ServerStream
  419. }
  420. func (x *snakeSimulatorSnakeServer) Send(m *Snake) error {
  421. return x.ServerStream.SendMsg(m)
  422. }
  423. func _SnakeSimulator_Field_Handler(srv interface{}, stream grpc.ServerStream) error {
  424. m := new(None)
  425. if err := stream.RecvMsg(m); err != nil {
  426. return err
  427. }
  428. return srv.(SnakeSimulatorServer).Field(m, &snakeSimulatorFieldServer{stream})
  429. }
  430. type SnakeSimulator_FieldServer interface {
  431. Send(*Field) error
  432. grpc.ServerStream
  433. }
  434. type snakeSimulatorFieldServer struct {
  435. grpc.ServerStream
  436. }
  437. func (x *snakeSimulatorFieldServer) Send(m *Field) error {
  438. return x.ServerStream.SendMsg(m)
  439. }
  440. func _SnakeSimulator_Stats_Handler(srv interface{}, stream grpc.ServerStream) error {
  441. m := new(None)
  442. if err := stream.RecvMsg(m); err != nil {
  443. return err
  444. }
  445. return srv.(SnakeSimulatorServer).Stats(m, &snakeSimulatorStatsServer{stream})
  446. }
  447. type SnakeSimulator_StatsServer interface {
  448. Send(*Stats) error
  449. grpc.ServerStream
  450. }
  451. type snakeSimulatorStatsServer struct {
  452. grpc.ServerStream
  453. }
  454. func (x *snakeSimulatorStatsServer) Send(m *Stats) error {
  455. return x.ServerStream.SendMsg(m)
  456. }
  457. var _SnakeSimulator_serviceDesc = grpc.ServiceDesc{
  458. ServiceName: "snakesimulator.SnakeSimulator",
  459. HandlerType: (*SnakeSimulatorServer)(nil),
  460. Methods: []grpc.MethodDesc{},
  461. Streams: []grpc.StreamDesc{
  462. {
  463. StreamName: "snake",
  464. Handler: _SnakeSimulator_Snake_Handler,
  465. ServerStreams: true,
  466. },
  467. {
  468. StreamName: "field",
  469. Handler: _SnakeSimulator_Field_Handler,
  470. ServerStreams: true,
  471. },
  472. {
  473. StreamName: "stats",
  474. Handler: _SnakeSimulator_Stats_Handler,
  475. ServerStreams: true,
  476. },
  477. },
  478. Metadata: "snakesimulator.proto",
  479. }