Documentation ¶
Overview ¶
* Copyright (C) 2022 Marian Micek * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright (C) 2022 Marian Micek * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright (C) 2022 Marian Micek * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- func ScheduleTask(duration int, callback func())
- type Broker
- type Config
- type Plugin
- type Server
- func (server *Server) Connect(ssl bool, host string, port int, clientid string, username string, ...)
- func (server *Server) Disconnect()
- func (server *Server) Log() *logger.Logger
- func (server *Server) Publish(topic string, value string) bool
- func (server *Server) Subscribe(topic string, callback paho.MessageHandler) bool
- type System
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScheduleTask ¶
func ScheduleTask(duration int, callback func())
Types ¶
type Broker ¶
type Broker struct { Host string `json:"host"` // mqtt server host Port int `json:"port"` // mqtt server port Ssl bool `json:"ssl"` // use secure connection User string `json:"username"` // server username Password string `json:"password"` // server password Client string `json:"client"` // client id to present to server }
type Config ¶
type Plugin ¶
type Plugin struct { Plugin string `json:"plugin"` Config json.RawMessage `json:"config"` }