lib/stackify-api-ruby.rb in stackify-api-ruby-1.1.0 vs lib/stackify-api-ruby.rb in stackify-api-ruby-1.2.3
- old
+ new
@@ -8,11 +8,11 @@
module Stackify
INTERNAL_LOG_PREFIX = '[Stackify]'.freeze
STATUSES = { working: 'working', terminating: 'terminating', terminated: 'terminated'}
MODES = { logging: :logging, metrics: :metrics, both: :both }
- TRANSPORT = [DEFAULT = 'default', UNIX_SOCKET = 'agent_socket']
+ TRANSPORT = [DEFAULT = 'default', UNIX_SOCKET = 'agent_socket', AGENT_HTTP = 'agent_http']
autoload :Backtrace, 'stackify/utils/backtrace'
autoload :MsgObject, 'stackify/utils/msg_object'
autoload :ProtobufLogObject, 'stackify/utils/protobuf_log_object'
autoload :Configuration, 'stackify/utils/configuration'
@@ -27,14 +27,16 @@
autoload :LogsSenderWorker, 'stackify/workers/logs_sender_worker'
autoload :MsgsQueueWorker, 'stackify/workers/msgs_queue_worker'
autoload :AddMsgWorker, 'stackify/workers/add_msg_worker'
autoload :MsgsQueue, 'stackify/msgs_queue'
autoload :LoggerClient, 'stackify/logger_client'
- autoload :UnixSocketClient, 'stackify/unix_socket_client'
+ autoload :AgentClient, 'stackify/agent_client'
autoload :TransportSelector, 'stackify/transport_selector'
autoload :LogsSender, 'stackify/logs_sender'
+ autoload :AgentBaseSender, 'stackify/agent_base_sender'
autoload :UnixSocketSender, 'stackify/unix_socket_sender'
+ autoload :AgentHTTPSender, 'stackify/agent_http_sender'
autoload :LoggerProxy, 'stackify/logger_proxy'
autoload :StackifiedError, 'stackify/error'
autoload :StringException, 'stackify/error'
autoload :ErrorsGovernor, 'stackify/errors_governor'
autoload :Metrics, 'stackify/metrics/metrics'
@@ -70,12 +72,12 @@
def logger_client
@logger_client ||= Stackify::LoggerClient.new
end
- def unix_socket_client
- @unix_socket_client ||= Stackify::UnixSocketClient.new
+ def agent_client
+ @agent_client ||= Stackify::AgentClient.new
end
def get_transport
@logger_client.get_transport
end
@@ -143,10 +145,10 @@
t1.join
t3.join if t3
else
Stackify.log_internal_error "Stackify is not properly configured! Errors: #{Stackify.configuration.errors}"
end
- when Stackify::UNIX_SOCKET
+ when Stackify::UNIX_SOCKET, Stackify::AGENT_HTTP
case Stackify.configuration.mode
when MODES[:logging]
start_logging
when MODES[:both]
start_logging