Documentation
¶
Index ¶
- type Option
- func WithGracePeriod(t time.Duration) Option
- func WithHandler(handler mqttserver.Handler) Option
- func WithIdleTimeout(d time.Duration) Option
- func WithListen(s string) Option
- func WithNetwork(s string) Option
- func WithReadTimeout(d time.Duration) Option
- func WithReaderBufferSize(i int) Option
- func WithTLSConfig(cfg *tls.Config) Option
- func WithWriteTimeout(d time.Duration) Option
- func WithWriterBufferSize(i int) Option
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithGracePeriod ¶
func WithHandler ¶
func WithHandler(handler mqttserver.Handler) Option
func WithIdleTimeout ¶
func WithListen ¶
func WithNetwork ¶
func WithReadTimeout ¶
func WithReaderBufferSize ¶
func WithTLSConfig ¶
func WithWriteTimeout ¶
func WithWriterBufferSize ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(logger log.Logger, _ *prometheus.Registry, prober *prober.HTTPProbe, opts ...Option) *Server
New creates a new Server.
func (*Server) ActiveConnections ¶
func (*Server) ListenAndServe ¶
func (*Server) Shutdown ¶
Shutdown gracefully shuts down the server by waiting for specified amount of time (by gracePeriod) for connections to return to idle and then shut down.
func (*Server) TotalConnections ¶
Click to show internal directories.
Click to hide internal directories.