Navigation Menu

Skip to content

Commit

Permalink
Move implementation of remote commands under lib/droonga/serf
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2015
1 parent 2df70b2 commit b3192cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions lib/droonga/command/serf_event_handler.rb
Expand Up @@ -16,7 +16,7 @@
require "json"
require "fileutils"

require "droonga/command/remote"
require "droonga/serf/remote_command"

module Droonga
module Command
Expand Down Expand Up @@ -72,7 +72,7 @@ def detect_command_class
@payload = JSON.parse($stdin.gets)
detect_command_class_from_custom_event(ENV["SERF_QUERY_NAME"])
when "member-join", "member-leave", "member-update", "member-reap"
Remote::UpdateClusterState
Serf::RemtoeCommand::UpdateClusterState
else
nil
end
Expand All @@ -81,19 +81,19 @@ def detect_command_class
def detect_command_class_from_custom_event(event_name)
case event_name
when "change_role"
Remote::ChangeRole
Serf::RemtoeCommand::ChangeRole
when "accept_messages_newer_than"
Remote::AcceptMessagesNewerThan
Serf::RemtoeCommand::AcceptMessagesNewerThan
when "join"
Remote::Join
Serf::RemtoeCommand::Join
when "unjoin"
Remote::Unjoin
Serf::RemtoeCommand::Unjoin
when "set_replicas"
Remote::SetReplicas
Serf::RemtoeCommand::SetReplicas
when "add_replicas"
Remote::AddReplicas
Serf::RemtoeCommand::AddReplicas
when "remove_replicas"
Remote::RemoveReplicas
Serf::RemtoeCommand::RemoveReplicas
else
nil
end
Expand Down
Expand Up @@ -26,8 +26,8 @@
require "droonga/restarter"

module Droonga
module Command
module Remote
module Serf
module RemoteCommand
class Base
attr_reader :response

Expand Down

0 comments on commit b3192cc

Please sign in to comment.