Documentation ¶
Index ¶
- func NewEventStream(gctx global.Context, r *http.Request) (client.Connection, error)
- func SetEventStreamHeaders(w http.ResponseWriter)
- type EventStream
- func (*EventStream) Actor() *structures.User
- func (es *EventStream) Buffer() client.EventBuffer
- func (es *EventStream) Cache() client.Cache
- func (es *EventStream) Context() context.Context
- func (es *EventStream) Destroy()
- func (es *EventStream) Events() *client.EventMap
- func (es *EventStream) Greet(gctx global.Context) error
- func (es *EventStream) Handler() client.Handler
- func (es *EventStream) OnClose() <-chan struct{}
- func (es *EventStream) OnReady() <-chan struct{}
- func (es *EventStream) Read(gctx global.Context)
- func (es *EventStream) SendAck(cmd events.Opcode, data json.RawMessage) error
- func (es *EventStream) SendClose(code events.CloseCode, after time.Duration)
- func (es *EventStream) SendError(txt string, fields map[string]any)
- func (es *EventStream) SendHeartbeat() error
- func (es *EventStream) SessionID() string
- func (es *EventStream) SetReady()
- func (es *EventStream) SetWriter(w *bufio.Writer, f http.Flusher)
- func (es *EventStream) Transport() client.Transport
- func (es *EventStream) Write(msg events.Message[json.RawMessage]) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventStream ¶
func SetEventStreamHeaders ¶
func SetEventStreamHeaders(w http.ResponseWriter)
Types ¶
type EventStream ¶
type EventStream struct {
// contains filtered or unexported fields
}
func (*EventStream) Actor ¶
func (*EventStream) Actor() *structures.User
func (*EventStream) Buffer ¶
func (es *EventStream) Buffer() client.EventBuffer
Buffer implements client.Connection
func (*EventStream) Cache ¶
func (es *EventStream) Cache() client.Cache
func (*EventStream) Context ¶
func (es *EventStream) Context() context.Context
Context implements Connection
func (*EventStream) Destroy ¶
func (es *EventStream) Destroy()
func (*EventStream) Events ¶
func (es *EventStream) Events() *client.EventMap
func (*EventStream) Handler ¶
func (es *EventStream) Handler() client.Handler
Handler implements client.Connection
func (*EventStream) OnClose ¶
func (es *EventStream) OnClose() <-chan struct{}
Ready implements client.Connection
func (*EventStream) OnReady ¶
func (es *EventStream) OnReady() <-chan struct{}
Ready implements client.Connection
func (*EventStream) Read ¶
func (es *EventStream) Read(gctx global.Context)
func (*EventStream) SendAck ¶
func (es *EventStream) SendAck(cmd events.Opcode, data json.RawMessage) error
SendAck implements client.Connection
func (*EventStream) SendClose ¶
func (es *EventStream) SendClose(code events.CloseCode, after time.Duration)
func (*EventStream) SendHeartbeat ¶
func (es *EventStream) SendHeartbeat() error
func (*EventStream) SessionID ¶
func (es *EventStream) SessionID() string
func (*EventStream) SetReady ¶
func (es *EventStream) SetReady()
func (*EventStream) SetWriter ¶
func (es *EventStream) SetWriter(w *bufio.Writer, f http.Flusher)
SetWriter implements Connection
func (*EventStream) Transport ¶
func (es *EventStream) Transport() client.Transport
func (*EventStream) Write ¶
func (es *EventStream) Write(msg events.Message[json.RawMessage]) error
Click to show internal directories.
Click to hide internal directories.