MCPcopy
hub / github.com/segmentio/kafka-go / Register

Function Register

protocol/protocol.go:202–214  ·  view source on GitHub ↗

Register is automatically called by sub-packages are imported to install a new pair of request/response message types.

(req, res Message)

Source from the content-addressed store, hash-verified

200// Register is automatically called by sub-packages are imported to install a
201// new pair of request/response message types.
202func Register(req, res Message) {
203 k1 := req.ApiKey()
204 k2 := res.ApiKey()
205
206 if k1 != k2 {
207 panic(fmt.Sprintf("[%T/%T]: request and response API keys mismatch: %d != %d", req, res, k1, k2))
208 }
209
210 apiTypes[k1] = apiType{
211 requests: typesOf(req),
212 responses: typesOf(res),
213 }
214}
215
216// OverrideTypeMessage is an interface implemented by messages that want to override the standard
217// request/response types for a given API.

Callers 15

initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92

Calls 2

typesOfFunction · 0.85
ApiKeyMethod · 0.65

Tested by

no test coverage detected