Documentation ¶
Index ¶
- Constants
- Variables
- func SendLoop[T any](ctx context.Context, s *Sender, dataCh <-chan T, ...) error
- func SendLoopWithErr[T any](ctx context.Context, s *Sender, dataCh <-chan T, errCh <-chan error, ...) error
- type Buffered
- type Message
- type Parser
- type ReceiveDataEvent
- type Receiver
- type ResponseWriter
- type Sender
Constants ¶
View Source
const ( EventMessage = "message" EventError = "error" )
Variables ¶
View Source
var CloseMessage = &Message{Data: io.EOF.Error(), Event: EventError}
Functions ¶
Types ¶
type ReceiveDataEvent ¶
type ReceiveDataEvent string
type Receiver ¶
type Receiver[T any] struct { // contains filtered or unexported fields }
func NewReceiver ¶
type ResponseWriter ¶
type ResponseWriter interface { http.ResponseWriter http.Flusher }
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
func (*Sender) SendComment ¶
func (*Sender) WaitForClose ¶
func (s *Sender) WaitForClose() <-chan struct{}
Click to show internal directories.
Click to hide internal directories.