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

Function sseClientStreamSections

jsonrpc/codegen/sse.go:136–150  ·  view source on GitHub ↗

sseClientStreamSections returns section templates for SSE client endpoints.

(data *httpcodegen.ServiceData)

Source from the content-addressed store, hash-verified

134
135// sseClientStreamSections returns section templates for SSE client endpoints.
136func sseClientStreamSections(data *httpcodegen.ServiceData) []*codegen.SectionTemplate {
137 sections := make([]*codegen.SectionTemplate, 0)
138 for _, ed := range data.Endpoints {
139 if ed.SSE == nil {
140 continue
141 }
142 // Generate SSE client stream struct and methods
143 sections = append(sections, &codegen.SectionTemplate{
144 Name: "jsonrpc-sse-client-stream",
145 Source: jsonrpcTemplates.Read(sseClientStreamT),
146 Data: ed,
147 })
148 }
149 return sections
150}

Callers 1

sseClientFileFunction · 0.85

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected