{"action":"created","comment":{"url":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/comments/229217455","pull_request_review_id":169658137,"id":229217455,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTIxNzQ1NQ==","diff_hunk":"@@ -32,40 +33,40 @@ var logStr = \"STH Getter\"\n // Run runs an STH Getter, which periodically gets an STH from a Log, checks\n // that each one meets per-STH requirements defined in RFC 6962, and stores\n // them.\n-func Run(ctx context.Context, lc *client.LogClient, st storage.APICallWriter, url string, period time.Duration) {\n-\tlog.Printf(\"%s: %s: started with period %v\", url, logStr, period)\n+func Run(ctx context.Context, lc *client.LogClient, st storage.APICallWriter, l *ctlog.Log, period time.Duration) {\n+\tlog.Printf(\"%s: %s: started with period %v\", l.URL, logStr, period)\n \n \tt := time.NewTicker(period)\n \tdefer t.Stop()\n \tfor {\n \t\tselect {\n \t\tcase <-t.C:\n \t\t\t// TODO(katjoyce): Work out when and where to add context timeouts.\n-\t\t\tgetCheckStoreSTH(ctx, url, lc, st)\n+\t\t\tgetCheckStoreSTH(ctx, lc, st, l)\n \t\tcase <-ctx.Done():\n-\t\t\tlog.Printf(\"%s: %s: stopped\", url, logStr)\n+\t\t\tlog.Printf(\"%s: %s: stopped\", l.URL, logStr)\n \t\t\treturn\n \t\t}\n \n \t}\n }\n \n-func getCheckStoreSTH(ctx context.Context, url string, lc *client.LogClient, st storage.APICallWriter) {\n+func getCheckStoreSTH(ctx context.Context, lc *client.LogClient, st storage.APICallWriter, l *ctlog.Log) {\n \t// Get STH from Log.\n-\tlog.Printf(\"%s: %s: getting STH...\", url, logStr)\n+\tlog.Printf(\"%s: %s: getting STH...\", l.URL, logStr)\n \t_, httpData, getErr := lc.GetSTH()\n \tif getErr != nil {\n-\t\tlog.Printf(\"%s: %s: error getting STH: %s\", url, logStr, getErr)\n+\t\tlog.Printf(\"%s: %s: error getting STH: %s\", l.URL, logStr, getErr)\n \t}\n \tif len(httpData.Body) > 0 {\n-\t\tlog.Printf(\"%s: %s: response: %s\", url, logStr, httpData.Body)\n+\t\tlog.Printf(\"%s: %s: response: %s\", l.URL, logStr, httpData.Body)\n \t}\n \n \t// Store get-sth API call.\n \tapiCall := apicall.New(ct.GetSTHStr, httpData, getErr)\n-\tlog.Printf(\"%s: %s: writing API Call...\", url, logStr)\n-\tif err := st.WriteAPICall(ctx, apiCall); err != nil {\n-\t\tlog.Printf(\"%s: %s: error writing API Call %s: %s\", url, logStr, apiCall, err)\n+\tlog.Printf(\"%s: %s: writing API Call...\", l.URL, logStr)","path":"sthgetter/sthgetter.go","position":54,"original_position":54,"commit_id":"2553a2bb24473e22ffeb45799bd8f5fc0a54d95b","original_commit_id":"2553a2bb24473e22ffeb45799bd8f5fc0a54d95b","user":{"login":"Martin2112","id":13366863,"node_id":"MDQ6VXNlcjEzMzY2ODYz","avatar_url":"https://avatars2.githubusercontent.com/u/13366863?v=4","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false},"body":"Not necessarily for this review but are you clear on where the write transaction boundaries are in the design?","created_at":"2018-10-30T08:47:19Z","updated_at":"2018-10-30T08:48:00Z","html_url":"https://github.com/google/certificate-transparency-monitor/pull/10#discussion_r229217455","pull_request_url":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/comments/229217455"},"html":{"href":"https://github.com/google/certificate-transparency-monitor/pull/10#discussion_r229217455"},"pull_request":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/10","id":226584888,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NTg0ODg4","html_url":"https://github.com/google/certificate-transparency-monitor/pull/10","diff_url":"https://github.com/google/certificate-transparency-monitor/pull/10.diff","patch_url":"https://github.com/google/certificate-transparency-monitor/pull/10.patch","issue_url":"https://api.github.com/repos/google/certificate-transparency-monitor/issues/10","number":10,"state":"open","locked":false,"title":"Add Log metadata","user":{"login":"taknira","id":5446167,"node_id":"MDQ6VXNlcjU0NDYxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/5446167?v=4","gravatar_id":"","url":"https://api.github.com/users/taknira","html_url":"https://github.com/taknira","followers_url":"https://api.github.com/users/taknira/followers","following_url":"https://api.github.com/users/taknira/following{/other_user}","gists_url":"https://api.github.com/users/taknira/gists{/gist_id}","starred_url":"https://api.github.com/users/taknira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taknira/subscriptions","organizations_url":"https://api.github.com/users/taknira/orgs","repos_url":"https://api.github.com/users/taknira/repos","events_url":"https://api.github.com/users/taknira/events{/privacy}","received_events_url":"https://api.github.com/users/taknira/received_events","type":"User","site_admin":false},"body":"Purpose is so that the WriteAPICalls interface is also passed information\r\nabout which Log the APICall is for, so implementations are able to store\r\nthe api call information for the correct Log.","created_at":"2018-10-29T14:38:10Z","updated_at":"2018-10-30T08:48:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03d6288460b01e2dcb12b17b91d9248a9a7f6007","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pphaneuf","id":40400,"node_id":"MDQ6VXNlcjQwNDAw","avatar_url":"https://avatars1.githubusercontent.com/u/40400?v=4","gravatar_id":"","url":"https://api.github.com/users/pphaneuf","html_url":"https://github.com/pphaneuf","followers_url":"https://api.github.com/users/pphaneuf/followers","following_url":"https://api.github.com/users/pphaneuf/following{/other_user}","gists_url":"https://api.github.com/users/pphaneuf/gists{/gist_id}","starred_url":"https://api.github.com/users/pphaneuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pphaneuf/subscriptions","organizations_url":"https://api.github.com/users/pphaneuf/orgs","repos_url":"https://api.github.com/users/pphaneuf/repos","events_url":"https://api.github.com/users/pphaneuf/events{/privacy}","received_events_url":"https://api.github.com/users/pphaneuf/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/10/commits","review_comments_url":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/10/comments","review_comment_url":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/certificate-transparency-monitor/issues/10/comments","statuses_url":"https://api.github.com/repos/google/certificate-transparency-monitor/statuses/2553a2bb24473e22ffeb45799bd8f5fc0a54d95b","head":{"label":"taknira:log","ref":"log","sha":"2553a2bb24473e22ffeb45799bd8f5fc0a54d95b","user":{"login":"taknira","id":5446167,"node_id":"MDQ6VXNlcjU0NDYxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/5446167?v=4","gravatar_id":"","url":"https://api.github.com/users/taknira","html_url":"https://github.com/taknira","followers_url":"https://api.github.com/users/taknira/followers","following_url":"https://api.github.com/users/taknira/following{/other_user}","gists_url":"https://api.github.com/users/taknira/gists{/gist_id}","starred_url":"https://api.github.com/users/taknira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taknira/subscriptions","organizations_url":"https://api.github.com/users/taknira/orgs","repos_url":"https://api.github.com/users/taknira/repos","events_url":"https://api.github.com/users/taknira/events{/privacy}","received_events_url":"https://api.github.com/users/taknira/received_events","type":"User","site_admin":false},"repo":{"id":142311685,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzMTE2ODU=","name":"certificate-transparency-monitor","full_name":"taknira/certificate-transparency-monitor","private":false,"owner":{"login":"taknira","id":5446167,"node_id":"MDQ6VXNlcjU0NDYxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/5446167?v=4","gravatar_id":"","url":"https://api.github.com/users/taknira","html_url":"https://github.com/taknira","followers_url":"https://api.github.com/users/taknira/followers","following_url":"https://api.github.com/users/taknira/following{/other_user}","gists_url":"https://api.github.com/users/taknira/gists{/gist_id}","starred_url":"https://api.github.com/users/taknira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taknira/subscriptions","organizations_url":"https://api.github.com/users/taknira/orgs","repos_url":"https://api.github.com/users/taknira/repos","events_url":"https://api.github.com/users/taknira/events{/privacy}","received_events_url":"https://api.github.com/users/taknira/received_events","type":"User","site_admin":false},"html_url":"https://github.com/taknira/certificate-transparency-monitor","description":null,"fork":true,"url":"https://api.github.com/repos/taknira/certificate-transparency-monitor","forks_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/forks","keys_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/teams","hooks_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/hooks","issue_events_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/issues/events{/number}","events_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/events","assignees_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/assignees{/user}","branches_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/branches{/branch}","tags_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/tags","blobs_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/git/refs{/sha}","trees_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/statuses/{sha}","languages_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/languages","stargazers_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/stargazers","contributors_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/contributors","subscribers_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/subscribers","subscription_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/subscription","commits_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/commits{/sha}","git_commits_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/git/commits{/sha}","comments_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/comments{/number}","issue_comment_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/issues/comments{/number}","contents_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/contents/{+path}","compare_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/merges","archive_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/downloads","issues_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/issues{/number}","pulls_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/pulls{/number}","milestones_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/milestones{/number}","notifications_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/labels{/name}","releases_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/releases{/id}","deployments_url":"https://api.github.com/repos/taknira/certificate-transparency-monitor/deployments","created_at":"2018-07-25T14:30:11Z","updated_at":"2018-10-29T14:36:26Z","pushed_at":"2018-10-30T08:29:05Z","git_url":"git://github.com/taknira/certificate-transparency-monitor.git","ssh_url":"git@github.com:taknira/certificate-transparency-monitor.git","clone_url":"https://github.com/taknira/certificate-transparency-monitor.git","svn_url":"https://github.com/taknira/certificate-transparency-monitor","homepage":null,"size":29,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"37eda444b02b430ff5d0f4672928983e981e8955","user":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":123160218,"node_id":"MDEwOlJlcG9zaXRvcnkxMjMxNjAyMTg=","name":"certificate-transparency-monitor","full_name":"google/certificate-transparency-monitor","private":false,"owner":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/google/certificate-transparency-monitor","description":null,"fork":false,"url":"https://api.github.com/repos/google/certificate-transparency-monitor","forks_url":"https://api.github.com/repos/google/certificate-transparency-monitor/forks","keys_url":"https://api.github.com/repos/google/certificate-transparency-monitor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/certificate-transparency-monitor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/certificate-transparency-monitor/teams","hooks_url":"https://api.github.com/repos/google/certificate-transparency-monitor/hooks","issue_events_url":"https://api.github.com/repos/google/certificate-transparency-monitor/issues/events{/number}","events_url":"https://api.github.com/repos/google/certificate-transparency-monitor/events","assignees_url":"https://api.github.com/repos/google/certificate-transparency-monitor/assignees{/user}","branches_url":"https://api.github.com/repos/google/certificate-transparency-monitor/branches{/branch}","tags_url":"https://api.github.com/repos/google/certificate-transparency-monitor/tags","blobs_url":"https://api.github.com/repos/google/certificate-transparency-monitor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/certificate-transparency-monitor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/certificate-transparency-monitor/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/certificate-transparency-monitor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/certificate-transparency-monitor/statuses/{sha}","languages_url":"https://api.github.com/repos/google/certificate-transparency-monitor/languages","stargazers_url":"https://api.github.com/repos/google/certificate-transparency-monitor/stargazers","contributors_url":"https://api.github.com/repos/google/certificate-transparency-monitor/contributors","subscribers_url":"https://api.github.com/repos/google/certificate-transparency-monitor/subscribers","subscription_url":"https://api.github.com/repos/google/certificate-transparency-monitor/subscription","commits_url":"https://api.github.com/repos/google/certificate-transparency-monitor/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/certificate-transparency-monitor/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/certificate-transparency-monitor/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/certificate-transparency-monitor/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/certificate-transparency-monitor/contents/{+path}","compare_url":"https://api.github.com/repos/google/certificate-transparency-monitor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/certificate-transparency-monitor/merges","archive_url":"https://api.github.com/repos/google/certificate-transparency-monitor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/certificate-transparency-monitor/downloads","issues_url":"https://api.github.com/repos/google/certificate-transparency-monitor/issues{/number}","pulls_url":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls{/number}","milestones_url":"https://api.github.com/repos/google/certificate-transparency-monitor/milestones{/number}","notifications_url":"https://api.github.com/repos/google/certificate-transparency-monitor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/certificate-transparency-monitor/labels{/name}","releases_url":"https://api.github.com/repos/google/certificate-transparency-monitor/releases{/id}","deployments_url":"https://api.github.com/repos/google/certificate-transparency-monitor/deployments","created_at":"2018-02-27T16:56:10Z","updated_at":"2018-10-29T14:35:50Z","pushed_at":"2018-10-30T08:29:06Z","git_url":"git://github.com/google/certificate-transparency-monitor.git","ssh_url":"git@github.com:google/certificate-transparency-monitor.git","clone_url":"https://github.com/google/certificate-transparency-monitor.git","svn_url":"https://github.com/google/certificate-transparency-monitor","homepage":null,"size":25,"stargazers_count":9,"watchers_count":9,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":1,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/10"},"html":{"href":"https://github.com/google/certificate-transparency-monitor/pull/10"},"issue":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/issues/10"},"comments":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/google/certificate-transparency-monitor/statuses/2553a2bb24473e22ffeb45799bd8f5fc0a54d95b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Martin2112"}}