Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSessionDisconnected = errors.New("session disconnected")
)
Functions ¶
Types ¶
type Handler ¶
type Handler interface { Authenticate(transport Transport, sessionID, username string, password string) (tenant string, id string, err error) OnConnect(id, tenant string, sess *Session, transport string) OnSubscribe(id string, tenant string, packet *packet.Subscribe) error OnUnsubscribe(id string, tenant string, packet *packet.Unsubscribe) error OnSessionClosed(id, tenant string) OnSessionLost(id, tenant string) OnPublish(id, tenant string, packet *packet.Publish) error }
type TimeoutReadWriteCloser ¶
type TimeoutReadWriteCloser interface { SetDeadline(time.Time) error io.ReadWriteCloser }
type Transport ¶
type Transport interface { io.Closer Name() string Encrypted() bool EncryptionState() *tls.ConnectionState Channel() TimeoutReadWriteCloser RemoteAddress() string }
Click to show internal directories.
Click to hide internal directories.