Documentation
¶
Index ¶
- Variables
- func CreatePushSocket(url string) (mangos.Socket, error)
- func CreateResponseWRP(msg *wrp.Message) *wrp.Message
- func ParseBus(wrpBusOut chan wrp.Message, dataBusIn chan []byte, stopReading chan struct{}, ...)
- func ReadPump(pullSock mangos.Socket, msgBus chan []byte, logger log.Logger)
- func SendMessage(sock mangos.Socket, msg wrp.Message) error
- func SetupFlagSet(fs *pflag.FlagSet) error
- func WritePump(pushSock mangos.Socket, bus chan wrp.Message, stopWriting chan struct{}, ...)
- type AllowMessage
- type AllowMessageFunc
- type ClientConfig
- type SendMessageHandler
- type SendMessageHandlerFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidPartnerID = errors.New("partner id does not match")
)
Functions ¶
func SendMessage ¶
SendMessage will encode the message as msgpack and send the message. Note this is async. I couldn't find a way to make this synchronous.
func SetupFlagSet ¶
SetupFlagSet sets up some initial helper flags
Types ¶
type AllowMessage ¶
AllowMessage is the interface to block request that come from talaria. If an error is returned, an unauthorized message will be sent with the error payload
type AllowMessageFunc ¶
AllowMessageFunc is the Allow function that a AllowMessage has.
func BlockByPartnerID ¶
func BlockByPartnerID(partnerID string) AllowMessageFunc
BlockByPartnerID is a AllowMessageFunc to block request that don't have the associated device partnerID with the wrp request.
type ClientConfig ¶
type SendMessageHandler ¶
func StartClient ¶
func StartClient(config ClientConfig, lc fx.Lifecycle) (SendMessageHandler, error)
type SendMessageHandlerFunc ¶
func (SendMessageHandlerFunc) SendMessage ¶
Click to show internal directories.
Click to hide internal directories.