You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-18Lines changed: 50 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -4,41 +4,58 @@ This repository demonstrates how you can call IBM MQ from applications written i
4
4
5
5
> **NOTICE**: Please ensure that you use a dependency management tool such as [dep](https://github.com/golang/dep) or [Glide](http://glide.sh/), and add a specific version dependency.
6
6
7
-
This repository previously contained sample programs that exported MQ statistics to some monitoring packages. These have now been moved to a new [GitHub repository called mq-metric-samples](https://github.com/ibm-messaging/mq-metric-samples).
7
+
This repository previously contained sample programs that exported MQ statistics to
8
+
some monitoring packages. These have now been moved to a
9
+
new [GitHub repository called mq-metric-samples](https://github.com/ibm-messaging/mq-metric-samples).
8
10
9
-
A minimum level of MQ V8 is required to build these packages.
10
-
However, note that the monitoring data published by the queue manager is not available before MQ V9.
11
+
A minimum level of MQ V8 is required to build these packages. However, note that
12
+
the monitoring data published by the queue manager is not available before MQ V9.
11
13
12
14
## Health Warning
13
15
14
-
This package is provided as-is with no guarantees of support or updates. There are also no guarantees of compatibility with any future versions of the package; the API is subject to change based on any feedback.
16
+
This package is provided as-is with no guarantees of support or updates. There are
17
+
also no guarantees of compatibility with any future versions of the package; the API
18
+
is subject to change based on any feedback. Versioned releases are made in this repository
19
+
to assist with using stable APIs.
15
20
16
21
## MQI Description
17
22
18
23
The ibmmq directory contains a Go package, exposing an MQI-like interface.
19
24
20
-
The intention is to give an API that is more natural for Go programmers than the common procedural MQI. For example, fixed length string arrays from the C API such as MQCHAR48 are represented by the native Go string type. Conversion between these types is handled within the ibmmq package itself, removing the need for Go programmers to know about it.
25
+
The intention is to give an API that is more natural for Go programmers than the
26
+
common procedural MQI. For example, fixed length string arrays from the C API such
27
+
as MQCHAR48 are represented by the native Go string type. Conversion between these
28
+
types is handled within the ibmmq package itself, removing the need for Go programmers
29
+
to know about it.
21
30
22
-
A short program in the samples/mqitest directory gives an example of using this interface, to put and get messages and to subscribe to a topic.
31
+
A short program in the samples/mqitest directory gives an example of using this interface,
32
+
to put and get messages and to subscribe to a topic.
23
33
24
34
The mqmetric directory contains functions to help monitoring programs access MQ status and
25
35
statistics. This package is not needed for general application programs.
26
36
27
-
Feedback on the utility of this package, thoughts about whether it should be changed or extended are welcomed.
28
-
29
37
## Using the package
30
38
31
-
To use code in this repository, you will need to be able to build Go applications, and have a copy of MQ installed to build against. It uses cgo to access the MQI C structures and definitions. It assumes that MQ has been installed in the default location on a Linux platform (`/opt/mqm`) but you can easily change the cgo directives in the source files if necessary.
39
+
To use code in this repository, you will need to be able to build Go applications, and
40
+
have a copy of MQ installed to build against. It uses cgo to access the MQI C
41
+
structures and definitions. It assumes that MQ has been installed in the default
42
+
location (on a Linux platform this would be `/opt/mqm`) but this can be changed
43
+
with environment variables if necessary.
32
44
33
-
Some Windows capability is also included. This has been tested with Go 1.10 compiler, which now permits standard Windows paths (eg including spaces) so the CGO directives can point at the normal MQ install path.
45
+
Windows compatibility is also included. This has been tested with Go 1.10 compiler,
46
+
which now permits standard Windows paths (eg including spaces) so the CGO directives
47
+
can point at the normal MQ install path.
34
48
35
49
## Getting started
36
50
37
-
If you are unfamiliar with Go, the following steps can help create a working environment with source code in a suitable tree. Initial setup tends to be platform-specific, but subsequent steps are independent of the platform.
51
+
If you are unfamiliar with Go, the following steps can help create a working environment
52
+
with source code in a suitable tree. Initial setup tends to be platform-specific,
53
+
but subsequent steps are independent of the platform.
38
54
39
55
### Linux
40
56
41
-
* Install the Go runtime and compiler. On Linux, the packaging may vary but a typical directory for the code is `/usr/lib/golang`.
57
+
* Install the Go runtime and compiler. On Linux, the packaging may vary but a typical
58
+
directory for the code is `/usr/lib/golang`.
42
59
43
60
* Create a working directory. For example, ```mkdir $HOME/gowork```
44
61
@@ -81,6 +98,14 @@ set CC=x86_64-w64-mingw32-gcc.exe
* Follow the instructions in the [mq-metric-samples repository](https://github.com/ibm-messaging/mq-metric-samples) to compile the sample programs you are interested in.
At this point, you should have a compiled copy of the code in `$GOPATH/bin`.
121
+
At this point, you should have a compiled copy of the program in `$GOPATH/bin`.
95
122
96
123
## Limitations
97
124
@@ -111,11 +138,16 @@ See [CHANGELOG](CHANGELOG.md) in this directory.
111
138
112
139
## Issues and Contributions
113
140
114
-
For feedback and issues relating specifically to this package, please use the [GitHub issue tracker](https://github.com/ibm-messaging/mq-golang/issues).
141
+
Feedback on the utility of this package, thoughts about whether it should be changed
142
+
or extended are welcomed.
143
+
144
+
For feedback and issues relating specifically to this package, please use
145
+
the [GitHub issue tracker](https://github.com/ibm-messaging/mq-golang/issues).
115
146
116
-
Contributions to this package can be accepted under the terms of the IBM Contributor License Agreement,
117
-
found in the [CLA file](CLA.md) of this repository. When submitting a pull request, you must include a statement stating
118
-
you accept the terms in the CLA.
147
+
Contributions to this package can be accepted under the terms of the IBM Contributor
148
+
License Agreement, found in the [CLA file](CLA.md) of this repository. When
149
+
submitting a pull request, you must include a statement stating you accept the terms
0 commit comments