{"action":"created","comment":{"url":"https://api.github.com/repos/libp2p/go-libp2p/pulls/comments/177526283","pull_request_review_id":107412868,"id":177526283,"diff_hunk":"@@ -0,0 +1,171 @@\n+package config\n+\n+import (\n+\t\"context\"\n+\t\"fmt\"\n+\n+\tbhost \"github.com/libp2p/go-libp2p/p2p/host/basic\"\n+\n+\tlogging \"github.com/ipfs/go-log\"\n+\tcircuit \"github.com/libp2p/go-libp2p-circuit\"\n+\tcrypto \"github.com/libp2p/go-libp2p-crypto\"\n+\thost \"github.com/libp2p/go-libp2p-host\"\n+\tifconnmgr \"github.com/libp2p/go-libp2p-interface-connmgr\"\n+\tpnet \"github.com/libp2p/go-libp2p-interface-pnet\"\n+\tmetrics \"github.com/libp2p/go-libp2p-metrics\"\n+\tinet \"github.com/libp2p/go-libp2p-net\"\n+\tpeer \"github.com/libp2p/go-libp2p-peer\"\n+\tpstore \"github.com/libp2p/go-libp2p-peerstore\"\n+\tswarm \"github.com/libp2p/go-libp2p-swarm\"\n+\ttptu \"github.com/libp2p/go-libp2p-transport-upgrader\"\n+\tfilter \"github.com/libp2p/go-maddr-filter\"\n+\tma \"github.com/multiformats/go-multiaddr\"\n+)\n+\n+var log = logging.Logger(\"p2p-config\")\n+\n+// AddrsFactory is a function that takes a set of multiaddrs we're listening on and\n+// returns the set of multiaddrs we should advertise to the network.\n+type AddrsFactory = bhost.AddrsFactory\n+\n+// NATManagerC is a NATManager constructor.\n+type NATManagerC func(inet.Network) bhost.NATManager\n+\n+// Config describes a set of settings for a libp2p node\n+//\n+// This is *not* a stable interface. Use the options defined in the root\n+// package.\n+type Config struct {\n+\tTransports         []TptC\n+\tMuxers             []MsMuxC\n+\tSecurityTransports []MsSecC\n+\tListenAddrs        []ma.Multiaddr\n+\tPeerKey            crypto.PrivKey\n+\tPeerstore          pstore.Peerstore\n+\tProtector          pnet.Protector\n+\tReporter           metrics.Reporter\n+\tRelay              bool\n+\tRelayOpts          []circuit.RelayOpt\n+\tInsecure           bool\n+\tConnManager        ifconnmgr.ConnManager\n+\tAddrsFactory       bhost.AddrsFactory\n+\tFilters            *filter.Filters\n+\tNATManager         NATManagerC","path":"config/config.go","position":53,"original_position":53,"commit_id":"29228f250fa6b70ad45cfef02386353a8c36c0f9","original_commit_id":"29228f250fa6b70ad45cfef02386353a8c36c0f9","user":{"login":"Kubuxu","id":2259282,"avatar_url":"https://avatars3.githubusercontent.com/u/2259282?v=4","gravatar_id":"","url":"https://api.github.com/users/Kubuxu","html_url":"https://github.com/Kubuxu","followers_url":"https://api.github.com/users/Kubuxu/followers","following_url":"https://api.github.com/users/Kubuxu/following{/other_user}","gists_url":"https://api.github.com/users/Kubuxu/gists{/gist_id}","starred_url":"https://api.github.com/users/Kubuxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kubuxu/subscriptions","organizations_url":"https://api.github.com/users/Kubuxu/orgs","repos_url":"https://api.github.com/users/Kubuxu/repos","events_url":"https://api.github.com/users/Kubuxu/events{/privacy}","received_events_url":"https://api.github.com/users/Kubuxu/received_events","type":"User","site_admin":false},"body":"Some spacing ques would be good here. Like `Relay ` and `RelayOpts` can have their own section.","created_at":"2018-03-27T18:28:02Z","updated_at":"2018-03-27T18:28:02Z","html_url":"https://github.com/libp2p/go-libp2p/pull/299#discussion_r177526283","pull_request_url":"https://api.github.com/repos/libp2p/go-libp2p/pulls/299","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/libp2p/go-libp2p/pulls/comments/177526283"},"html":{"href":"https://github.com/libp2p/go-libp2p/pull/299#discussion_r177526283"},"pull_request":{"href":"https://api.github.com/repos/libp2p/go-libp2p/pulls/299"}}},"pull_request":{"url":"https://api.github.com/repos/libp2p/go-libp2p/pulls/299","id":174555090,"html_url":"https://github.com/libp2p/go-libp2p/pull/299","diff_url":"https://github.com/libp2p/go-libp2p/pull/299.diff","patch_url":"https://github.com/libp2p/go-libp2p/pull/299.patch","issue_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/299","number":299,"state":"open","locked":false,"title":"refactor for transport changes","user":{"login":"Stebalien","id":310393,"avatar_url":"https://avatars2.githubusercontent.com/u/310393?v=4","gravatar_id":"","url":"https://api.github.com/users/Stebalien","html_url":"https://github.com/Stebalien","followers_url":"https://api.github.com/users/Stebalien/followers","following_url":"https://api.github.com/users/Stebalien/following{/other_user}","gists_url":"https://api.github.com/users/Stebalien/gists{/gist_id}","starred_url":"https://api.github.com/users/Stebalien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stebalien/subscriptions","organizations_url":"https://api.github.com/users/Stebalien/orgs","repos_url":"https://api.github.com/users/Stebalien/repos","events_url":"https://api.github.com/users/Stebalien/events{/privacy}","received_events_url":"https://api.github.com/users/Stebalien/received_events","type":"User","site_admin":false},"body":"Also, make the libp2p constructor fully useful. There should now be no need to manually construct a swarm/host. That's actually where most of the new code comes from (hence the +450 lines of (actual) code). This allows me to actually use the libp2p constructor in go-ipfs.\r\n\r\nDO NOT MERGE (yet)\r\nPart of: libp2p/go-libp2p#297","created_at":"2018-03-13T04:25:04Z","updated_at":"2018-03-27T18:28:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3121e4cd8df005bccce41ebf93bb5d9aae3c8083","assignee":{"login":"Stebalien","id":310393,"avatar_url":"https://avatars2.githubusercontent.com/u/310393?v=4","gravatar_id":"","url":"https://api.github.com/users/Stebalien","html_url":"https://github.com/Stebalien","followers_url":"https://api.github.com/users/Stebalien/followers","following_url":"https://api.github.com/users/Stebalien/following{/other_user}","gists_url":"https://api.github.com/users/Stebalien/gists{/gist_id}","starred_url":"https://api.github.com/users/Stebalien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stebalien/subscriptions","organizations_url":"https://api.github.com/users/Stebalien/orgs","repos_url":"https://api.github.com/users/Stebalien/repos","events_url":"https://api.github.com/users/Stebalien/events{/privacy}","received_events_url":"https://api.github.com/users/Stebalien/received_events","type":"User","site_admin":false},"assignees":[{"login":"Stebalien","id":310393,"avatar_url":"https://avatars2.githubusercontent.com/u/310393?v=4","gravatar_id":"","url":"https://api.github.com/users/Stebalien","html_url":"https://github.com/Stebalien","followers_url":"https://api.github.com/users/Stebalien/followers","following_url":"https://api.github.com/users/Stebalien/following{/other_user}","gists_url":"https://api.github.com/users/Stebalien/gists{/gist_id}","starred_url":"https://api.github.com/users/Stebalien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stebalien/subscriptions","organizations_url":"https://api.github.com/users/Stebalien/orgs","repos_url":"https://api.github.com/users/Stebalien/repos","events_url":"https://api.github.com/users/Stebalien/events{/privacy}","received_events_url":"https://api.github.com/users/Stebalien/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":419430610,"url":"https://api.github.com/repos/libp2p/go-libp2p/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/libp2p/go-libp2p/pulls/299/commits","review_comments_url":"https://api.github.com/repos/libp2p/go-libp2p/pulls/299/comments","review_comment_url":"https://api.github.com/repos/libp2p/go-libp2p/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/299/comments","statuses_url":"https://api.github.com/repos/libp2p/go-libp2p/statuses/29228f250fa6b70ad45cfef02386353a8c36c0f9","head":{"label":"libp2p:feat/refactor","ref":"feat/refactor","sha":"29228f250fa6b70ad45cfef02386353a8c36c0f9","user":{"login":"libp2p","id":14838238,"avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"repo":{"id":43465675,"name":"go-libp2p","full_name":"libp2p/go-libp2p","owner":{"login":"libp2p","id":14838238,"avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libp2p/go-libp2p","description":"libp2p implementation in Go","fork":false,"url":"https://api.github.com/repos/libp2p/go-libp2p","forks_url":"https://api.github.com/repos/libp2p/go-libp2p/forks","keys_url":"https://api.github.com/repos/libp2p/go-libp2p/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libp2p/go-libp2p/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libp2p/go-libp2p/teams","hooks_url":"https://api.github.com/repos/libp2p/go-libp2p/hooks","issue_events_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/events{/number}","events_url":"https://api.github.com/repos/libp2p/go-libp2p/events","assignees_url":"https://api.github.com/repos/libp2p/go-libp2p/assignees{/user}","branches_url":"https://api.github.com/repos/libp2p/go-libp2p/branches{/branch}","tags_url":"https://api.github.com/repos/libp2p/go-libp2p/tags","blobs_url":"https://api.github.com/repos/libp2p/go-libp2p/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libp2p/go-libp2p/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libp2p/go-libp2p/git/refs{/sha}","trees_url":"https://api.github.com/repos/libp2p/go-libp2p/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libp2p/go-libp2p/statuses/{sha}","languages_url":"https://api.github.com/repos/libp2p/go-libp2p/languages","stargazers_url":"https://api.github.com/repos/libp2p/go-libp2p/stargazers","contributors_url":"https://api.github.com/repos/libp2p/go-libp2p/contributors","subscribers_url":"https://api.github.com/repos/libp2p/go-libp2p/subscribers","subscription_url":"https://api.github.com/repos/libp2p/go-libp2p/subscription","commits_url":"https://api.github.com/repos/libp2p/go-libp2p/commits{/sha}","git_commits_url":"https://api.github.com/repos/libp2p/go-libp2p/git/commits{/sha}","comments_url":"https://api.github.com/repos/libp2p/go-libp2p/comments{/number}","issue_comment_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/comments{/number}","contents_url":"https://api.github.com/repos/libp2p/go-libp2p/contents/{+path}","compare_url":"https://api.github.com/repos/libp2p/go-libp2p/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libp2p/go-libp2p/merges","archive_url":"https://api.github.com/repos/libp2p/go-libp2p/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libp2p/go-libp2p/downloads","issues_url":"https://api.github.com/repos/libp2p/go-libp2p/issues{/number}","pulls_url":"https://api.github.com/repos/libp2p/go-libp2p/pulls{/number}","milestones_url":"https://api.github.com/repos/libp2p/go-libp2p/milestones{/number}","notifications_url":"https://api.github.com/repos/libp2p/go-libp2p/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libp2p/go-libp2p/labels{/name}","releases_url":"https://api.github.com/repos/libp2p/go-libp2p/releases{/id}","deployments_url":"https://api.github.com/repos/libp2p/go-libp2p/deployments","created_at":"2015-09-30T23:24:32Z","updated_at":"2018-03-27T17:43:23Z","pushed_at":"2018-03-26T22:52:21Z","git_url":"git://github.com/libp2p/go-libp2p.git","ssh_url":"git@github.com:libp2p/go-libp2p.git","clone_url":"https://github.com/libp2p/go-libp2p.git","svn_url":"https://github.com/libp2p/go-libp2p","homepage":"","size":8021,"stargazers_count":1077,"watchers_count":1077,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":129,"mirror_url":null,"archived":false,"open_issues_count":73,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":129,"open_issues":73,"watchers":1077,"default_branch":"master"}},"base":{"label":"libp2p:master","ref":"master","sha":"6877a20c8a91eb0d53244d4c358ed8b6aa085eba","user":{"login":"libp2p","id":14838238,"avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"repo":{"id":43465675,"name":"go-libp2p","full_name":"libp2p/go-libp2p","owner":{"login":"libp2p","id":14838238,"avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libp2p/go-libp2p","description":"libp2p implementation in Go","fork":false,"url":"https://api.github.com/repos/libp2p/go-libp2p","forks_url":"https://api.github.com/repos/libp2p/go-libp2p/forks","keys_url":"https://api.github.com/repos/libp2p/go-libp2p/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libp2p/go-libp2p/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libp2p/go-libp2p/teams","hooks_url":"https://api.github.com/repos/libp2p/go-libp2p/hooks","issue_events_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/events{/number}","events_url":"https://api.github.com/repos/libp2p/go-libp2p/events","assignees_url":"https://api.github.com/repos/libp2p/go-libp2p/assignees{/user}","branches_url":"https://api.github.com/repos/libp2p/go-libp2p/branches{/branch}","tags_url":"https://api.github.com/repos/libp2p/go-libp2p/tags","blobs_url":"https://api.github.com/repos/libp2p/go-libp2p/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libp2p/go-libp2p/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libp2p/go-libp2p/git/refs{/sha}","trees_url":"https://api.github.com/repos/libp2p/go-libp2p/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libp2p/go-libp2p/statuses/{sha}","languages_url":"https://api.github.com/repos/libp2p/go-libp2p/languages","stargazers_url":"https://api.github.com/repos/libp2p/go-libp2p/stargazers","contributors_url":"https://api.github.com/repos/libp2p/go-libp2p/contributors","subscribers_url":"https://api.github.com/repos/libp2p/go-libp2p/subscribers","subscription_url":"https://api.github.com/repos/libp2p/go-libp2p/subscription","commits_url":"https://api.github.com/repos/libp2p/go-libp2p/commits{/sha}","git_commits_url":"https://api.github.com/repos/libp2p/go-libp2p/git/commits{/sha}","comments_url":"https://api.github.com/repos/libp2p/go-libp2p/comments{/number}","issue_comment_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/comments{/number}","contents_url":"https://api.github.com/repos/libp2p/go-libp2p/contents/{+path}","compare_url":"https://api.github.com/repos/libp2p/go-libp2p/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libp2p/go-libp2p/merges","archive_url":"https://api.github.com/repos/libp2p/go-libp2p/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libp2p/go-libp2p/downloads","issues_url":"https://api.github.com/repos/libp2p/go-libp2p/issues{/number}","pulls_url":"https://api.github.com/repos/libp2p/go-libp2p/pulls{/number}","milestones_url":"https://api.github.com/repos/libp2p/go-libp2p/milestones{/number}","notifications_url":"https://api.github.com/repos/libp2p/go-libp2p/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libp2p/go-libp2p/labels{/name}","releases_url":"https://api.github.com/repos/libp2p/go-libp2p/releases{/id}","deployments_url":"https://api.github.com/repos/libp2p/go-libp2p/deployments","created_at":"2015-09-30T23:24:32Z","updated_at":"2018-03-27T17:43:23Z","pushed_at":"2018-03-26T22:52:21Z","git_url":"git://github.com/libp2p/go-libp2p.git","ssh_url":"git@github.com:libp2p/go-libp2p.git","clone_url":"https://github.com/libp2p/go-libp2p.git","svn_url":"https://github.com/libp2p/go-libp2p","homepage":"","size":8021,"stargazers_count":1077,"watchers_count":1077,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":129,"mirror_url":null,"archived":false,"open_issues_count":73,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":129,"open_issues":73,"watchers":1077,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libp2p/go-libp2p/pulls/299"},"html":{"href":"https://github.com/libp2p/go-libp2p/pull/299"},"issue":{"href":"https://api.github.com/repos/libp2p/go-libp2p/issues/299"},"comments":{"href":"https://api.github.com/repos/libp2p/go-libp2p/issues/299/comments"},"review_comments":{"href":"https://api.github.com/repos/libp2p/go-libp2p/pulls/299/comments"},"review_comment":{"href":"https://api.github.com/repos/libp2p/go-libp2p/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libp2p/go-libp2p/pulls/299/commits"},"statuses":{"href":"https://api.github.com/repos/libp2p/go-libp2p/statuses/29228f250fa6b70ad45cfef02386353a8c36c0f9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Kubuxu"}}