You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

yitidgengo.h 2.0 kB

4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* Code generated by cmd/cgo; DO NOT EDIT. */
  2. /* package command-line-arguments */
  3. #line 1 "cgo-builtin-export-prolog"
  4. #include <stddef.h> /* for ptrdiff_t below */
  5. #ifndef GO_CGO_EXPORT_PROLOGUE_H
  6. #define GO_CGO_EXPORT_PROLOGUE_H
  7. #ifndef GO_CGO_GOSTRING_TYPEDEF
  8. typedef struct { const char *p; ptrdiff_t n; } _GoString_;
  9. #endif
  10. #endif
  11. /* Start of preamble from import "C" comments. */
  12. /* End of preamble from import "C" comments. */
  13. /* Start of boilerplate cgo prologue. */
  14. #line 1 "cgo-gcc-export-header-prolog"
  15. #ifndef GO_CGO_PROLOGUE_H
  16. #define GO_CGO_PROLOGUE_H
  17. typedef signed char GoInt8;
  18. typedef unsigned char GoUint8;
  19. typedef short GoInt16;
  20. typedef unsigned short GoUint16;
  21. typedef int GoInt32;
  22. typedef unsigned int GoUint32;
  23. typedef long long GoInt64;
  24. typedef unsigned long long GoUint64;
  25. typedef GoInt64 GoInt;
  26. typedef GoUint64 GoUint;
  27. typedef __SIZE_TYPE__ GoUintptr;
  28. typedef float GoFloat32;
  29. typedef double GoFloat64;
  30. typedef float _Complex GoComplex64;
  31. typedef double _Complex GoComplex128;
  32. /*
  33. static assertion to make sure the file is being used on architecture
  34. at least with matching size of GoInt.
  35. */
  36. typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
  37. #ifndef GO_CGO_GOSTRING_TYPEDEF
  38. typedef _GoString_ GoString;
  39. #endif
  40. typedef void *GoMap;
  41. typedef void *GoChan;
  42. typedef struct { void *t; void *v; } GoInterface;
  43. typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
  44. #endif
  45. /* End of boilerplate cgo prologue. */
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49. // 注册一个 WorkerId,会先注销所有本机已注册的记录
  50. extern __declspec(dllexport) GoInt32 RegisterOne(char* ip, GoInt32 port, char* password, GoInt32 maxWorkerId, GoInt database);
  51. // 注销本机已注册的 WorkerId
  52. extern __declspec(dllexport) void UnRegister();
  53. // 检查本地WorkerId是否有效(0-有效,其它-无效)
  54. extern __declspec(dllexport) GoInt32 Validate(GoInt32 workerId);
  55. #ifdef __cplusplus
  56. }
  57. #endif