Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶ added in v0.3.0
NewContext stores Session in context.Context values. It uses pointer to the session so it can be modified by handler.
Types ¶
type Handler ¶ added in v0.1.8
type Handler interface { // Authorization on client `CONNECT` // Each of the params are passed by reference, so that it can be changed AuthConnect(ctx context.Context) error // Authorization on client `PUBLISH` // Topic is passed by reference, so that it can be modified AuthPublish(ctx context.Context, topic *string, payload *[]byte) error // Authorization on client `SUBSCRIBE` // Topics are passed by reference, so that they can be modified AuthSubscribe(ctx context.Context, topics *[]string) error // After client successfully connected Connect(ctx context.Context) // After client successfully published Publish(ctx context.Context, topic *string, payload *[]byte) // After client successfully subscribed Subscribe(ctx context.Context, topics *[]string) // After client unsubscribed Unsubscribe(ctx context.Context, topics *[]string) // Disconnect on connection with client lost Disconnect(ctx context.Context) }
Handler is an interface for mProxy hooks
Click to show internal directories.
Click to hide internal directories.