Versions in this module Expand all Collapse all v0 v0.2.3 Sep 1, 2021 v0.2.2 Sep 1, 2021 Changes in this version + const StatusDeviceDisconnected + const StatusDeviceTimeout + func CreateErrorWRP(transaction string, dest string, src string, statusCode int64, err error) *wrp.Message + func NewDecoderSender(sender registryHandler, maxWorkers int, queueSize int, logger log.Logger) *decoderQueue + func NewDownstreamSender(senderFunc sendWRPFunc, maxWorkers int, queueSize int, logger log.Logger) *downstreamSenderQueue + func NewEncoderSender(sender outboundSender, maxWorkers int, queueSize int, logger log.Logger) *encoderQueue + func NewHandlerRegistry(config []HandlerConfig) (*handlerRegistry, error) + func NewRegistryHandler(senderFunc sendWRPFunc, registry HandlerRegistry, ...) *registryQueue + func NewSender(connection websocketConnection, maxWorkers int, queueSize int, ...) *senderQueue + type Client interface + Close func() error + HandlerRegistry func() HandlerRegistry + Hostname func() string + Send func(message *wrp.Message) + func NewClient(config ClientConfig) (Client, error) + type ClientConfig struct + ClientLogger log.Logger + DestinationURL string + DeviceName string + FirmwareName string + HandleMsgQueue QueueConfig + HandlePingMiss HandlePingMiss + HandlerRegistryQueue QueueConfig + Handlers []HandlerConfig + Manufacturer string + ModelName string + OutboundQueue QueueConfig + PingConfig PingConfig + TlsConfig *tls.Config + Token string + WRPDecoderQueue QueueConfig + WRPEncoderQueue QueueConfig + type DownstreamHandler interface + Close func() + HandleMessage func(msg *wrp.Message) *wrp.Message + type ErrInvalidHandler interface + ErrInvalidHandler func() + type ErrNoDownstreamHandler interface + ErrNoDownstreamHandler func() + type HandlePingMiss func() error + type HandlerConfig struct + Handler DownstreamHandler + Regexp string + type HandlerGroup struct + type HandlerRegistry interface + Add func(string, DownstreamHandler) error + Close func() + GetHandler func(string) (DownstreamHandler, error) + Remove func(string) + type Message struct + Body string + Code int + func (msg Message) String() string + type MessageBodyer interface + MessageBody func() string + type PingConfig struct + MaxPingMiss int + PingWait time.Duration + type QueueConfig struct + MaxWorkers int + Size int + type StatusCoder interface + StatusCode func() int