{"action":"created","comment":{"url":"https://api.github.com/repos/mysteriumnetwork/node/pulls/comments/219373580","pull_request_review_id":157533298,"id":219373580,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTM3MzU4MA==","diff_hunk":"@@ -18,47 +18,64 @@\n package service\n \n import (\n-\t\"crypto/x509/pkix\"\n-\n \tlog \"github.com/cihub/seelog\"\n-\t\"github.com/mysteriumnetwork/go-openvpn/openvpn\"\n-\t\"github.com/mysteriumnetwork/go-openvpn/openvpn/middlewares/state\"\n-\t\"github.com/mysteriumnetwork/go-openvpn/openvpn/tls\"\n \t\"github.com/mysteriumnetwork/node/communication\"\n-\t\"github.com/mysteriumnetwork/node/core/ip\"\n-\t\"github.com/mysteriumnetwork/node/core/location\"\n+\tnats_dialog \"github.com/mysteriumnetwork/node/communication/nats/dialog\"\n+\tnats_discovery \"github.com/mysteriumnetwork/node/communication/nats/discovery\"\n \t\"github.com/mysteriumnetwork/node/discovery\"\n \t\"github.com/mysteriumnetwork/node/identity\"\n+\tidentity_registry \"github.com/mysteriumnetwork/node/identity/registry\"\n \tidentity_selector \"github.com/mysteriumnetwork/node/identity/selector\"\n+\t\"github.com/mysteriumnetwork/node/logconfig\"\n \t\"github.com/mysteriumnetwork/node/metadata\"\n-\t\"github.com/mysteriumnetwork/node/nat\"\n \tdto_discovery \"github.com/mysteriumnetwork/node/service_discovery/dto\"\n-\topenvpn_discovery \"github.com/mysteriumnetwork/node/services/openvpn/discovery\"\n-\t\"github.com/mysteriumnetwork/node/session\"\n )\n \n-// Manager represent entrypoint for Mysterium service with top level components\n+const logPrefix = \"[service-manager] \"\n+\n+// Service interface represents pluggable Mysterium service\n+type Service interface {\n+\tStart(providerID identity.Identity, dialogWaiter communication.DialogWaiter) (dto_discovery.ServiceProposal, error)\n+\tWait() error\n+\tStop() error\n+}\n+\n+// NewManager creates new instance of pluggable services manager\n+func NewManager(\n+\tnetworkDefinition metadata.NetworkDefinition,\n+\tidentityLoader identity_selector.Loader,\n+\tsignerFactory identity.SignerFactory,\n+\tidentityRegistry identity_registry.IdentityRegistry,\n+\tservice Service,\n+\tdiscoveryService *discovery.Discovery,\n+) *Manager {\n+\tlogconfig.Bootstrap()\n+\n+\treturn &Manager{\n+\t\tidentityLoader: identityLoader,\n+\t\tdialogWaiterFactory: func(myID identity.Identity) communication.DialogWaiter {","path":"core/service/manager.go","position":57,"original_position":57,"commit_id":"e6e338482e6345799b5f3531c3208a49c1e52a3c","original_commit_id":"e6e338482e6345799b5f3531c3208a49c1e52a3c","user":{"login":"soffokl","id":8612618,"node_id":"MDQ6VXNlcjg2MTI2MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/8612618?v=4","gravatar_id":"","url":"https://api.github.com/users/soffokl","html_url":"https://github.com/soffokl","followers_url":"https://api.github.com/users/soffokl/followers","following_url":"https://api.github.com/users/soffokl/following{/other_user}","gists_url":"https://api.github.com/users/soffokl/gists{/gist_id}","starred_url":"https://api.github.com/users/soffokl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soffokl/subscriptions","organizations_url":"https://api.github.com/users/soffokl/orgs","repos_url":"https://api.github.com/users/soffokl/repos","events_url":"https://api.github.com/users/soffokl/events{/privacy}","received_events_url":"https://api.github.com/users/soffokl/received_events","type":"User","site_admin":false},"body":"Is there a better naming then `myID`? \r\nIt's not clear whose id should be there.","created_at":"2018-09-21T03:13:45Z","updated_at":"2018-09-21T03:32:23Z","html_url":"https://github.com/mysteriumnetwork/node/pull/392#discussion_r219373580","pull_request_url":"https://api.github.com/repos/mysteriumnetwork/node/pulls/392","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mysteriumnetwork/node/pulls/comments/219373580"},"html":{"href":"https://github.com/mysteriumnetwork/node/pull/392#discussion_r219373580"},"pull_request":{"href":"https://api.github.com/repos/mysteriumnetwork/node/pulls/392"}}},"pull_request":{"url":"https://api.github.com/repos/mysteriumnetwork/node/pulls/392","id":216865950,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2ODY1OTUw","html_url":"https://github.com/mysteriumnetwork/node/pull/392","diff_url":"https://github.com/mysteriumnetwork/node/pull/392.diff","patch_url":"https://github.com/mysteriumnetwork/node/pull/392.patch","issue_url":"https://api.github.com/repos/mysteriumnetwork/node/issues/392","number":392,"state":"open","locked":false,"title":"Inject Openvpn service on service provider side","user":{"login":"Waldz","id":2713911,"node_id":"MDQ6VXNlcjI3MTM5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/2713911?v=4","gravatar_id":"","url":"https://api.github.com/users/Waldz","html_url":"https://github.com/Waldz","followers_url":"https://api.github.com/users/Waldz/followers","following_url":"https://api.github.com/users/Waldz/following{/other_user}","gists_url":"https://api.github.com/users/Waldz/gists{/gist_id}","starred_url":"https://api.github.com/users/Waldz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waldz/subscriptions","organizations_url":"https://api.github.com/users/Waldz/orgs","repos_url":"https://api.github.com/users/Waldz/repos","events_url":"https://api.github.com/users/Waldz/events{/privacy}","received_events_url":"https://api.github.com/users/Waldz/received_events","type":"User","site_admin":false},"body":"Updates #382","created_at":"2018-09-20T07:09:50Z","updated_at":"2018-09-21T03:32:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb3d35150419ef7761625ed8dd7816117dc62085","assignee":{"login":"Waldz","id":2713911,"node_id":"MDQ6VXNlcjI3MTM5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/2713911?v=4","gravatar_id":"","url":"https://api.github.com/users/Waldz","html_url":"https://github.com/Waldz","followers_url":"https://api.github.com/users/Waldz/followers","following_url":"https://api.github.com/users/Waldz/following{/other_user}","gists_url":"https://api.github.com/users/Waldz/gists{/gist_id}","starred_url":"https://api.github.com/users/Waldz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waldz/subscriptions","organizations_url":"https://api.github.com/users/Waldz/orgs","repos_url":"https://api.github.com/users/Waldz/repos","events_url":"https://api.github.com/users/Waldz/events{/privacy}","received_events_url":"https://api.github.com/users/Waldz/received_events","type":"User","site_admin":false},"assignees":[{"login":"Waldz","id":2713911,"node_id":"MDQ6VXNlcjI3MTM5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/2713911?v=4","gravatar_id":"","url":"https://api.github.com/users/Waldz","html_url":"https://github.com/Waldz","followers_url":"https://api.github.com/users/Waldz/followers","following_url":"https://api.github.com/users/Waldz/following{/other_user}","gists_url":"https://api.github.com/users/Waldz/gists{/gist_id}","starred_url":"https://api.github.com/users/Waldz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waldz/subscriptions","organizations_url":"https://api.github.com/users/Waldz/orgs","repos_url":"https://api.github.com/users/Waldz/repos","events_url":"https://api.github.com/users/Waldz/events{/privacy}","received_events_url":"https://api.github.com/users/Waldz/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mysteriumnetwork/node/pulls/392/commits","review_comments_url":"https://api.github.com/repos/mysteriumnetwork/node/pulls/392/comments","review_comment_url":"https://api.github.com/repos/mysteriumnetwork/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mysteriumnetwork/node/issues/392/comments","statuses_url":"https://api.github.com/repos/mysteriumnetwork/node/statuses/e6e338482e6345799b5f3531c3208a49c1e52a3c","head":{"label":"Waldz:feature/plugable-openvpn-service","ref":"feature/plugable-openvpn-service","sha":"e6e338482e6345799b5f3531c3208a49c1e52a3c","user":{"login":"Waldz","id":2713911,"node_id":"MDQ6VXNlcjI3MTM5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/2713911?v=4","gravatar_id":"","url":"https://api.github.com/users/Waldz","html_url":"https://github.com/Waldz","followers_url":"https://api.github.com/users/Waldz/followers","following_url":"https://api.github.com/users/Waldz/following{/other_user}","gists_url":"https://api.github.com/users/Waldz/gists{/gist_id}","starred_url":"https://api.github.com/users/Waldz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waldz/subscriptions","organizations_url":"https://api.github.com/users/Waldz/orgs","repos_url":"https://api.github.com/users/Waldz/repos","events_url":"https://api.github.com/users/Waldz/events{/privacy}","received_events_url":"https://api.github.com/users/Waldz/received_events","type":"User","site_admin":false},"repo":{"id":139636732,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk2MzY3MzI=","name":"node","full_name":"Waldz/node","private":false,"owner":{"login":"Waldz","id":2713911,"node_id":"MDQ6VXNlcjI3MTM5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/2713911?v=4","gravatar_id":"","url":"https://api.github.com/users/Waldz","html_url":"https://github.com/Waldz","followers_url":"https://api.github.com/users/Waldz/followers","following_url":"https://api.github.com/users/Waldz/following{/other_user}","gists_url":"https://api.github.com/users/Waldz/gists{/gist_id}","starred_url":"https://api.github.com/users/Waldz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waldz/subscriptions","organizations_url":"https://api.github.com/users/Waldz/orgs","repos_url":"https://api.github.com/users/Waldz/repos","events_url":"https://api.github.com/users/Waldz/events{/privacy}","received_events_url":"https://api.github.com/users/Waldz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Waldz/node","description":"Mysterium Node - VPN server and client for Mysterium Network","fork":true,"url":"https://api.github.com/repos/Waldz/node","forks_url":"https://api.github.com/repos/Waldz/node/forks","keys_url":"https://api.github.com/repos/Waldz/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Waldz/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Waldz/node/teams","hooks_url":"https://api.github.com/repos/Waldz/node/hooks","issue_events_url":"https://api.github.com/repos/Waldz/node/issues/events{/number}","events_url":"https://api.github.com/repos/Waldz/node/events","assignees_url":"https://api.github.com/repos/Waldz/node/assignees{/user}","branches_url":"https://api.github.com/repos/Waldz/node/branches{/branch}","tags_url":"https://api.github.com/repos/Waldz/node/tags","blobs_url":"https://api.github.com/repos/Waldz/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Waldz/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Waldz/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/Waldz/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Waldz/node/statuses/{sha}","languages_url":"https://api.github.com/repos/Waldz/node/languages","stargazers_url":"https://api.github.com/repos/Waldz/node/stargazers","contributors_url":"https://api.github.com/repos/Waldz/node/contributors","subscribers_url":"https://api.github.com/repos/Waldz/node/subscribers","subscription_url":"https://api.github.com/repos/Waldz/node/subscription","commits_url":"https://api.github.com/repos/Waldz/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/Waldz/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/Waldz/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/Waldz/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/Waldz/node/contents/{+path}","compare_url":"https://api.github.com/repos/Waldz/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Waldz/node/merges","archive_url":"https://api.github.com/repos/Waldz/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Waldz/node/downloads","issues_url":"https://api.github.com/repos/Waldz/node/issues{/number}","pulls_url":"https://api.github.com/repos/Waldz/node/pulls{/number}","milestones_url":"https://api.github.com/repos/Waldz/node/milestones{/number}","notifications_url":"https://api.github.com/repos/Waldz/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Waldz/node/labels{/name}","releases_url":"https://api.github.com/repos/Waldz/node/releases{/id}","deployments_url":"https://api.github.com/repos/Waldz/node/deployments","created_at":"2018-07-03T21:02:44Z","updated_at":"2018-07-17T08:11:58Z","pushed_at":"2018-09-20T12:43:04Z","git_url":"git://github.com/Waldz/node.git","ssh_url":"git@github.com:Waldz/node.git","clone_url":"https://github.com/Waldz/node.git","svn_url":"https://github.com/Waldz/node","homepage":"https://mysterium.network/","size":4589,"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":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mysteriumnetwork:master","ref":"master","sha":"fdf5eaa742283c7df2dbc389db999737c6e71957","user":{"login":"mysteriumnetwork","id":23056638,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDU2NjM4","avatar_url":"https://avatars3.githubusercontent.com/u/23056638?v=4","gravatar_id":"","url":"https://api.github.com/users/mysteriumnetwork","html_url":"https://github.com/mysteriumnetwork","followers_url":"https://api.github.com/users/mysteriumnetwork/followers","following_url":"https://api.github.com/users/mysteriumnetwork/following{/other_user}","gists_url":"https://api.github.com/users/mysteriumnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/mysteriumnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysteriumnetwork/subscriptions","organizations_url":"https://api.github.com/users/mysteriumnetwork/orgs","repos_url":"https://api.github.com/users/mysteriumnetwork/repos","events_url":"https://api.github.com/users/mysteriumnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/mysteriumnetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":80073079,"node_id":"MDEwOlJlcG9zaXRvcnk4MDA3MzA3OQ==","name":"node","full_name":"mysteriumnetwork/node","private":false,"owner":{"login":"mysteriumnetwork","id":23056638,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDU2NjM4","avatar_url":"https://avatars3.githubusercontent.com/u/23056638?v=4","gravatar_id":"","url":"https://api.github.com/users/mysteriumnetwork","html_url":"https://github.com/mysteriumnetwork","followers_url":"https://api.github.com/users/mysteriumnetwork/followers","following_url":"https://api.github.com/users/mysteriumnetwork/following{/other_user}","gists_url":"https://api.github.com/users/mysteriumnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/mysteriumnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysteriumnetwork/subscriptions","organizations_url":"https://api.github.com/users/mysteriumnetwork/orgs","repos_url":"https://api.github.com/users/mysteriumnetwork/repos","events_url":"https://api.github.com/users/mysteriumnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/mysteriumnetwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mysteriumnetwork/node","description":"Mysterium Node - VPN server and client for Mysterium Network","fork":false,"url":"https://api.github.com/repos/mysteriumnetwork/node","forks_url":"https://api.github.com/repos/mysteriumnetwork/node/forks","keys_url":"https://api.github.com/repos/mysteriumnetwork/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysteriumnetwork/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysteriumnetwork/node/teams","hooks_url":"https://api.github.com/repos/mysteriumnetwork/node/hooks","issue_events_url":"https://api.github.com/repos/mysteriumnetwork/node/issues/events{/number}","events_url":"https://api.github.com/repos/mysteriumnetwork/node/events","assignees_url":"https://api.github.com/repos/mysteriumnetwork/node/assignees{/user}","branches_url":"https://api.github.com/repos/mysteriumnetwork/node/branches{/branch}","tags_url":"https://api.github.com/repos/mysteriumnetwork/node/tags","blobs_url":"https://api.github.com/repos/mysteriumnetwork/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysteriumnetwork/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysteriumnetwork/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysteriumnetwork/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysteriumnetwork/node/statuses/{sha}","languages_url":"https://api.github.com/repos/mysteriumnetwork/node/languages","stargazers_url":"https://api.github.com/repos/mysteriumnetwork/node/stargazers","contributors_url":"https://api.github.com/repos/mysteriumnetwork/node/contributors","subscribers_url":"https://api.github.com/repos/mysteriumnetwork/node/subscribers","subscription_url":"https://api.github.com/repos/mysteriumnetwork/node/subscription","commits_url":"https://api.github.com/repos/mysteriumnetwork/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysteriumnetwork/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysteriumnetwork/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysteriumnetwork/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysteriumnetwork/node/contents/{+path}","compare_url":"https://api.github.com/repos/mysteriumnetwork/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysteriumnetwork/node/merges","archive_url":"https://api.github.com/repos/mysteriumnetwork/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysteriumnetwork/node/downloads","issues_url":"https://api.github.com/repos/mysteriumnetwork/node/issues{/number}","pulls_url":"https://api.github.com/repos/mysteriumnetwork/node/pulls{/number}","milestones_url":"https://api.github.com/repos/mysteriumnetwork/node/milestones{/number}","notifications_url":"https://api.github.com/repos/mysteriumnetwork/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysteriumnetwork/node/labels{/name}","releases_url":"https://api.github.com/repos/mysteriumnetwork/node/releases{/id}","deployments_url":"https://api.github.com/repos/mysteriumnetwork/node/deployments","created_at":"2017-01-26T00:43:08Z","updated_at":"2018-09-20T12:43:21Z","pushed_at":"2018-09-20T15:14:21Z","git_url":"git://github.com/mysteriumnetwork/node.git","ssh_url":"git@github.com:mysteriumnetwork/node.git","clone_url":"https://github.com/mysteriumnetwork/node.git","svn_url":"https://github.com/mysteriumnetwork/node","homepage":"https://mysterium.network/","size":9231,"stargazers_count":465,"watchers_count":465,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":74,"open_issues":58,"watchers":465,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mysteriumnetwork/node/pulls/392"},"html":{"href":"https://github.com/mysteriumnetwork/node/pull/392"},"issue":{"href":"https://api.github.com/repos/mysteriumnetwork/node/issues/392"},"comments":{"href":"https://api.github.com/repos/mysteriumnetwork/node/issues/392/comments"},"review_comments":{"href":"https://api.github.com/repos/mysteriumnetwork/node/pulls/392/comments"},"review_comment":{"href":"https://api.github.com/repos/mysteriumnetwork/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mysteriumnetwork/node/pulls/392/commits"},"statuses":{"href":"https://api.github.com/repos/mysteriumnetwork/node/statuses/e6e338482e6345799b5f3531c3208a49c1e52a3c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"soffokl"}}