Documentation ¶
Index ¶
- Constants
- Variables
- type Channel
- type Logger
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)
- func (m *Metadata) GetClientID() string
- func (m *Metadata) GetClosureReason() string
- func (m *Metadata) GetCreated() int64
- func (m *Metadata) GetID() string
- func (m *Metadata) GetKeepaliveInterval() int32
- func (m *Metadata) GetLastAdded() int64
- func (m *Metadata) GetLastDeleted() int64
- func (m *Metadata) GetPeer() string
- func (m *Metadata) GetRemoteAddress() string
- func (m *Metadata) GetTenant() string
- func (m *Metadata) GetTransport() string
- func (m *Metadata) GetWillPayload() []byte
- func (m *Metadata) GetWillQoS() int32
- func (m *Metadata) GetWillRetain() bool
- func (m *Metadata) GetWillTopic() []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 RemoteTransportProvider
- type Session
- type SessionMetadataList
- func (*SessionMetadataList) Descriptor() ([]byte, []int)
- func (m *SessionMetadataList) GetMetadatas() []*Metadata
- func (*SessionMetadataList) ProtoMessage()
- func (m *SessionMetadataList) Reset()
- func (m *SessionMetadataList) String() string
- func (m *SessionMetadataList) XXX_DiscardUnknown()
- func (m *SessionMetadataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SessionMetadataList) XXX_Merge(src proto.Message)
- func (m *SessionMetadataList) XXX_Size() int
- func (m *SessionMetadataList) XXX_Unmarshal(b []byte) error
- type SessionSet
- type SessionStore
- type Transport
Constants ¶
View Source
const ( SessionCreated string = "session_created" SessionDeleted string = "session_deleted" )
Variables ¶
View Source
var (
ErrSessionNotFound = errors.New("session not found in store")
)
Functions ¶
This section is empty.
Types ¶
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"` Peer string `protobuf:"bytes,3,opt,name=Peer,proto3" json:"Peer,omitempty"` WillTopic []byte `protobuf:"bytes,4,opt,name=WillTopic,proto3" json:"WillTopic,omitempty"` WillQoS int32 `protobuf:"varint,5,opt,name=WillQoS,proto3" json:"WillQoS,omitempty"` WillPayload []byte `protobuf:"bytes,6,opt,name=WillPayload,proto3" json:"WillPayload,omitempty"` WillRetain bool `protobuf:"varint,7,opt,name=WillRetain,proto3" json:"WillRetain,omitempty"` Created int64 `protobuf:"varint,8,opt,name=Created,proto3" json:"Created,omitempty"` ClientID string `protobuf:"bytes,9,opt,name=ClientID,proto3" json:"ClientID,omitempty"` LastAdded int64 `protobuf:"varint,10,opt,name=LastAdded,proto3" json:"LastAdded,omitempty"` LastDeleted int64 `protobuf:"varint,11,opt,name=LastDeleted,proto3" json:"LastDeleted,omitempty"` Transport string `protobuf:"bytes,12,opt,name=Transport,proto3" json:"Transport,omitempty"` RemoteAddress string `protobuf:"bytes,13,opt,name=RemoteAddress,proto3" json:"RemoteAddress,omitempty"` ClosureReason string `protobuf:"bytes,14,opt,name=ClosureReason,proto3" json:"ClosureReason,omitempty"` KeepaliveInterval int32 `protobuf:"varint,15,opt,name=KeepaliveInterval,proto3" json:"KeepaliveInterval,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Metadata) Descriptor ¶ added in v0.0.39
func (*Metadata) GetClientID ¶ added in v0.0.39
func (*Metadata) GetClosureReason ¶ added in v0.0.39
func (*Metadata) GetCreated ¶ added in v0.0.39
func (*Metadata) GetKeepaliveInterval ¶ added in v0.0.39
func (*Metadata) GetLastAdded ¶ added in v0.0.39
func (*Metadata) GetLastDeleted ¶ added in v0.0.39
func (*Metadata) GetRemoteAddress ¶ added in v0.0.39
func (*Metadata) GetTransport ¶ added in v0.0.39
func (*Metadata) GetWillPayload ¶ added in v0.0.39
func (*Metadata) GetWillQoS ¶ added in v0.0.39
func (*Metadata) GetWillRetain ¶ added in v0.0.39
func (*Metadata) GetWillTopic ¶ 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 RemoteTransportProvider ¶ added in v0.0.42
type SessionMetadataList ¶ added in v0.0.39
type SessionMetadataList 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 (*SessionMetadataList) Descriptor ¶ added in v0.0.39
func (*SessionMetadataList) Descriptor() ([]byte, []int)
func (*SessionMetadataList) GetMetadatas ¶ added in v0.0.39
func (m *SessionMetadataList) GetMetadatas() []*Metadata
func (*SessionMetadataList) ProtoMessage ¶ added in v0.0.39
func (*SessionMetadataList) ProtoMessage()
func (*SessionMetadataList) Reset ¶ added in v0.0.39
func (m *SessionMetadataList) Reset()
func (*SessionMetadataList) String ¶ added in v0.0.39
func (m *SessionMetadataList) String() string
func (*SessionMetadataList) XXX_DiscardUnknown ¶ added in v0.0.51
func (m *SessionMetadataList) XXX_DiscardUnknown()
func (*SessionMetadataList) XXX_Marshal ¶ added in v0.0.51
func (m *SessionMetadataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SessionMetadataList) XXX_Merge ¶ added in v0.0.51
func (m *SessionMetadataList) XXX_Merge(src proto.Message)
func (*SessionMetadataList) XXX_Size ¶ added in v0.0.51
func (m *SessionMetadataList) XXX_Size() int
func (*SessionMetadataList) XXX_Unmarshal ¶ added in v0.0.51
func (m *SessionMetadataList) XXX_Unmarshal(b []byte) error
type SessionSet ¶ added in v0.0.39
type SessionSet []Session
func (SessionSet) Apply ¶ added in v0.0.39
func (set SessionSet) Apply(f func(s Session))
func (SessionSet) ApplyE ¶ added in v0.0.39
func (set SessionSet) ApplyE(f func(s Session) error) error
func (SessionSet) ApplyIdx ¶ added in v0.0.39
func (set SessionSet) ApplyIdx(f func(idx int, s Session))
func (SessionSet) Filter ¶ added in v0.0.39
func (set SessionSet) Filter(filters ...sessionFilter) SessionSet
type SessionStore ¶
type SessionStore interface { ByID(id string) (Session, error) ByClientID(id string) (SessionSet, error) ByPeer(peer string) (SessionSet, error) All() (SessionSet, error) Exists(id string) bool Delete(id, reason string) error Upsert(sess Session, Transport Transport) error On(event string, handler func(Session)) func() }
func NewSessionStore ¶
func NewSessionStore(mesh cluster.ServiceLayer, remoteTransportProvider RemoteTransportProvider, logger Logger) (SessionStore, error)
Click to show internal directories.
Click to hide internal directories.