xiotali

package
v1.22.9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultQos = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AmqpClientConfig

type AmqpClientConfig struct {
	AccessKey       string `json:"access_key"`
	AccessSecret    string `json:"access_secret"`
	ConsumerGroupId string `json:"consumer_group_id"`
	ClientId        string `json:"client_id"`
	IotInstanceId   string `json:"iot_instance_id"`
	Host            string `json:"host"`
	MaxDuration     int    `json:"max_duration"`
}

type AmqpManager

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

func NewAmqpManager

func NewAmqpManager(config *AmqpClientConfig, process func(message *amqp.Message), logger *zap.Logger) *AmqpManager

func (*AmqpManager) SetLogger

func (a *AmqpManager) SetLogger(logger *zap.Logger)

func (*AmqpManager) StartReceiveMessage

func (a *AmqpManager) StartReceiveMessage(ctx context.Context) error

type CloudConfig

type CloudConfig struct {
	AccessKey     string `json:"access_key"`
	AccessSecret  string `json:"access_secret"`
	RegionId      string `json:"region_id"`
	IotInstanceId string `json:"iot_instance_id"`
}

func (*CloudConfig) String

func (c *CloudConfig) String() string

func (*CloudConfig) Valid

func (c *CloudConfig) Valid() error

type CloudManager

type CloudManager struct {
	Client *iot.Client
	// contains filtered or unexported fields
}

func NewCloudManager

func NewCloudManager(config *CloudConfig) (*CloudManager, error)

func (*CloudManager) GetIotInstanceId

func (a *CloudManager) GetIotInstanceId() string

Jump to

Keyboard shortcuts

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