sse
API reference for the sse package, generated from Go doc comments.
import "github.com/grx-gql/grx/sse"Index
type Transport
Transport streams GraphQL subscription responses over Server-Sent Events. It is safe to share across requests.
type Transport struct{}func New
func New() *TransportNew returns a Transport ready to be registered with the server.
func (Transport) Match
func (Transport) Match(r *http.Request) boolMatch reports whether r is asking for a text/event-stream response.
func (Transport) Serve
func (Transport) Serve(w http.ResponseWriter, r *http.Request, executor core.Executor)Serve runs the SSE response loop, forwarding each emitted Response as a "next" event and closing with a "complete" event when the stream ends.
Generated by gomarkdoc
Edit this page on GitHub
Last updated on