Documentation
¶
Index ¶
- Constants
- func RegisterEncoding(typ uint8, encoder Encoder, decoder Decoder)
- type Auth
- type Client
- type Connect
- type ConnectAck
- type Decoder
- type Disconnect
- type Encoder
- type Incoming
- type Map
- func (c *Map[K, V]) Clear()
- func (c *Map[K, V]) Delete(key K)
- func (c *Map[K, V]) DeleteDirectly(key K)
- func (c *Map[K, V]) Len() int
- func (c *Map[K, V]) Load(key K) *V
- func (c *Map[K, V]) LoadAndDelete(key K) *V
- func (c *Map[K, V]) LoadAndStore(key K, value *V) *V
- func (c *Map[K, V]) Map() map[K]*V
- func (c *Map[K, V]) Range(iterator func(key K, item *V) bool)
- func (c *Map[K, V]) Store(key K, value *V)
- type Message
- type Pack
- type Pico
- type Publish
- type PublishAck
- type Server
- type Stream
- type Subscribe
- type SubscribeAck
- type Unsubscribe
- type UnsubscribeAck
Constants ¶
View Source
const ( Magic = "pico" MagicSize = len(Magic) HeaderSize = 10 BufferSize = 1024 )
View Source
const ( DISCONNECT uint8 = iota CONNECT CONNECT_ACK PING PONG REQUEST RESPONSE STREAM STREAM_END PUBLISH PUBLISH_ACK SUBSCRIBE SUBSCRIBE_ACK UNSUBSCRIBE UNSUBSCRIBE_ACK )
View Source
const ( BINARY uint8 = iota JSON XML YAML MSGPACK )
Variables ¶
This section is empty.
Functions ¶
func RegisterEncoding ¶
Types ¶
type ConnectAck ¶
type Disconnect ¶
type Disconnect struct {
Reason string `json:"reason,omitempty"`
}
type Incoming ¶
type Incoming struct {
Pico
// contains filtered or unexported fields
}
func (*Incoming) Disconnect ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Map[K, V]) DeleteDirectly ¶
func (c *Map[K, V]) DeleteDirectly(key K)
func (*Map[K, V]) LoadAndDelete ¶
func (c *Map[K, V]) LoadAndDelete(key K) *V
func (*Map[K, V]) LoadAndStore ¶
func (c *Map[K, V]) LoadAndStore(key K, value *V) *V
type Pico ¶
type Pico struct {
// contains filtered or unexported fields
}
func (*Pico) AttachHandler ¶
type PublishAck ¶
type SubscribeAck ¶
type Unsubscribe ¶
type Unsubscribe struct {
Filters []string `json:"filters"`
}
type UnsubscribeAck ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.