-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pass context to Presigner * Update at-wat/mqtt-go to v0.14.0 * Add migration guide
- Loading branch information
Showing
16 changed files
with
329 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Migration guide | ||
|
||
## v6 | ||
|
||
- aws/aws-sdk-go is updated to aws/aws-sdk-go-v2 | ||
- 🔄Update presign dialer constructor argument: | ||
```diff | ||
-sess, err := session.NewSession() | ||
+cfg, err := config.LoadDefaultConfig(ctx) | ||
if err != nil { | ||
// error handling | ||
} | ||
-dialer, err := awsiotdev.NewPresignDialer(sess, endpoint) | ||
+dialer, err := awsiotdev.NewPresignDialer(cfg, endpoint) | ||
``` | ||
- 🔄If you want to use aws/aws-sdk-go (v1), with aws-iot-device-sdk-go v6: | ||
```go | ||
import ( | ||
"github.com/at-wat/mqtt-go" | ||
"github.com/aws/aws-sdk-go/aws/session" | ||
|
||
awsiotdev_v5 "github.com/seqsense/aws-iot-device-sdk-go/v5" | ||
awsiotdev "github.com/seqsense/aws-iot-device-sdk-go/v6" | ||
) | ||
|
||
sess := session.Must(session.NewSession()) | ||
dialer, err := awsiotdev_v5.NewPresignDialer(sess, endpoint) | ||
if err != nil { | ||
// error handling | ||
} | ||
|
||
d, err := awsiotdev.New(thingName, &mqtt.NoContextDialer{dialer}) | ||
``` | ||
- at-wat/mqtt-go is updated to v0.14 | ||
- 🔄See https://github.com/at-wat/mqtt-go/blob/master/MIGRATION.md#v0140 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.