subscriptions

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MWC is the multi-level wildcard
	MWC = "#"

	// SWC is the single level wildcard
	SWC = "+"
)

Variables

View Source
var (
	ErrSubscriptionNotFound = errors.New("Subscription not found")
)

Functions

This section is empty.

Types

type Node

type Node struct {
	Recipients           []string         `protobuf:"bytes,1,rep,name=Recipients,proto3" json:"Recipients,omitempty"`
	Qos                  []int32          `protobuf:"varint,2,rep,packed,name=Qos,proto3" json:"Qos,omitempty"`
	Children             map[string]*Node `` /* 157-byte string literal not displayed */
	Peer                 []uint64         `protobuf:"varint,4,rep,packed,name=Peer,proto3" json:"Peer,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Node) Descriptor

func (*Node) Descriptor() ([]byte, []int)

func (*Node) GetChildren

func (m *Node) GetChildren() map[string]*Node

func (*Node) GetPeer

func (m *Node) GetPeer() []uint64

func (*Node) GetQos

func (m *Node) GetQos() []int32

func (*Node) GetRecipients

func (m *Node) GetRecipients() []string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) String

func (m *Node) String() string

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

type Tree

type Tree interface {
	Insert(peer uint64, pattern []byte, qos int32, sub string) error
	Remove(pattern []byte, sub string) error
	Match(topic []byte, peers *[]uint64, subs *[]string, qoss *[]int32) error
	List(topics *[][]byte, peers *[]uint64, subs *[]string, qoss *[]int32) error
	RemovePeer(peer uint64) int
	RemoveSession(id string) int
	Dump() ([]byte, error)
	Load([]byte) error
	Count() int
}

func NewTree

func NewTree() Tree

Jump to

Keyboard shortcuts

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