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 ¶
func NewCloudManager ¶
func NewCloudManager(config *CloudConfig) (*CloudManager, error)
func (*CloudManager) GetIotInstanceId ¶
func (a *CloudManager) GetIotInstanceId() string
Click to show internal directories.
Click to hide internal directories.