{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/finagle/pulls/comments/46578771","id":46578771,"diff_hunk":"@@ -0,0 +1,141 @@\n+package com.twitter.finagle.redis\n+\n+import _root_.java.lang.{ Long => JLong, Boolean => JBoolean }\n+import scala.collection.immutable.{ Set => ImmutableSet }\n+import com.twitter.finagle.redis.protocol._\n+import com.twitter.finagle.redis.protocol.commands._\n+import com.twitter.finagle.redis.util._\n+import com.twitter.util.Future\n+import org.jboss.netty.buffer.ChannelBuffer\n+import java.net.InetAddress\n+import java.net.InetSocketAddress\n+\n+trait SentinelCommands { self: BaseClient =>\n+\n+  import SentinelClient._\n+\n+  /**\n+   * Show a list of monitored masters and their state.\n+   */\n+  def masters(): Future[List[MasterNode]] =\n+    doRequest(SentinelMasters()) {\n+      case MBulkReply(masters) => Future.value(\n+        masters map {\n+          case MBulkReply(messages) => new MasterNode(\n+            returnMap(ReplyFormat.toChannelBuffers(messages)))\n+        })\n+      case EmptyMBulkReply() => Future.value(Nil)\n+    }\n+\n+  /**\n+   * Show the state and info of the specified master.\n+   */\n+  def master(name: ChannelBuffer): Future[MasterNode] =\n+    doRequest(SentinelMaster(name)) {\n+      case MBulkReply(messages) => Future.value(","path":"finagle-redis/src/main/scala/com/twitter/finagle/redis/SentinelCommands.scala","position":35,"original_position":35,"commit_id":"d8fce6e942219b17daf70308cde6418d65d1605e","original_commit_id":"5a94fe76c89889c9edc5f15489dbf2856fe070a0","user":{"login":"thirstycrow","id":1327305,"avatar_url":"https://avatars.githubusercontent.com/u/1327305?v=3","gravatar_id":"","url":"https://api.github.com/users/thirstycrow","html_url":"https://github.com/thirstycrow","followers_url":"https://api.github.com/users/thirstycrow/followers","following_url":"https://api.github.com/users/thirstycrow/following{/other_user}","gists_url":"https://api.github.com/users/thirstycrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thirstycrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thirstycrow/subscriptions","organizations_url":"https://api.github.com/users/thirstycrow/orgs","repos_url":"https://api.github.com/users/thirstycrow/repos","events_url":"https://api.github.com/users/thirstycrow/events{/privacy}","received_events_url":"https://api.github.com/users/thirstycrow/received_events","type":"User","site_admin":false},"body":"It always returns something about the master, including its status, unless it is removed. In that case, an exception will be thrown.","created_at":"2015-12-03T16:59:44Z","updated_at":"2015-12-03T16:59:44Z","html_url":"https://github.com/twitter/finagle/pull/443#discussion_r46578771","pull_request_url":"https://api.github.com/repos/twitter/finagle/pulls/443","_links":{"self":{"href":"https://api.github.com/repos/twitter/finagle/pulls/comments/46578771"},"html":{"href":"https://github.com/twitter/finagle/pull/443#discussion_r46578771"},"pull_request":{"href":"https://api.github.com/repos/twitter/finagle/pulls/443"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/finagle/pulls/443","id":52489190,"html_url":"https://github.com/twitter/finagle/pull/443","diff_url":"https://github.com/twitter/finagle/pull/443.diff","patch_url":"https://github.com/twitter/finagle/pull/443.patch","issue_url":"https://api.github.com/repos/twitter/finagle/issues/443","number":443,"state":"open","locked":false,"title":"Redis sentinel support","user":{"login":"thirstycrow","id":1327305,"avatar_url":"https://avatars.githubusercontent.com/u/1327305?v=3","gravatar_id":"","url":"https://api.github.com/users/thirstycrow","html_url":"https://github.com/thirstycrow","followers_url":"https://api.github.com/users/thirstycrow/followers","following_url":"https://api.github.com/users/thirstycrow/following{/other_user}","gists_url":"https://api.github.com/users/thirstycrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thirstycrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thirstycrow/subscriptions","organizations_url":"https://api.github.com/users/thirstycrow/orgs","repos_url":"https://api.github.com/users/thirstycrow/repos","events_url":"https://api.github.com/users/thirstycrow/events{/privacy}","received_events_url":"https://api.github.com/users/thirstycrow/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-03T03:57:24Z","updated_at":"2015-12-03T16:59:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"800fc66c6508c81b7f9370a9ff5ac059504252e8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twitter/finagle/pulls/443/commits","review_comments_url":"https://api.github.com/repos/twitter/finagle/pulls/443/comments","review_comment_url":"https://api.github.com/repos/twitter/finagle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twitter/finagle/issues/443/comments","statuses_url":"https://api.github.com/repos/twitter/finagle/statuses/d8fce6e942219b17daf70308cde6418d65d1605e","head":{"label":"thirstycrow:sentinel-support","ref":"sentinel-support","sha":"d8fce6e942219b17daf70308cde6418d65d1605e","user":{"login":"thirstycrow","id":1327305,"avatar_url":"https://avatars.githubusercontent.com/u/1327305?v=3","gravatar_id":"","url":"https://api.github.com/users/thirstycrow","html_url":"https://github.com/thirstycrow","followers_url":"https://api.github.com/users/thirstycrow/followers","following_url":"https://api.github.com/users/thirstycrow/following{/other_user}","gists_url":"https://api.github.com/users/thirstycrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thirstycrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thirstycrow/subscriptions","organizations_url":"https://api.github.com/users/thirstycrow/orgs","repos_url":"https://api.github.com/users/thirstycrow/repos","events_url":"https://api.github.com/users/thirstycrow/events{/privacy}","received_events_url":"https://api.github.com/users/thirstycrow/received_events","type":"User","site_admin":false},"repo":{"id":21188045,"name":"finagle","full_name":"thirstycrow/finagle","owner":{"login":"thirstycrow","id":1327305,"avatar_url":"https://avatars.githubusercontent.com/u/1327305?v=3","gravatar_id":"","url":"https://api.github.com/users/thirstycrow","html_url":"https://github.com/thirstycrow","followers_url":"https://api.github.com/users/thirstycrow/followers","following_url":"https://api.github.com/users/thirstycrow/following{/other_user}","gists_url":"https://api.github.com/users/thirstycrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thirstycrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thirstycrow/subscriptions","organizations_url":"https://api.github.com/users/thirstycrow/orgs","repos_url":"https://api.github.com/users/thirstycrow/repos","events_url":"https://api.github.com/users/thirstycrow/events{/privacy}","received_events_url":"https://api.github.com/users/thirstycrow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thirstycrow/finagle","description":"A fault tolerant, protocol-agnostic RPC system","fork":true,"url":"https://api.github.com/repos/thirstycrow/finagle","forks_url":"https://api.github.com/repos/thirstycrow/finagle/forks","keys_url":"https://api.github.com/repos/thirstycrow/finagle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thirstycrow/finagle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thirstycrow/finagle/teams","hooks_url":"https://api.github.com/repos/thirstycrow/finagle/hooks","issue_events_url":"https://api.github.com/repos/thirstycrow/finagle/issues/events{/number}","events_url":"https://api.github.com/repos/thirstycrow/finagle/events","assignees_url":"https://api.github.com/repos/thirstycrow/finagle/assignees{/user}","branches_url":"https://api.github.com/repos/thirstycrow/finagle/branches{/branch}","tags_url":"https://api.github.com/repos/thirstycrow/finagle/tags","blobs_url":"https://api.github.com/repos/thirstycrow/finagle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thirstycrow/finagle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thirstycrow/finagle/git/refs{/sha}","trees_url":"https://api.github.com/repos/thirstycrow/finagle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thirstycrow/finagle/statuses/{sha}","languages_url":"https://api.github.com/repos/thirstycrow/finagle/languages","stargazers_url":"https://api.github.com/repos/thirstycrow/finagle/stargazers","contributors_url":"https://api.github.com/repos/thirstycrow/finagle/contributors","subscribers_url":"https://api.github.com/repos/thirstycrow/finagle/subscribers","subscription_url":"https://api.github.com/repos/thirstycrow/finagle/subscription","commits_url":"https://api.github.com/repos/thirstycrow/finagle/commits{/sha}","git_commits_url":"https://api.github.com/repos/thirstycrow/finagle/git/commits{/sha}","comments_url":"https://api.github.com/repos/thirstycrow/finagle/comments{/number}","issue_comment_url":"https://api.github.com/repos/thirstycrow/finagle/issues/comments{/number}","contents_url":"https://api.github.com/repos/thirstycrow/finagle/contents/{+path}","compare_url":"https://api.github.com/repos/thirstycrow/finagle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thirstycrow/finagle/merges","archive_url":"https://api.github.com/repos/thirstycrow/finagle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thirstycrow/finagle/downloads","issues_url":"https://api.github.com/repos/thirstycrow/finagle/issues{/number}","pulls_url":"https://api.github.com/repos/thirstycrow/finagle/pulls{/number}","milestones_url":"https://api.github.com/repos/thirstycrow/finagle/milestones{/number}","notifications_url":"https://api.github.com/repos/thirstycrow/finagle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thirstycrow/finagle/labels{/name}","releases_url":"https://api.github.com/repos/thirstycrow/finagle/releases{/id}","created_at":"2014-06-25T02:47:30Z","updated_at":"2015-07-02T15:32:00Z","pushed_at":"2015-12-03T16:35:56Z","git_url":"git://github.com/thirstycrow/finagle.git","ssh_url":"git@github.com:thirstycrow/finagle.git","clone_url":"https://github.com/thirstycrow/finagle.git","svn_url":"https://github.com/thirstycrow/finagle","homepage":"http://twitter.github.io/finagle","size":23852,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"twitter:develop","ref":"develop","sha":"e18de6de58118c96e00e3d62ce6dc379d921b4e9","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":1007362,"name":"finagle","full_name":"twitter/finagle","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/finagle","description":"A fault tolerant, protocol-agnostic RPC system","fork":false,"url":"https://api.github.com/repos/twitter/finagle","forks_url":"https://api.github.com/repos/twitter/finagle/forks","keys_url":"https://api.github.com/repos/twitter/finagle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/finagle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/finagle/teams","hooks_url":"https://api.github.com/repos/twitter/finagle/hooks","issue_events_url":"https://api.github.com/repos/twitter/finagle/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/finagle/events","assignees_url":"https://api.github.com/repos/twitter/finagle/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/finagle/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/finagle/tags","blobs_url":"https://api.github.com/repos/twitter/finagle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/finagle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/finagle/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/finagle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/finagle/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/finagle/languages","stargazers_url":"https://api.github.com/repos/twitter/finagle/stargazers","contributors_url":"https://api.github.com/repos/twitter/finagle/contributors","subscribers_url":"https://api.github.com/repos/twitter/finagle/subscribers","subscription_url":"https://api.github.com/repos/twitter/finagle/subscription","commits_url":"https://api.github.com/repos/twitter/finagle/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/finagle/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/finagle/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/finagle/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/finagle/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/finagle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/finagle/merges","archive_url":"https://api.github.com/repos/twitter/finagle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/finagle/downloads","issues_url":"https://api.github.com/repos/twitter/finagle/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/finagle/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/finagle/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/finagle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/finagle/labels{/name}","releases_url":"https://api.github.com/repos/twitter/finagle/releases{/id}","created_at":"2010-10-19T22:10:09Z","updated_at":"2015-12-03T15:10:28Z","pushed_at":"2015-12-03T16:35:58Z","git_url":"git://github.com/twitter/finagle.git","ssh_url":"git@github.com:twitter/finagle.git","clone_url":"https://github.com/twitter/finagle.git","svn_url":"https://github.com/twitter/finagle","homepage":"http://twitter.github.io/finagle","size":35745,"stargazers_count":4034,"watchers_count":4034,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":787,"mirror_url":null,"open_issues_count":39,"forks":787,"open_issues":39,"watchers":4034,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/finagle/pulls/443"},"html":{"href":"https://github.com/twitter/finagle/pull/443"},"issue":{"href":"https://api.github.com/repos/twitter/finagle/issues/443"},"comments":{"href":"https://api.github.com/repos/twitter/finagle/issues/443/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/finagle/pulls/443/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/finagle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twitter/finagle/pulls/443/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/finagle/statuses/d8fce6e942219b17daf70308cde6418d65d1605e"}}}}