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

Function hasJSONRPCHTTP

jsonrpc/codegen/server.go:189–196  ·  view source on GitHub ↗

hasJSONRPCHTTP returns true if the service has non-streaming JSON-RPC endpoints.

(svc *expr.HTTPServiceExpr)

Source from the content-addressed store, hash-verified

187
188// hasJSONRPCHTTP returns true if the service has non-streaming JSON-RPC endpoints.
189func hasJSONRPCHTTP(svc *expr.HTTPServiceExpr) bool {
190 for _, e := range svc.HTTPEndpoints {
191 if e.IsJSONRPC() && !e.MethodExpr.IsStreaming() {
192 return true
193 }
194 }
195 return false
196}
197
198// hasMixedJSONRPCTransports returns true if the service has both HTTP and SSE JSON-RPC endpoints.
199func hasMixedJSONRPCTransports(svc *expr.HTTPServiceExpr, data *httpcodegen.ServicesData) bool {

Callers 1

Calls 2

IsJSONRPCMethod · 0.80
IsStreamingMethod · 0.45

Tested by

no test coverage detected