Documentation ¶
Overview ¶
Package topics is a generated protocol buffer package.
It is generated from these files:
types.proto
It has these top-level messages:
RetainedMessage RetainedMessageList
Index ¶
- Constants
- Variables
- func HasID(id string) retainedMessageFilter
- func HasIDIn(set []string) retainedMessageFilter
- func HasTenant(tenant string) retainedMessageFilter
- func IsOutdated(s *RetainedMessage, remote *RetainedMessage) (outdated bool)
- func MakeTopicID(tenant string, topic []byte) (string, error)
- func MatchTopicPattern(pattern []byte) retainedMessageFilter
- func NewMemDBStore(router Router) (*memDBStore, error)
- func TenantTopicIndexer() *topicIndexer
- type ByteSliceIndexer
- type Node
- type RetainedMessage
- func (*RetainedMessage) Descriptor() ([]byte, []int)
- func (m *RetainedMessage) GetID() string
- func (m *RetainedMessage) GetLastAdded() int64
- func (m *RetainedMessage) GetLastDeleted() int64
- func (m *RetainedMessage) GetPayload() []byte
- func (m *RetainedMessage) GetQos() int32
- func (m *RetainedMessage) GetTenant() string
- func (m *RetainedMessage) GetTopic() []byte
- func (s *RetainedMessage) IsAdded() bool
- func (s *RetainedMessage) IsRemoved() bool
- func (*RetainedMessage) ProtoMessage()
- func (m *RetainedMessage) Reset()
- func (m *RetainedMessage) String() string
- type RetainedMessageList
- func (e *RetainedMessageList) Append(entry state.Entry)
- func (set RetainedMessageList) Apply(f func(s *RetainedMessage))
- func (set RetainedMessageList) ApplyE(f func(s *RetainedMessage) error) error
- func (set RetainedMessageList) ApplyIdx(f func(idx int, s *RetainedMessage))
- func (e *RetainedMessageList) AtIndex(idx int) state.Entry
- func (*RetainedMessageList) Descriptor() ([]byte, []int)
- func (set RetainedMessageList) Filter(filters ...retainedMessageFilter) RetainedMessageList
- func (m *RetainedMessageList) GetRetainedMessages() []*RetainedMessage
- func (e *RetainedMessageList) Length() int
- func (e *RetainedMessageList) New() state.EntrySet
- func (*RetainedMessageList) ProtoMessage()
- func (e *RetainedMessageList) Range(f func(idx int, entry state.Entry))
- func (m *RetainedMessageList) Reset()
- func (e *RetainedMessageList) Set(idx int, entry state.Entry)
- func (m *RetainedMessageList) String() string
- type Router
- type Store
- type Topic
Constants ¶
View Source
const ( RetainedMessageCreated string = "retained_message_created" RetainedMessageDeleted string = "retained_message_deleted" )
Variables ¶
View Source
var (
ErrNodeNotFound = fmt.Errorf("node not found")
)
View Source
var (
ErrRetainedMessageNotFound = errors.New("retained message not found")
)
View Source
var (
SEP = byte('/')
)
Functions ¶
func IsOutdated ¶
func IsOutdated(s *RetainedMessage, remote *RetainedMessage) (outdated bool)
func MatchTopicPattern ¶
func MatchTopicPattern(pattern []byte) retainedMessageFilter
func NewMemDBStore ¶
func TenantTopicIndexer ¶
func TenantTopicIndexer() *topicIndexer
Types ¶
type ByteSliceIndexer ¶
type ByteSliceIndexer struct {
// contains filtered or unexported fields
}
func (*ByteSliceIndexer) FromArgs ¶
func (b *ByteSliceIndexer) FromArgs(opts ...interface{}) ([]byte, error)
func (*ByteSliceIndexer) FromObject ¶
func (b *ByteSliceIndexer) FromObject(obj interface{}) (bool, []byte, error)
type Node ¶
type Node struct { Id string Message *RetainedMessage Tenant string // contains filtered or unexported fields }
type RetainedMessage ¶
type RetainedMessage struct { ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` Tenant string `protobuf:"bytes,2,opt,name=Tenant" json:"Tenant,omitempty"` Topic []byte `protobuf:"bytes,3,opt,name=Topic,proto3" json:"Topic,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` Qos int32 `protobuf:"varint,5,opt,name=Qos" json:"Qos,omitempty"` LastAdded int64 `protobuf:"varint,6,opt,name=LastAdded" json:"LastAdded,omitempty"` LastDeleted int64 `protobuf:"varint,7,opt,name=LastDeleted" json:"LastDeleted,omitempty"` }
func (*RetainedMessage) Descriptor ¶
func (*RetainedMessage) Descriptor() ([]byte, []int)
func (*RetainedMessage) GetID ¶
func (m *RetainedMessage) GetID() string
func (*RetainedMessage) GetLastAdded ¶
func (m *RetainedMessage) GetLastAdded() int64
func (*RetainedMessage) GetLastDeleted ¶
func (m *RetainedMessage) GetLastDeleted() int64
func (*RetainedMessage) GetPayload ¶
func (m *RetainedMessage) GetPayload() []byte
func (*RetainedMessage) GetQos ¶
func (m *RetainedMessage) GetQos() int32
func (*RetainedMessage) GetTenant ¶
func (m *RetainedMessage) GetTenant() string
func (*RetainedMessage) GetTopic ¶
func (m *RetainedMessage) GetTopic() []byte
func (*RetainedMessage) IsAdded ¶
func (s *RetainedMessage) IsAdded() bool
func (*RetainedMessage) IsRemoved ¶
func (s *RetainedMessage) IsRemoved() bool
func (*RetainedMessage) ProtoMessage ¶
func (*RetainedMessage) ProtoMessage()
func (*RetainedMessage) Reset ¶
func (m *RetainedMessage) Reset()
func (*RetainedMessage) String ¶
func (m *RetainedMessage) String() string
type RetainedMessageList ¶
type RetainedMessageList struct {
RetainedMessages []*RetainedMessage `protobuf:"bytes,1,rep,name=RetainedMessages" json:"RetainedMessages,omitempty"`
}
func (*RetainedMessageList) Append ¶
func (e *RetainedMessageList) Append(entry state.Entry)
func (RetainedMessageList) Apply ¶
func (set RetainedMessageList) Apply(f func(s *RetainedMessage))
func (RetainedMessageList) ApplyE ¶
func (set RetainedMessageList) ApplyE(f func(s *RetainedMessage) error) error
func (RetainedMessageList) ApplyIdx ¶
func (set RetainedMessageList) ApplyIdx(f func(idx int, s *RetainedMessage))
func (*RetainedMessageList) Descriptor ¶
func (*RetainedMessageList) Descriptor() ([]byte, []int)
func (RetainedMessageList) Filter ¶
func (set RetainedMessageList) Filter(filters ...retainedMessageFilter) RetainedMessageList
func (*RetainedMessageList) GetRetainedMessages ¶
func (m *RetainedMessageList) GetRetainedMessages() []*RetainedMessage
func (*RetainedMessageList) Length ¶
func (e *RetainedMessageList) Length() int
func (*RetainedMessageList) New ¶
func (e *RetainedMessageList) New() state.EntrySet
func (*RetainedMessageList) ProtoMessage ¶
func (*RetainedMessageList) ProtoMessage()
func (*RetainedMessageList) Range ¶
func (e *RetainedMessageList) Range(f func(idx int, entry state.Entry))
func (*RetainedMessageList) Reset ¶
func (m *RetainedMessageList) Reset()
func (*RetainedMessageList) String ¶
func (m *RetainedMessageList) String() string
type Store ¶
type Store interface { Create(message *RetainedMessage) error ByTopicPattern(tenant string, pattern []byte) (RetainedMessageList, error) All() (RetainedMessageList, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.