memory

package
Version: v0.0.0-...-12a54d8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientRegister

type ClientRegister struct {
	// contains filtered or unexported fields
}

func NewClientRegister

func NewClientRegister() *ClientRegister

func (*ClientRegister) AddClient

func (cr *ClientRegister) AddClient(client *protocol.Client)

func (*ClientRegister) AddSubscription

func (cr *ClientRegister) AddSubscription(client *protocol.Client, patterns []string)

func (*ClientRegister) GetClient

func (cr *ClientRegister) GetClient(clientId uint32) *protocol.Client

func (*ClientRegister) Publish

func (cr *ClientRegister) Publish(msg protocol.Message)

func (*ClientRegister) Reap

func (*ClientRegister) RemoveSubscription

func (cr *ClientRegister) RemoveSubscription(client *protocol.Client, patterns []string)

type ClientRegisterCounters

type ClientRegisterCounters struct {
	TotalFailed              uint64
	TotalSent                uint64
	Clients                  uint
	SubscriberByPatternCount uint64
}

type SubscriptionRegister

type SubscriptionRegister struct {
	SubscriberByPatternCount *atomic.Uint64
	// contains filtered or unexported fields
}

func NewSubscriptionRegister

func NewSubscriptionRegister() *SubscriptionRegister

func (*SubscriptionRegister) AddSubscription

func (sr *SubscriptionRegister) AddSubscription(subscriber interface{}, patterns []string)

func (*SubscriptionRegister) GetSubscribers

func (sr *SubscriptionRegister) GetSubscribers(patterns []string) []interface{}

func (*SubscriptionRegister) RemoveSubscription

func (sr *SubscriptionRegister) RemoveSubscription(subscriber interface{}, patterns []string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to