master
md 24 lines 1.13 KB
Rendered Raw
1 # Protocol Clients
2
3 This directory contains reusable protocol implementations used by IBM.D modules. Protocols abstract network or API details and return typed data structures so collectors can focus on orchestration.
4
5 Highlights:
6
7 | Path | Purpose |
8 |------|---------|
9 | `openmetrics/` | Generic HTTP client + parser for Prometheus/MicroProfile metrics. |
10 | `websphere/pmi/` | PerfServlet XML snapshot loader and typed PMI tables. |
11 | `websphere/jmx/` | Adapter layer on top of the JMX bridge helper. |
12 | `jmxbridge/` | Process manager for the JSON-over-stdin Java helper (used by WebSphere JMX). |
13 | `mq/` | IBM MQ PCF/command interfaces. |
14 | `db2/` | DB2 ODBC helpers (shared with as400 module). |
15
16 When creating a new collector: if the target exposes an API that may be reused later, add a protocol here instead of embedding HTTP/ODBC logic directly into the module.
17
18 Protocols should:
19
20 1. Accept a `context.Context` for cancellation.
21 2. Return rich Go structs (not `map[string]interface{}`) so collectors get compile-time safety.
22 3. Handle feature detection gracefully and emit informative errors.
23
24 Shared CGO shims live in [`../pkg`](../pkg/README.md).