{"action":"created","comment":{"url":"https://api.github.com/repos/voiapp/pubsub/pulls/comments/285878811","pull_request_review_id":239858666,"id":285878811,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4NTg3ODgxMQ==","diff_hunk":"@@ -0,0 +1,114 @@\n+package mqtt\n+\n+import (\n+\t\"fmt\"\n+\t\"time\"\n+\n+\tmqtt \"github.com/eclipse/paho.mqtt.golang\"\n+\tps \"github.com/voiapp/pubsub\"\n+)\n+\n+const (\n+\tpingTimeout       = 1 * time.Second\n+\tkeepAliveTimeout  = 6 * time.Second\n+\tsendTimeout       = 5 * time.Second\n+\tterminationGrace  = 5 * time.Second\n+\treconnectInterval = 1 * time.Second\n+\n+\t// qosFireAndForget = 0\n+\t// qosAtLeastOnce   = 1\n+\tqosExactlyOnce = 2\n+)\n+\n+var (\n+\tErrConnectTimeout     = fmt.Errorf(\"MQTT/CONNECT timed out\")\n+\tErrSubscribeTimeout   = fmt.Errorf(\"MQTT/SUBSCRIBE timed out\")\n+\tErrUnsubscribeTimeout = fmt.Errorf(\"MQTT/UNSUBSCRIBE timed out\")\n+\tErrPublishTimeout     = fmt.Errorf(\"MQTT/PUBLISH timed out\")\n+)","path":"pkg/mqtt/mqtt.go","position":28,"original_position":28,"commit_id":"f74d480577696f65221da014feecbde3d5042134","original_commit_id":"f74d480577696f65221da014feecbde3d5042134","user":{"login":"Maydell","id":3543718,"node_id":"MDQ6VXNlcjM1NDM3MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3543718?v=4","gravatar_id":"","url":"https://api.github.com/users/Maydell","html_url":"https://github.com/Maydell","followers_url":"https://api.github.com/users/Maydell/followers","following_url":"https://api.github.com/users/Maydell/following{/other_user}","gists_url":"https://api.github.com/users/Maydell/gists{/gist_id}","starred_url":"https://api.github.com/users/Maydell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maydell/subscriptions","organizations_url":"https://api.github.com/users/Maydell/orgs","repos_url":"https://api.github.com/users/Maydell/repos","events_url":"https://api.github.com/users/Maydell/events{/privacy}","received_events_url":"https://api.github.com/users/Maydell/received_events","type":"User","site_admin":false},"body":"Should we, in general, have error messages more machine readable? I've had some issues in grafana because the errors contain weird characters.","created_at":"2019-05-21T07:11:23Z","updated_at":"2019-05-21T07:19:40Z","html_url":"https://github.com/voiapp/pubsub/pull/1#discussion_r285878811","pull_request_url":"https://api.github.com/repos/voiapp/pubsub/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/voiapp/pubsub/pulls/comments/285878811"},"html":{"href":"https://github.com/voiapp/pubsub/pull/1#discussion_r285878811"},"pull_request":{"href":"https://api.github.com/repos/voiapp/pubsub/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/voiapp/pubsub/pulls/1","id":280354837,"node_id":"MDExOlB1bGxSZXF1ZXN0MjgwMzU0ODM3","html_url":"https://github.com/voiapp/pubsub/pull/1","diff_url":"https://github.com/voiapp/pubsub/pull/1.diff","patch_url":"https://github.com/voiapp/pubsub/pull/1.patch","issue_url":"https://api.github.com/repos/voiapp/pubsub/issues/1","number":1,"state":"open","locked":false,"title":"Initial implementation","user":{"login":"cvik","id":325656,"node_id":"MDQ6VXNlcjMyNTY1Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/325656?v=4","gravatar_id":"","url":"https://api.github.com/users/cvik","html_url":"https://github.com/cvik","followers_url":"https://api.github.com/users/cvik/followers","following_url":"https://api.github.com/users/cvik/following{/other_user}","gists_url":"https://api.github.com/users/cvik/gists{/gist_id}","starred_url":"https://api.github.com/users/cvik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvik/subscriptions","organizations_url":"https://api.github.com/users/cvik/orgs","repos_url":"https://api.github.com/users/cvik/repos","events_url":"https://api.github.com/users/cvik/events{/privacy}","received_events_url":"https://api.github.com/users/cvik/received_events","type":"User","site_admin":false},"body":"The `type PubSub interface { ... }` abstraction now exist in three separate repositories (`iotrpc`, `iotcom` and `iotexporter`). This library breaks out the functionality to a separate dependency and brings the MQTT implementation with it as a subpackage.","created_at":"2019-05-20T11:42:56Z","updated_at":"2019-05-21T07:19:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9693da2b90d5ff74f4d11fe52cecd6076d4ab455","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/voiapp/pubsub/pulls/1/commits","review_comments_url":"https://api.github.com/repos/voiapp/pubsub/pulls/1/comments","review_comment_url":"https://api.github.com/repos/voiapp/pubsub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/voiapp/pubsub/issues/1/comments","statuses_url":"https://api.github.com/repos/voiapp/pubsub/statuses/f74d480577696f65221da014feecbde3d5042134","head":{"label":"voiapp:f/HI-69-initial-implementation","ref":"f/HI-69-initial-implementation","sha":"f74d480577696f65221da014feecbde3d5042134","user":{"login":"voiapp","id":45597784,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NTk3Nzg0","avatar_url":"https://avatars0.githubusercontent.com/u/45597784?v=4","gravatar_id":"","url":"https://api.github.com/users/voiapp","html_url":"https://github.com/voiapp","followers_url":"https://api.github.com/users/voiapp/followers","following_url":"https://api.github.com/users/voiapp/following{/other_user}","gists_url":"https://api.github.com/users/voiapp/gists{/gist_id}","starred_url":"https://api.github.com/users/voiapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voiapp/subscriptions","organizations_url":"https://api.github.com/users/voiapp/orgs","repos_url":"https://api.github.com/users/voiapp/repos","events_url":"https://api.github.com/users/voiapp/events{/privacy}","received_events_url":"https://api.github.com/users/voiapp/received_events","type":"Organization","site_admin":false},"repo":{"id":187629302,"node_id":"MDEwOlJlcG9zaXRvcnkxODc2MjkzMDI=","name":"pubsub","full_name":"voiapp/pubsub","private":false,"owner":{"login":"voiapp","id":45597784,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NTk3Nzg0","avatar_url":"https://avatars0.githubusercontent.com/u/45597784?v=4","gravatar_id":"","url":"https://api.github.com/users/voiapp","html_url":"https://github.com/voiapp","followers_url":"https://api.github.com/users/voiapp/followers","following_url":"https://api.github.com/users/voiapp/following{/other_user}","gists_url":"https://api.github.com/users/voiapp/gists{/gist_id}","starred_url":"https://api.github.com/users/voiapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voiapp/subscriptions","organizations_url":"https://api.github.com/users/voiapp/orgs","repos_url":"https://api.github.com/users/voiapp/repos","events_url":"https://api.github.com/users/voiapp/events{/privacy}","received_events_url":"https://api.github.com/users/voiapp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/voiapp/pubsub","description":null,"fork":false,"url":"https://api.github.com/repos/voiapp/pubsub","forks_url":"https://api.github.com/repos/voiapp/pubsub/forks","keys_url":"https://api.github.com/repos/voiapp/pubsub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/voiapp/pubsub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/voiapp/pubsub/teams","hooks_url":"https://api.github.com/repos/voiapp/pubsub/hooks","issue_events_url":"https://api.github.com/repos/voiapp/pubsub/issues/events{/number}","events_url":"https://api.github.com/repos/voiapp/pubsub/events","assignees_url":"https://api.github.com/repos/voiapp/pubsub/assignees{/user}","branches_url":"https://api.github.com/repos/voiapp/pubsub/branches{/branch}","tags_url":"https://api.github.com/repos/voiapp/pubsub/tags","blobs_url":"https://api.github.com/repos/voiapp/pubsub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/voiapp/pubsub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/voiapp/pubsub/git/refs{/sha}","trees_url":"https://api.github.com/repos/voiapp/pubsub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/voiapp/pubsub/statuses/{sha}","languages_url":"https://api.github.com/repos/voiapp/pubsub/languages","stargazers_url":"https://api.github.com/repos/voiapp/pubsub/stargazers","contributors_url":"https://api.github.com/repos/voiapp/pubsub/contributors","subscribers_url":"https://api.github.com/repos/voiapp/pubsub/subscribers","subscription_url":"https://api.github.com/repos/voiapp/pubsub/subscription","commits_url":"https://api.github.com/repos/voiapp/pubsub/commits{/sha}","git_commits_url":"https://api.github.com/repos/voiapp/pubsub/git/commits{/sha}","comments_url":"https://api.github.com/repos/voiapp/pubsub/comments{/number}","issue_comment_url":"https://api.github.com/repos/voiapp/pubsub/issues/comments{/number}","contents_url":"https://api.github.com/repos/voiapp/pubsub/contents/{+path}","compare_url":"https://api.github.com/repos/voiapp/pubsub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/voiapp/pubsub/merges","archive_url":"https://api.github.com/repos/voiapp/pubsub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/voiapp/pubsub/downloads","issues_url":"https://api.github.com/repos/voiapp/pubsub/issues{/number}","pulls_url":"https://api.github.com/repos/voiapp/pubsub/pulls{/number}","milestones_url":"https://api.github.com/repos/voiapp/pubsub/milestones{/number}","notifications_url":"https://api.github.com/repos/voiapp/pubsub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/voiapp/pubsub/labels{/name}","releases_url":"https://api.github.com/repos/voiapp/pubsub/releases{/id}","deployments_url":"https://api.github.com/repos/voiapp/pubsub/deployments","created_at":"2019-05-20T11:41:33Z","updated_at":"2019-05-20T11:41:43Z","pushed_at":"2019-05-20T15:37:08Z","git_url":"git://github.com/voiapp/pubsub.git","ssh_url":"git@github.com:voiapp/pubsub.git","clone_url":"https://github.com/voiapp/pubsub.git","svn_url":"https://github.com/voiapp/pubsub","homepage":"","size":3,"stargazers_count":0,"watchers_count":0,"language":"Makefile","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"voiapp:master","ref":"master","sha":"a6daf4ac0bf2f29e1197e710095a05c1c278d056","user":{"login":"voiapp","id":45597784,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NTk3Nzg0","avatar_url":"https://avatars0.githubusercontent.com/u/45597784?v=4","gravatar_id":"","url":"https://api.github.com/users/voiapp","html_url":"https://github.com/voiapp","followers_url":"https://api.github.com/users/voiapp/followers","following_url":"https://api.github.com/users/voiapp/following{/other_user}","gists_url":"https://api.github.com/users/voiapp/gists{/gist_id}","starred_url":"https://api.github.com/users/voiapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voiapp/subscriptions","organizations_url":"https://api.github.com/users/voiapp/orgs","repos_url":"https://api.github.com/users/voiapp/repos","events_url":"https://api.github.com/users/voiapp/events{/privacy}","received_events_url":"https://api.github.com/users/voiapp/received_events","type":"Organization","site_admin":false},"repo":{"id":187629302,"node_id":"MDEwOlJlcG9zaXRvcnkxODc2MjkzMDI=","name":"pubsub","full_name":"voiapp/pubsub","private":false,"owner":{"login":"voiapp","id":45597784,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NTk3Nzg0","avatar_url":"https://avatars0.githubusercontent.com/u/45597784?v=4","gravatar_id":"","url":"https://api.github.com/users/voiapp","html_url":"https://github.com/voiapp","followers_url":"https://api.github.com/users/voiapp/followers","following_url":"https://api.github.com/users/voiapp/following{/other_user}","gists_url":"https://api.github.com/users/voiapp/gists{/gist_id}","starred_url":"https://api.github.com/users/voiapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voiapp/subscriptions","organizations_url":"https://api.github.com/users/voiapp/orgs","repos_url":"https://api.github.com/users/voiapp/repos","events_url":"https://api.github.com/users/voiapp/events{/privacy}","received_events_url":"https://api.github.com/users/voiapp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/voiapp/pubsub","description":null,"fork":false,"url":"https://api.github.com/repos/voiapp/pubsub","forks_url":"https://api.github.com/repos/voiapp/pubsub/forks","keys_url":"https://api.github.com/repos/voiapp/pubsub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/voiapp/pubsub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/voiapp/pubsub/teams","hooks_url":"https://api.github.com/repos/voiapp/pubsub/hooks","issue_events_url":"https://api.github.com/repos/voiapp/pubsub/issues/events{/number}","events_url":"https://api.github.com/repos/voiapp/pubsub/events","assignees_url":"https://api.github.com/repos/voiapp/pubsub/assignees{/user}","branches_url":"https://api.github.com/repos/voiapp/pubsub/branches{/branch}","tags_url":"https://api.github.com/repos/voiapp/pubsub/tags","blobs_url":"https://api.github.com/repos/voiapp/pubsub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/voiapp/pubsub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/voiapp/pubsub/git/refs{/sha}","trees_url":"https://api.github.com/repos/voiapp/pubsub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/voiapp/pubsub/statuses/{sha}","languages_url":"https://api.github.com/repos/voiapp/pubsub/languages","stargazers_url":"https://api.github.com/repos/voiapp/pubsub/stargazers","contributors_url":"https://api.github.com/repos/voiapp/pubsub/contributors","subscribers_url":"https://api.github.com/repos/voiapp/pubsub/subscribers","subscription_url":"https://api.github.com/repos/voiapp/pubsub/subscription","commits_url":"https://api.github.com/repos/voiapp/pubsub/commits{/sha}","git_commits_url":"https://api.github.com/repos/voiapp/pubsub/git/commits{/sha}","comments_url":"https://api.github.com/repos/voiapp/pubsub/comments{/number}","issue_comment_url":"https://api.github.com/repos/voiapp/pubsub/issues/comments{/number}","contents_url":"https://api.github.com/repos/voiapp/pubsub/contents/{+path}","compare_url":"https://api.github.com/repos/voiapp/pubsub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/voiapp/pubsub/merges","archive_url":"https://api.github.com/repos/voiapp/pubsub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/voiapp/pubsub/downloads","issues_url":"https://api.github.com/repos/voiapp/pubsub/issues{/number}","pulls_url":"https://api.github.com/repos/voiapp/pubsub/pulls{/number}","milestones_url":"https://api.github.com/repos/voiapp/pubsub/milestones{/number}","notifications_url":"https://api.github.com/repos/voiapp/pubsub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/voiapp/pubsub/labels{/name}","releases_url":"https://api.github.com/repos/voiapp/pubsub/releases{/id}","deployments_url":"https://api.github.com/repos/voiapp/pubsub/deployments","created_at":"2019-05-20T11:41:33Z","updated_at":"2019-05-20T11:41:43Z","pushed_at":"2019-05-20T15:37:08Z","git_url":"git://github.com/voiapp/pubsub.git","ssh_url":"git@github.com:voiapp/pubsub.git","clone_url":"https://github.com/voiapp/pubsub.git","svn_url":"https://github.com/voiapp/pubsub","homepage":"","size":3,"stargazers_count":0,"watchers_count":0,"language":"Makefile","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/voiapp/pubsub/pulls/1"},"html":{"href":"https://github.com/voiapp/pubsub/pull/1"},"issue":{"href":"https://api.github.com/repos/voiapp/pubsub/issues/1"},"comments":{"href":"https://api.github.com/repos/voiapp/pubsub/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/voiapp/pubsub/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/voiapp/pubsub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/voiapp/pubsub/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/voiapp/pubsub/statuses/f74d480577696f65221da014feecbde3d5042134"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Maydell"}}