Documentation
¶
Index ¶
- Variables
- func EncodeSessionToken(signKey string, tenant string, id string) (string, error)
- type Broker
- func (b *Broker) Authenticate(transport transport.Metadata, sessionID []byte, username string, ...) (tenant string, err error)
- func (b *Broker) CloseSession(ctx context.Context, token string) error
- func (b *Broker) Connect(ctx context.Context, metadata transport.Metadata, p *packet.Connect) (string, string, *packet.ConnAck, error)
- func (b *Broker) Disconnect(ctx context.Context, token string, p *packet.Disconnect) error
- func (b *Broker) Health() string
- func (b *Broker) JoinServiceLayer(name string, logger *zap.Logger, config cluster.ServiceConfig, ...)
- func (b *Broker) PingReq(ctx context.Context, id string, _ *packet.PingReq) (*packet.PingResp, error)
- func (b *Broker) Publish(ctx context.Context, token string, p *packet.Publish) (*packet.PubAck, error)
- func (b *Broker) Serve(port int) net.Listener
- func (b *Broker) Shutdown()
- func (b *Broker) SigningKey() string
- func (b *Broker) Subscribe(ctx context.Context, token string, p *packet.Subscribe) (*packet.SubAck, error)
- func (b *Broker) Unsubscribe(ctx context.Context, token string, p *packet.Unsubscribe) (*packet.UnsubAck, error)
- type Config
- type MessagesStore
- type QueuesStore
- type SessionConfig
- type SessionStore
- type Token
- type TopicStore
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAuthenticationFailed = errors.New("authentication failed")
)
Functions ¶
Types ¶
type Broker ¶
type Broker struct { ID string Sessions SessionStore Queues QueuesStore Messages *messages.Client // contains filtered or unexported fields }
func (*Broker) Authenticate ¶
func (*Broker) CloseSession ¶ added in v0.0.32
func (*Broker) Disconnect ¶ added in v0.0.51
func (*Broker) JoinServiceLayer ¶ added in v0.0.52
func (b *Broker) JoinServiceLayer(name string, logger *zap.Logger, config cluster.ServiceConfig, rpcConfig cluster.ServiceConfig, mesh cluster.DiscoveryLayer)
func (*Broker) SigningKey ¶ added in v0.0.64
type Config ¶
type Config struct { AuthHelper func(transport transport.Metadata, sessionID []byte, username string, password string) (tenant string, err error) Session SessionConfig }
func DefaultConfig ¶
func DefaultConfig() Config
type MessagesStore ¶ added in v0.0.71
type QueuesStore ¶ added in v0.0.69
type SessionConfig ¶ added in v0.0.9
type SessionConfig struct {
MaxInflightSize int
}
type SessionStore ¶
type Token ¶ added in v0.0.64
type TopicStore ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.