v0.5.5 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2022 License: GPL-3.0 Imports: 8 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type BroadcastClient added in v0.0.15

type BroadcastClient interface {
	Broadcast(query string, message []byte)

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 ...

func (*Client) Broadcast added in v0.5.2

func (c *Client) Broadcast(query string, body []byte) (err error)

Broadcast ...

func (*Client) Close

func (c *Client) Close()

Close ...

func (*Client) Notify

func (c *Client) Notify(t, b string)

Notify ...

func (*Client) Send

func (c *Client) Send(id, query string, body []byte) (err error)

Send ...

func (*Client) WritePump

func (c *Client) WritePump(f func(*Client, string, string, []byte)) (err error)

WritePump ...

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

func NewStreamService(lc fx.Lifecycle) *Stream

NewStreamService ...

func (*Stream) Broadcast added in v0.5.2

func (s *Stream) Broadcast(query string, message []byte)

Broadcast ...

func (*Stream) NewConnection added in v0.5.2

func (s *Stream) NewConnection(server api.StreamService_SubscribeServer) error

NewConnection ...

func (*Stream) Recv added in v0.5.2

func (s *Stream) Recv(client *Client, id, query string, b []byte)

Recv ...

func (*Stream) Shutdown added in v0.5.2

func (s *Stream) Shutdown(cts context.Context) error

Shutdown ...

func (*Stream) Start added in v0.5.2

func (s *Stream) Start(cts context.Context) error

Start ...

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

func (s *Stream) UnSubscribe(command string)

UnSubscribe ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL