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

Function SSEEventRetry

dsl/sse.go:298–309  ·  view source on GitHub ↗

SSEEventRetry defines the attribute of the StreamingResult type that provides the retry field for a Server-Sent Event. The attribute must exist in the StreamingResult type and must be of type Int or UInt. SSEEventRetry must appear in a `ServerSentEvents` expression. SSEEventRetry accepts a single

(name string)

Source from the content-addressed store, hash-verified

296// })
297// })
298func SSEEventRetry(name string) {
299 if name == "" {
300 eval.ReportError("retry field name cannot be empty")
301 return
302 }
303 sse, ok := eval.Current().(*expr.HTTPSSEExpr)
304 if !ok {
305 eval.IncompatibleDSL()
306 return
307 }
308 sse.RetryField = name
309}

Callers 1

sse_dsls.goFile · 0.85

Calls 3

ReportErrorFunction · 0.92
CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92

Tested by

no test coverage detected