{"action":"created","comment":{"url":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/comments/196658442","pull_request_review_id":130251414,"id":196658442,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjY1ODQ0Mg==","diff_hunk":"@@ -0,0 +1,73 @@\n+package client\n+\n+import (\n+\t\"crypto/tls\"\n+\t//\"github.com/ServiceComb/go-chassis/core/config\"\n+\n+\t\"github.com/ServiceComb/go-cc-client/apollo-client\"\n+\t\"github.com/ServiceComb/go-cc-client/member-discovery\"\n+)\n+\n+var configClientPlugins = make(map[string]func(endpoint, serviceName, app, env, version string, tlsConfig *tls.Config) ConfigClient)\n+\n+//DefaultClient is config server's client\n+var DefaultClient ConfigClient\n+\n+const (\n+\tdefaultConfigServer = \"config_center\"\n+)\n+\n+//InstallConfigClientPlugin install a config client plugin\n+func InstallConfigClientPlugin(name string, f func(endpoint, serviceName, app, env, version string, tlsConfig *tls.Config) ConfigClient) {\n+\tconfigClientPlugins[name] = f\n+}\n+\n+//ConfigClient is the interface of config server client, it has basic func to interact with config server\n+type ConfigClient interface {\n+\t//PullConfigs pull all configs from remote\n+\tPullConfigs(serviceName, version, app, env string) (map[string]interface{}, error)\n+\t//PullConfig pull one config from remote\n+\tPullConfig(serviceName, version, app, env, key, contentType string) (interface{}, error)","path":"client.go","position":30,"original_position":30,"commit_id":"cde6b36b8e8fd18b23bf212a456c97a9901c6e1d","original_commit_id":"cde6b36b8e8fd18b23bf212a456c97a9901c6e1d","user":{"login":"tianxiaoliang","id":1610890,"node_id":"MDQ6VXNlcjE2MTA4OTA=","avatar_url":"https://avatars0.githubusercontent.com/u/1610890?v=4","gravatar_id":"","url":"https://api.github.com/users/tianxiaoliang","html_url":"https://github.com/tianxiaoliang","followers_url":"https://api.github.com/users/tianxiaoliang/followers","following_url":"https://api.github.com/users/tianxiaoliang/following{/other_user}","gists_url":"https://api.github.com/users/tianxiaoliang/gists{/gist_id}","starred_url":"https://api.github.com/users/tianxiaoliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianxiaoliang/subscriptions","organizations_url":"https://api.github.com/users/tianxiaoliang/orgs","repos_url":"https://api.github.com/users/tianxiaoliang/repos","events_url":"https://api.github.com/users/tianxiaoliang/events{/privacy}","received_events_url":"https://api.github.com/users/tianxiaoliang/received_events","type":"User","site_admin":false},"body":"this file should be in go-chassis ","created_at":"2018-06-20T06:15:55Z","updated_at":"2018-06-20T06:16:05Z","html_url":"https://github.com/ServiceComb/go-cc-client/pull/9#discussion_r196658442","pull_request_url":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/9","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/comments/196658442"},"html":{"href":"https://github.com/ServiceComb/go-cc-client/pull/9#discussion_r196658442"},"pull_request":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/9","id":195887750,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1ODg3NzUw","html_url":"https://github.com/ServiceComb/go-cc-client/pull/9","diff_url":"https://github.com/ServiceComb/go-cc-client/pull/9.diff","patch_url":"https://github.com/ServiceComb/go-cc-client/pull/9.patch","issue_url":"https://api.github.com/repos/ServiceComb/go-cc-client/issues/9","number":9,"state":"open","locked":false,"title":"Make cc-client Pluggable","user":{"login":"asifdxtreme","id":9736066,"node_id":"MDQ6VXNlcjk3MzYwNjY=","avatar_url":"https://avatars0.githubusercontent.com/u/9736066?v=4","gravatar_id":"","url":"https://api.github.com/users/asifdxtreme","html_url":"https://github.com/asifdxtreme","followers_url":"https://api.github.com/users/asifdxtreme/followers","following_url":"https://api.github.com/users/asifdxtreme/following{/other_user}","gists_url":"https://api.github.com/users/asifdxtreme/gists{/gist_id}","starred_url":"https://api.github.com/users/asifdxtreme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asifdxtreme/subscriptions","organizations_url":"https://api.github.com/users/asifdxtreme/orgs","repos_url":"https://api.github.com/users/asifdxtreme/repos","events_url":"https://api.github.com/users/asifdxtreme/events{/privacy}","received_events_url":"https://api.github.com/users/asifdxtreme/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-19T16:32:28Z","updated_at":"2018-06-20T06:16:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2c5839845b3c1bd41bfa589700d100bf9f14872","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ServiceComb/go-cc-client/issues/9/comments","statuses_url":"https://api.github.com/repos/ServiceComb/go-cc-client/statuses/cde6b36b8e8fd18b23bf212a456c97a9901c6e1d","head":{"label":"asifdxtreme:ccplugin","ref":"ccplugin","sha":"cde6b36b8e8fd18b23bf212a456c97a9901c6e1d","user":{"login":"asifdxtreme","id":9736066,"node_id":"MDQ6VXNlcjk3MzYwNjY=","avatar_url":"https://avatars0.githubusercontent.com/u/9736066?v=4","gravatar_id":"","url":"https://api.github.com/users/asifdxtreme","html_url":"https://github.com/asifdxtreme","followers_url":"https://api.github.com/users/asifdxtreme/followers","following_url":"https://api.github.com/users/asifdxtreme/following{/other_user}","gists_url":"https://api.github.com/users/asifdxtreme/gists{/gist_id}","starred_url":"https://api.github.com/users/asifdxtreme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asifdxtreme/subscriptions","organizations_url":"https://api.github.com/users/asifdxtreme/orgs","repos_url":"https://api.github.com/users/asifdxtreme/repos","events_url":"https://api.github.com/users/asifdxtreme/events{/privacy}","received_events_url":"https://api.github.com/users/asifdxtreme/received_events","type":"User","site_admin":false},"repo":{"id":130869020,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA4NjkwMjA=","name":"go-cc-client","full_name":"asifdxtreme/go-cc-client","owner":{"login":"asifdxtreme","id":9736066,"node_id":"MDQ6VXNlcjk3MzYwNjY=","avatar_url":"https://avatars0.githubusercontent.com/u/9736066?v=4","gravatar_id":"","url":"https://api.github.com/users/asifdxtreme","html_url":"https://github.com/asifdxtreme","followers_url":"https://api.github.com/users/asifdxtreme/followers","following_url":"https://api.github.com/users/asifdxtreme/following{/other_user}","gists_url":"https://api.github.com/users/asifdxtreme/gists{/gist_id}","starred_url":"https://api.github.com/users/asifdxtreme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asifdxtreme/subscriptions","organizations_url":"https://api.github.com/users/asifdxtreme/orgs","repos_url":"https://api.github.com/users/asifdxtreme/repos","events_url":"https://api.github.com/users/asifdxtreme/events{/privacy}","received_events_url":"https://api.github.com/users/asifdxtreme/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asifdxtreme/go-cc-client","description":null,"fork":true,"url":"https://api.github.com/repos/asifdxtreme/go-cc-client","forks_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/forks","keys_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/teams","hooks_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/hooks","issue_events_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/issues/events{/number}","events_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/events","assignees_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/assignees{/user}","branches_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/branches{/branch}","tags_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/tags","blobs_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/statuses/{sha}","languages_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/languages","stargazers_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/stargazers","contributors_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/contributors","subscribers_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/subscribers","subscription_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/subscription","commits_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/contents/{+path}","compare_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/merges","archive_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/downloads","issues_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/issues{/number}","pulls_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/pulls{/number}","milestones_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/milestones{/number}","notifications_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/labels{/name}","releases_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/releases{/id}","deployments_url":"https://api.github.com/repos/asifdxtreme/go-cc-client/deployments","created_at":"2018-04-24T14:41:23Z","updated_at":"2018-05-09T08:39:52Z","pushed_at":"2018-06-19T15:10:58Z","git_url":"git://github.com/asifdxtreme/go-cc-client.git","ssh_url":"git@github.com:asifdxtreme/go-cc-client.git","clone_url":"https://github.com/asifdxtreme/go-cc-client.git","svn_url":"https://github.com/asifdxtreme/go-cc-client","homepage":null,"size":34,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"ServiceComb:master","ref":"master","sha":"649a050adfe8e63f426671cc365f228e29388b1c","user":{"login":"ServiceComb","id":28752765,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NzUyNzY1","avatar_url":"https://avatars2.githubusercontent.com/u/28752765?v=4","gravatar_id":"","url":"https://api.github.com/users/ServiceComb","html_url":"https://github.com/ServiceComb","followers_url":"https://api.github.com/users/ServiceComb/followers","following_url":"https://api.github.com/users/ServiceComb/following{/other_user}","gists_url":"https://api.github.com/users/ServiceComb/gists{/gist_id}","starred_url":"https://api.github.com/users/ServiceComb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ServiceComb/subscriptions","organizations_url":"https://api.github.com/users/ServiceComb/orgs","repos_url":"https://api.github.com/users/ServiceComb/repos","events_url":"https://api.github.com/users/ServiceComb/events{/privacy}","received_events_url":"https://api.github.com/users/ServiceComb/received_events","type":"Organization","site_admin":false},"repo":{"id":117544334,"node_id":"MDEwOlJlcG9zaXRvcnkxMTc1NDQzMzQ=","name":"go-cc-client","full_name":"ServiceComb/go-cc-client","owner":{"login":"ServiceComb","id":28752765,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NzUyNzY1","avatar_url":"https://avatars2.githubusercontent.com/u/28752765?v=4","gravatar_id":"","url":"https://api.github.com/users/ServiceComb","html_url":"https://github.com/ServiceComb","followers_url":"https://api.github.com/users/ServiceComb/followers","following_url":"https://api.github.com/users/ServiceComb/following{/other_user}","gists_url":"https://api.github.com/users/ServiceComb/gists{/gist_id}","starred_url":"https://api.github.com/users/ServiceComb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ServiceComb/subscriptions","organizations_url":"https://api.github.com/users/ServiceComb/orgs","repos_url":"https://api.github.com/users/ServiceComb/repos","events_url":"https://api.github.com/users/ServiceComb/events{/privacy}","received_events_url":"https://api.github.com/users/ServiceComb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ServiceComb/go-cc-client","description":null,"fork":false,"url":"https://api.github.com/repos/ServiceComb/go-cc-client","forks_url":"https://api.github.com/repos/ServiceComb/go-cc-client/forks","keys_url":"https://api.github.com/repos/ServiceComb/go-cc-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ServiceComb/go-cc-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ServiceComb/go-cc-client/teams","hooks_url":"https://api.github.com/repos/ServiceComb/go-cc-client/hooks","issue_events_url":"https://api.github.com/repos/ServiceComb/go-cc-client/issues/events{/number}","events_url":"https://api.github.com/repos/ServiceComb/go-cc-client/events","assignees_url":"https://api.github.com/repos/ServiceComb/go-cc-client/assignees{/user}","branches_url":"https://api.github.com/repos/ServiceComb/go-cc-client/branches{/branch}","tags_url":"https://api.github.com/repos/ServiceComb/go-cc-client/tags","blobs_url":"https://api.github.com/repos/ServiceComb/go-cc-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ServiceComb/go-cc-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ServiceComb/go-cc-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/ServiceComb/go-cc-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ServiceComb/go-cc-client/statuses/{sha}","languages_url":"https://api.github.com/repos/ServiceComb/go-cc-client/languages","stargazers_url":"https://api.github.com/repos/ServiceComb/go-cc-client/stargazers","contributors_url":"https://api.github.com/repos/ServiceComb/go-cc-client/contributors","subscribers_url":"https://api.github.com/repos/ServiceComb/go-cc-client/subscribers","subscription_url":"https://api.github.com/repos/ServiceComb/go-cc-client/subscription","commits_url":"https://api.github.com/repos/ServiceComb/go-cc-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/ServiceComb/go-cc-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/ServiceComb/go-cc-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/ServiceComb/go-cc-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/ServiceComb/go-cc-client/contents/{+path}","compare_url":"https://api.github.com/repos/ServiceComb/go-cc-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ServiceComb/go-cc-client/merges","archive_url":"https://api.github.com/repos/ServiceComb/go-cc-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ServiceComb/go-cc-client/downloads","issues_url":"https://api.github.com/repos/ServiceComb/go-cc-client/issues{/number}","pulls_url":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls{/number}","milestones_url":"https://api.github.com/repos/ServiceComb/go-cc-client/milestones{/number}","notifications_url":"https://api.github.com/repos/ServiceComb/go-cc-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ServiceComb/go-cc-client/labels{/name}","releases_url":"https://api.github.com/repos/ServiceComb/go-cc-client/releases{/id}","deployments_url":"https://api.github.com/repos/ServiceComb/go-cc-client/deployments","created_at":"2018-01-15T12:45:36Z","updated_at":"2018-04-27T08:09:52Z","pushed_at":"2018-06-19T16:32:28Z","git_url":"git://github.com/ServiceComb/go-cc-client.git","ssh_url":"git@github.com:ServiceComb/go-cc-client.git","clone_url":"https://github.com/ServiceComb/go-cc-client.git","svn_url":"https://github.com/ServiceComb/go-cc-client","homepage":null,"size":30,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":3,"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":7,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/9"},"html":{"href":"https://github.com/ServiceComb/go-cc-client/pull/9"},"issue":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/issues/9"},"comments":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ServiceComb/go-cc-client/statuses/cde6b36b8e8fd18b23bf212a456c97a9901c6e1d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tianxiaoliang"}}