Documentation ¶
Index ¶
- type Collector
- type Connection
- type Logger
- type Store
- func (s Store) ConnectionByUserID(_ context.Context, _ channel.Channel, userID string) common.ConnectionWrapper
- func (s Store) Connections(_ context.Context, _ channel.Channel) []common.ConnectionWrapper
- func (s Store) Receive() string
- func (s Store) UnsubscribeUserID(_ context.Context, _ string, _ string, ch channel.Channel)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct { PrivateConnectionsGauge int32 SubscribedChannelsCount *atomicFloat64 OpenConnectionsCount *atomicFloat64 PrivateConnectionsCount *atomicFloat64 }
func NewCollector ¶
func NewCollector() *Collector
func (*Collector) OpenConnections ¶
func (*Collector) PrivateConnections ¶
func (*Collector) PrivateConnectionsDec ¶
func (c *Collector) PrivateConnectionsDec()
func (*Collector) PrivateConnectionsInc ¶
func (c *Collector) PrivateConnectionsInc()
func (*Collector) SubscribedChannels ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(id string, userID *string, authFunc func() error) *Connection
func (Connection) Authenticate ¶
func (c Connection) Authenticate() error
func (Connection) Close ¶
func (c Connection) Close()
func (Connection) ID ¶
func (c Connection) ID() string
func (Connection) Message ¶
func (c Connection) Message() <-chan []byte
func (Connection) SendMessage ¶
func (c Connection) SendMessage(data []byte) error
func (Connection) UserID ¶
func (c Connection) UserID() *string
func (Connection) WithError ¶
func (c Connection) WithError(err error) Connection
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (Store) ConnectionByUserID ¶
func (Store) Connections ¶
Click to show internal directories.
Click to hide internal directories.