Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPError ¶ added in v1.2.0
type HTTPError struct {
StatusCode int
}
HTTPError is the error in a http call
func NewHTTPError ¶ added in v1.2.0
NewHTTPError is the HTTPError ctor
type HttpClient ¶
type HttpClient struct {
HttpServerUrl string
ConfigPath string
Config *viper.Viper
Logger log.FieldLogger
// contains filtered or unexported fields
}
func GetHttpClient ¶
func GetHttpClient(configPath string, l log.FieldLogger) *HttpClient
GetHqttClient creates the hqttclient and returns it
func (*HttpClient) SendMessage ¶
func (mc *HttpClient) SendMessage(ctx context.Context, topic string, payload string, retainBool bool) error
SendMessage sends a message to mqqt using a HTTP POST request
Click to show internal directories.
Click to hide internal directories.