storage

package
v0.0.0-...-ba98209 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue[T any] chan T

func (Queue[T]) Count

func (self Queue[T]) Count() int

func (*Queue[T]) Push

func (self *Queue[T]) Push(item T)

type Topic

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

func NewTopic

func NewTopic() *Topic

func (*Topic) Count

func (self *Topic) Count() int

func (*Topic) MarshalJSON

func (self *Topic) MarshalJSON() ([]byte, error)

func (*Topic) Next

func (self *Topic) Next() (protocol.Connection, bool)

func (*Topic) Publish

func (self *Topic) Publish(packet *protocol.Publish)

func (*Topic) Subscribe

func (self *Topic) Subscribe(conn protocol.Connection)

func (*Topic) UnSubscribe

func (self *Topic) UnSubscribe(id string)

type Topics

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

func New

func New() *Topics

func (*Topics) Count

func (self *Topics) Count() int

func (*Topics) Get

func (self *Topics) Get(key string) (*Topic, bool)

func (*Topics) Keys

func (self *Topics) Keys() []string

func (*Topics) MarshalJSON

func (self *Topics) MarshalJSON() ([]byte, error)

func (*Topics) Publish

func (self *Topics) Publish(key string, packet *protocol.Publish)

func (*Topics) Subscribe

func (self *Topics) Subscribe(key string, conn protocol.Connection)

func (*Topics) UnSubscribe

func (self *Topics) UnSubscribe(key string, id string)

Jump to

Keyboard shortcuts

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