MCPcopy Create free account
hub / github.com/goadesign/goa / hasJSONRPCStreaming

Function hasJSONRPCStreaming

codegen/service/service.go:399–406  ·  view source on GitHub ↗

hasJSONRPCStreaming returns true if the service has a JSON-RPC streaming endpoint (WebSocket or SSE).

(sd *Data)

Source from the content-addressed store, hash-verified

397// hasJSONRPCStreaming returns true if the service has a JSON-RPC streaming
398// endpoint (WebSocket or SSE).
399func hasJSONRPCStreaming(sd *Data) bool {
400 for _, m := range sd.Methods {
401 if m.IsJSONRPC && m.ServerStream != nil {
402 return true
403 }
404 }
405 return false
406}
407
408// isJSONRPCSSE returns true if the service uses SSE for JSON-RPC streaming.
409// This requires checking the HTTP endpoints in the root expression.

Callers 2

FilesFunction · 0.85
exampleServiceFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected