ffwd 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/ffwd.rb +34 -10
- data/lib/ffwd/core.rb +13 -11
- data/lib/ffwd/core/emitter.rb +0 -2
- data/lib/ffwd/core/interface.rb +5 -2
- data/lib/ffwd/core/processor.rb +4 -5
- data/lib/ffwd/debug/monitor_session.rb +3 -6
- data/lib/ffwd/debug/tcp.rb +17 -12
- data/lib/ffwd/handler.rb +1 -1
- data/lib/ffwd/plugin.rb +20 -15
- data/lib/ffwd/plugin/json.rb +12 -20
- data/lib/ffwd/plugin/json/connection.rb +4 -2
- data/lib/ffwd/plugin/log.rb +17 -2
- data/lib/ffwd/plugin/log/writer.rb +4 -0
- data/lib/ffwd/plugin_channel.rb +8 -8
- data/lib/ffwd/processor.rb +11 -4
- data/lib/ffwd/processor/count.rb +16 -6
- data/lib/ffwd/processor/histogram.rb +26 -15
- data/lib/ffwd/processor/rate.rb +16 -6
- data/lib/ffwd/protocol/tcp.rb +47 -88
- data/lib/ffwd/protocol/tcp/bind.rb +22 -10
- data/lib/ffwd/protocol/tcp/connection.rb +23 -6
- data/lib/ffwd/protocol/tcp/flushing_connect.rb +42 -25
- data/lib/ffwd/protocol/tcp/plain_connect.rb +15 -3
- data/lib/ffwd/protocol/udp.rb +42 -17
- data/lib/ffwd/protocol/udp/bind.rb +21 -10
- data/lib/ffwd/protocol/udp/connect.rb +22 -9
- data/lib/ffwd/retrier.rb +4 -1
- data/lib/ffwd/schema.rb +10 -3
- data/lib/ffwd/statistics/collector.rb +31 -23
- data/lib/ffwd/test/protocol.rb +42 -0
- data/lib/ffwd/tunnel/tcp.rb +3 -1
- data/lib/ffwd/utils.rb +7 -0
- data/lib/ffwd/version.rb +1 -1
- metadata +56 -68
- data/lib/ffwd/circular_buffer.rb +0 -78
- data/lib/ffwd/statistics.rb +0 -29
- data/lib/ffwd/tunnel.rb +0 -27
data/lib/ffwd/statistics.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# $LICENSE
|
2
|
-
# Copyright 2013-2014 Spotify AB. All rights reserved.
|
3
|
-
#
|
4
|
-
# The contents of this file are licensed under the Apache License, Version 2.0
|
5
|
-
# (the "License"); you may not use this file except in compliance with the
|
6
|
-
# License. You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
-
# License for the specific language governing permissions and limitations under
|
14
|
-
# the License.
|
15
|
-
|
16
|
-
require_relative 'lifecycle'
|
17
|
-
require_relative 'logging'
|
18
|
-
|
19
|
-
require_relative 'statistics/collector'
|
20
|
-
|
21
|
-
module FFWD
|
22
|
-
module Statistics
|
23
|
-
include FFWD::Logging
|
24
|
-
|
25
|
-
def self.setup emitter, channel, opts={}
|
26
|
-
Collector.new log, emitter, channel, opts
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/lib/ffwd/tunnel.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# $LICENSE
|
2
|
-
# Copyright 2013-2014 Spotify AB. All rights reserved.
|
3
|
-
#
|
4
|
-
# The contents of this file are licensed under the Apache License, Version 2.0
|
5
|
-
# (the "License"); you may not use this file except in compliance with the
|
6
|
-
# License. You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
-
# License for the specific language governing permissions and limitations under
|
14
|
-
# the License.
|
15
|
-
|
16
|
-
require_relative 'tunnel/tcp'
|
17
|
-
require_relative 'tunnel/udp'
|
18
|
-
|
19
|
-
module FFWD
|
20
|
-
FAMILIES = {:tcp => Tunnel::TCP, :udp => Tunnel::UDP}
|
21
|
-
|
22
|
-
def self.tunnel family, port, core, plugin, log, connection, args
|
23
|
-
impl = FAMILIES[family]
|
24
|
-
raise "Unsupported family: #{family}" if impl.nil?
|
25
|
-
return impl.new port, core, plugin, log, connection, args
|
26
|
-
end
|
27
|
-
end
|