MCPcopy Create free account
hub / github.com/CyCoreSystems/ari-proxy / dispatchRequest

Method dispatchRequest

server/server.go:337–571  ·  view source on GitHub ↗

TODO: see if there is a more programmatic approach to this nolint: gocyclo

(ctx context.Context, reply string, req *proxy.Request)

Source from the content-addressed store, hash-verified

335// TODO: see if there is a more programmatic approach to this
336// nolint: gocyclo
337func (s *Server) dispatchRequest(ctx context.Context, reply string, req *proxy.Request) {
338 var f func(context.Context, string, *proxy.Request)
339
340 s.Log.Debug("received request", "kind", req.Kind)
341 switch req.Kind {
342 case "ApplicationData":
343 f = s.applicationData
344 case "ApplicationGet":
345 f = s.applicationGet
346 case "ApplicationList":
347 f = s.applicationList
348 case "ApplicationSubscribe":
349 f = s.applicationSubscribe
350 case "ApplicationUnsubscribe":
351 f = s.applicationUnsubscribe
352 case "AsteriskConfigData":
353 f = s.asteriskConfigData
354 case "AsteriskConfigDelete":
355 f = s.asteriskConfigDelete
356 case "AsteriskConfigUpdate":
357 f = s.asteriskConfigUpdate
358 case "AsteriskLoggingCreate":
359 f = s.asteriskLoggingCreate
360 case "AsteriskLoggingData":
361 f = s.asteriskLoggingData
362 case "AsteriskLoggingDelete":
363 f = s.asteriskLoggingDelete
364 case "AsteriskLoggingGet":
365 f = s.asteriskLoggingGet
366 case "AsteriskLoggingList":
367 f = s.asteriskLoggingList
368 case "AsteriskLoggingRotate":
369 f = s.asteriskLoggingRotate
370 case "AsteriskModuleData":
371 f = s.asteriskModuleData
372 case "AsteriskModuleGet":
373 f = s.asteriskModuleGet
374 case "AsteriskModuleLoad":
375 f = s.asteriskModuleLoad
376 case "AsteriskModuleList":
377 f = s.asteriskModuleList
378 case "AsteriskModuleReload":
379 f = s.asteriskModuleReload
380 case "AsteriskModuleUnload":
381 f = s.asteriskModuleUnload
382 case "AsteriskInfo":
383 f = s.asteriskInfo
384 case "AsteriskVariableGet":
385 f = s.asteriskVariableGet
386 case "AsteriskVariableSet":
387 f = s.asteriskVariableSet
388 case "BridgeAddChannel":
389 f = s.bridgeAddChannel
390 case "BridgeCreate":
391 f = s.bridgeCreate
392 case "BridgeStageCreate":
393 f = s.bridgeStageCreate
394 case "BridgeData":

Callers 1

newRequestHandlerMethod · 0.95

Calls 2

sendErrorMethod · 0.95
NewMethod · 0.80

Tested by

no test coverage detected