awsiot

package module
v0.0.0-...-bab325d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 5 Imported by: 0

README

awsiot

AWS-IOT Client handler - Go Package

Documentation

Index

Constants

View Source
const MAX_TOPIC_REGISTER = 500

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsIotClient

type AwsIotClient struct {
	// contains filtered or unexported fields
}

func NewAwsIotClient

func NewAwsIotClient(cfg AwsIotConfig) *AwsIotClient

func (*AwsIotClient) DisconnectAwsIot

func (c *AwsIotClient) DisconnectAwsIot()

func (*AwsIotClient) PublishTopic

func (c *AwsIotClient) PublishTopic(tn string, payload string)

func (*AwsIotClient) RegisterTopic

func (c *AwsIotClient) RegisterTopic(tn string, tt MqttType, cb AwsIotMsgHandler)

type AwsIotConfig

type AwsIotConfig struct {
	DeviceCert string //Device Cert Path
	DeviceKey  string //Device Key Path
	DeviceId   string
	AwsUrl     string
}

type AwsIotMsgHandler

type AwsIotMsgHandler func(string)

type MqttType

type MqttType int
const (
	PUBLISH MqttType = iota + 1
	SUBSCRIBE
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL