Documentation ¶
Overview ¶
Package sessions is a generated protocol buffer package.
It is generated from these files:
types.proto
It has these top-level messages:
Metadata SessionMetadataList
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
- type RemoteTransportProvider
- type Session
- type SessionMetadataList
- 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")
)
Functions ¶
This section is empty.
Types ¶
type Metadata ¶ added in v0.0.39
type Metadata struct { ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` Tenant string `protobuf:"bytes,2,opt,name=Tenant" json:"Tenant,omitempty"` Peer string `protobuf:"bytes,3,opt,name=Peer" json:"Peer,omitempty"` WillTopic []byte `protobuf:"bytes,4,opt,name=WillTopic,proto3" json:"WillTopic,omitempty"` WillQoS int32 `protobuf:"varint,5,opt,name=WillQoS" json:"WillQoS,omitempty"` WillPayload []byte `protobuf:"bytes,6,opt,name=WillPayload,proto3" json:"WillPayload,omitempty"` WillRetain bool `protobuf:"varint,7,opt,name=WillRetain" json:"WillRetain,omitempty"` Created int64 `protobuf:"varint,8,opt,name=Created" json:"Created,omitempty"` ClientID string `protobuf:"bytes,9,opt,name=ClientID" json:"ClientID,omitempty"` LastAdded int64 `protobuf:"varint,10,opt,name=LastAdded" json:"LastAdded,omitempty"` LastDeleted int64 `protobuf:"varint,11,opt,name=LastDeleted" json:"LastDeleted,omitempty"` Transport string `protobuf:"bytes,12,opt,name=Transport" json:"Transport,omitempty"` RemoteAddress string `protobuf:"bytes,13,opt,name=RemoteAddress" json:"RemoteAddress,omitempty"` ClosureReason string `protobuf:"bytes,14,opt,name=ClosureReason" json:"ClosureReason,omitempty"` KeepaliveInterval int32 `protobuf:"varint,15,opt,name=KeepaliveInterval" json:"KeepaliveInterval,omitempty"` }
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()
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" json:"Metadatas,omitempty"`
}
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
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.Mesh, remoteTransportProvider RemoteTransportProvider, logger Logger) (SessionStore, error)
Click to show internal directories.
Click to hide internal directories.