Documentation ¶
Index ¶
- Constants
- Variables
- func RunInSSEWSContext(ctx *dvcontext.RequestContext, parallelMode int)
- func SSEMessageBytes(ctx *dvcontext.RequestContext, id []byte, event []byte, data []byte)
- func SSEMessageInterface(ctx *dvcontext.RequestContext, v interface{})
- func SSEMessageString(ctx *dvcontext.RequestContext, s string)
- func SSESendHeartBeat(ctx *dvcontext.RequestContext)
- func SSESendPortion(ctx *dvcontext.RequestContext, data []byte)
- func SetParallelProcessingParameters(params *dvcontext.ParallelProcessing)
- func SetTimeUnitInSeconds(unitTime float32)
Constants ¶
View Source
const ( REQUEST_SSE_COUNTER = "REQUEST_SSE_COUNTER" REQUEST_SSE_INDEX = "REQUEST_SSE_INDEX" REQUEST_SSE_EVENT = "REQUEST_SSE_EVENT" )
Variables ¶
View Source
var ( SSELineEnd = []byte("\n") SSELineFullEnd = []byte("\n\n") SSEIdPrefix = []byte("id: ") SSEHeartBeat = []byte(": heartbeat\n\n") SSEEventPrefix = []byte("event: ") SSEEventDefault = []byte("message") SSEDataPrefix = []byte("data: ") )
View Source
var SseHeaders = map[string]string{
"Access-Control-Allow-Origin": "*",
"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Transfer-Encoding": "chunked",
}
Functions ¶
func RunInSSEWSContext ¶
func RunInSSEWSContext(ctx *dvcontext.RequestContext, parallelMode int)
func SSEMessageBytes ¶
func SSEMessageBytes(ctx *dvcontext.RequestContext, id []byte, event []byte, data []byte)
func SSEMessageInterface ¶
func SSEMessageInterface(ctx *dvcontext.RequestContext, v interface{})
func SSEMessageString ¶
func SSEMessageString(ctx *dvcontext.RequestContext, s string)
func SSESendHeartBeat ¶
func SSESendHeartBeat(ctx *dvcontext.RequestContext)
func SSESendPortion ¶
func SSESendPortion(ctx *dvcontext.RequestContext, data []byte)
func SetParallelProcessingParameters ¶
func SetParallelProcessingParameters(params *dvcontext.ParallelProcessing)
func SetTimeUnitInSeconds ¶
func SetTimeUnitInSeconds(unitTime float32)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.