amazon web services – Golang Paho MQTT over Websocket

From the Eclipse Paho GoLang page

The type of connection required is specified by the scheme of the
connection URL set in the ClientOptions struct, for example:

  • tcp:// – connect to on port 1883 using plain TCP
  • ws:// – connect to on port 1883 using WebSockets
  • tls:// – connect to on port 8883 using TLS (ssl:// and tcps:// are
    synonyms for tls://)

The second entry in the list suggests you just pas in the URL with the right schema ( ws:// or probably wss://)

Read more here: Source link