Documentation ¶
Index ¶
- Constants
- Variables
- func HasID(id string) retainedMessageFilter
- func HasIDIn(set []string) retainedMessageFilter
- func HasTenant(tenant string) retainedMessageFilter
- func MatchTopicPattern(pattern []byte) retainedMessageFilter
- func NewMemDBStore(mesh types.ServiceLayer) (*memDBStore, error)
- func TenantTopicIndexer() *topicIndexer
- type ByteSliceIndexer
- type Channel
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)
- func (m *Metadata) GetID() string
- func (m *Metadata) GetLastAdded() int64
- func (m *Metadata) GetLastDeleted() int64
- func (m *Metadata) GetPayload() []byte
- func (m *Metadata) GetQos() int32
- func (m *Metadata) GetTenant() string
- func (m *Metadata) GetTopic() []byte
- func (*Metadata) ProtoMessage()
- func (m *Metadata) Reset()
- func (m *Metadata) String() string
- func (m *Metadata) XXX_DiscardUnknown()
- func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Metadata) XXX_Merge(src proto.Message)
- func (m *Metadata) XXX_Size() int
- func (m *Metadata) XXX_Unmarshal(b []byte) error
- type Node
- type RetainedMessage
- type RetainedMessageMetadataList
- func (*RetainedMessageMetadataList) Descriptor() ([]byte, []int)
- func (m *RetainedMessageMetadataList) GetMetadatas() []*Metadata
- func (*RetainedMessageMetadataList) ProtoMessage()
- func (m *RetainedMessageMetadataList) Reset()
- func (m *RetainedMessageMetadataList) String() string
- func (m *RetainedMessageMetadataList) XXX_DiscardUnknown()
- func (m *RetainedMessageMetadataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RetainedMessageMetadataList) XXX_Merge(src proto.Message)
- func (m *RetainedMessageMetadataList) XXX_Size() int
- func (m *RetainedMessageMetadataList) XXX_Unmarshal(b []byte) error
- type RetainedMessageSet
- func (set RetainedMessageSet) Apply(f func(s RetainedMessage))
- func (set RetainedMessageSet) ApplyE(f func(s RetainedMessage) error) error
- func (set RetainedMessageSet) ApplyIdx(f func(idx int, s RetainedMessage))
- func (set RetainedMessageSet) Filter(filters ...retainedMessageFilter) RetainedMessageSet
- type Store
- type Topic
Constants ¶
View Source
const ( RetainedMessageCreated string = "retained_message_created" RetainedMessageDeleted = "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 MatchTopicPattern ¶
func MatchTopicPattern(pattern []byte) retainedMessageFilter
func NewMemDBStore ¶
func NewMemDBStore(mesh types.ServiceLayer) (*memDBStore, error)
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 Metadata ¶ added in v0.0.39
type Metadata struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Tenant string `protobuf:"bytes,2,opt,name=Tenant,proto3" 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,proto3" json:"Qos,omitempty"` LastAdded int64 `protobuf:"varint,6,opt,name=LastAdded,proto3" json:"LastAdded,omitempty"` LastDeleted int64 `protobuf:"varint,7,opt,name=LastDeleted,proto3" json:"LastDeleted,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Metadata) Descriptor ¶ added in v0.0.39
func (*Metadata) GetLastAdded ¶ added in v0.0.39
func (*Metadata) GetLastDeleted ¶ added in v0.0.39
func (*Metadata) GetPayload ¶ added in v0.0.39
func (*Metadata) ProtoMessage ¶ added in v0.0.39
func (*Metadata) ProtoMessage()
func (*Metadata) XXX_DiscardUnknown ¶ added in v0.0.51
func (m *Metadata) XXX_DiscardUnknown()
func (*Metadata) XXX_Marshal ¶ added in v0.0.51
func (*Metadata) XXX_Unmarshal ¶ added in v0.0.51
type Node ¶
type Node struct { Id string Message RetainedMessage Tenant string // contains filtered or unexported fields }
type RetainedMessage ¶
type RetainedMessage struct {
Metadata
}
type RetainedMessageMetadataList ¶ added in v0.0.39
type RetainedMessageMetadataList struct { Metadatas []*Metadata `protobuf:"bytes,1,rep,name=Metadatas,proto3" json:"Metadatas,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RetainedMessageMetadataList) Descriptor ¶ added in v0.0.39
func (*RetainedMessageMetadataList) Descriptor() ([]byte, []int)
func (*RetainedMessageMetadataList) GetMetadatas ¶ added in v0.0.39
func (m *RetainedMessageMetadataList) GetMetadatas() []*Metadata
func (*RetainedMessageMetadataList) ProtoMessage ¶ added in v0.0.39
func (*RetainedMessageMetadataList) ProtoMessage()
func (*RetainedMessageMetadataList) Reset ¶ added in v0.0.39
func (m *RetainedMessageMetadataList) Reset()
func (*RetainedMessageMetadataList) String ¶ added in v0.0.39
func (m *RetainedMessageMetadataList) String() string
func (*RetainedMessageMetadataList) XXX_DiscardUnknown ¶ added in v0.0.51
func (m *RetainedMessageMetadataList) XXX_DiscardUnknown()
func (*RetainedMessageMetadataList) XXX_Marshal ¶ added in v0.0.51
func (m *RetainedMessageMetadataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RetainedMessageMetadataList) XXX_Merge ¶ added in v0.0.51
func (m *RetainedMessageMetadataList) XXX_Merge(src proto.Message)
func (*RetainedMessageMetadataList) XXX_Size ¶ added in v0.0.51
func (m *RetainedMessageMetadataList) XXX_Size() int
func (*RetainedMessageMetadataList) XXX_Unmarshal ¶ added in v0.0.51
func (m *RetainedMessageMetadataList) XXX_Unmarshal(b []byte) error
type RetainedMessageSet ¶ added in v0.0.39
type RetainedMessageSet []RetainedMessage
func (RetainedMessageSet) Apply ¶ added in v0.0.39
func (set RetainedMessageSet) Apply(f func(s RetainedMessage))
func (RetainedMessageSet) ApplyE ¶ added in v0.0.39
func (set RetainedMessageSet) ApplyE(f func(s RetainedMessage) error) error
func (RetainedMessageSet) ApplyIdx ¶ added in v0.0.39
func (set RetainedMessageSet) ApplyIdx(f func(idx int, s RetainedMessage))
func (RetainedMessageSet) Filter ¶ added in v0.0.39
func (set RetainedMessageSet) Filter(filters ...retainedMessageFilter) RetainedMessageSet
type Store ¶
type Store interface { Create(message *Metadata) error ByTopicPattern(tenant string, pattern []byte) (RetainedMessageMetadataList, error) All() (RetainedMessageMetadataList, error) }
Click to show internal directories.
Click to hide internal directories.