Documentation ¶
Index ¶
- func NewEventHandler(broadcast func(query string, message []byte)) *eventHandler
- type BroadcastClient
- type Client
- type IStreamClient
- type Message
- type Stream
- func (s *Stream) Broadcast(query string, message []byte)
- func (s *Stream) NewConnection(server api.StreamService_SubscribeServer) error
- func (s *Stream) Recv(client *Client, id, query string, b []byte)
- func (s *Stream) Shutdown(_ context.Context) error
- func (s *Stream) Start(_ context.Context) error
- func (s *Stream) Subscribe(command string, f func(IStreamClient, string, []byte))
- func (s *Stream) UnSubscribe(command string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventHandler ¶ added in v0.6.0
Types ¶
type BroadcastClient ¶ added in v0.0.15
BroadcastClient ...
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ...
func NewClient ¶ added in v0.5.2
func NewClient(server api.StreamService_SubscribeServer) *Client
NewClient ...
type IStreamClient ¶ added in v0.1.1
type IStreamClient interface { Send(id string, query string, body []byte) error Notify(t, b string) }
IStreamClient ...
type Message ¶ added in v0.0.9
type Message struct { Id uuid.UUID `json:"id"` Command string `json:"command"` Payload map[string]interface{} `json:"payload"` Forward string `json:"forward"` Status string `json:"status"` Type string `json:"type"` }
Message ...
type Stream ¶ added in v0.5.2
type Stream struct {
// contains filtered or unexported fields
}
Stream ...
func NewStreamService ¶
NewStreamService ...
func (*Stream) NewConnection ¶ added in v0.5.2
func (s *Stream) NewConnection(server api.StreamService_SubscribeServer) error
NewConnection ...
func (*Stream) Subscribe ¶ added in v0.5.2
func (s *Stream) Subscribe(command string, f func(IStreamClient, string, []byte))
Subscribe ...
func (*Stream) UnSubscribe ¶ added in v0.5.2
UnSubscribe ...
Click to show internal directories.
Click to hide internal directories.