Class: Stackify::TransportSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/stackify/transport_selector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ TransportSelector

Returns a new instance of TransportSelector.



6
7
8
9
10
11
12
13
# File 'lib/stackify/transport_selector.rb', line 6

def initialize type
  case type
  when Stackify::DEFAULT
    @transport = Stackify::LogsSender.new
  when Stackify::UNIX_SOCKET, Stackify::AGENT_HTTP
    @transport = Stackify::AgentClient.new
  end
end

Instance Attribute Details

#transportObject (readonly)

Returns the value of attribute transport.



4
5
6
# File 'lib/stackify/transport_selector.rb', line 4

def transport
  @transport
end