Class: Pollen::ServerConfiguration

Inherits:
Configuration show all
Defined in:
lib/pollen/configuration.rb

Constant Summary collapse

UUID_REGEXP =
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

Instance Attribute Summary collapse

Attributes inherited from Configuration

#channel_prefix, #owner_class, #redis

Instance Method Summary collapse

Methods inherited from Configuration

#assign_defaults, #root

Constructor Details

#initializeServerConfiguration

Returns a new instance of ServerConfiguration.



30
31
32
33
34
35
36
# File 'lib/pollen/configuration.rb', line 30

def initialize
  super
  @concurrency = 1
  @heartbeat = 5
  @route_regexp = %r{^/pollen/streams/(#{UUID_REGEXP})}
  @authenticator = ->(_, _) {}
end

Instance Attribute Details

#authenticatorObject

Returns the value of attribute authenticator.



28
29
30
# File 'lib/pollen/configuration.rb', line 28

def authenticator
  @authenticator
end

#concurrencyObject (readonly)

Returns the value of attribute concurrency.



27
28
29
# File 'lib/pollen/configuration.rb', line 27

def concurrency
  @concurrency
end

#heartbeatObject (readonly)

Returns the value of attribute heartbeat.



27
28
29
# File 'lib/pollen/configuration.rb', line 27

def heartbeat
  @heartbeat
end

#route_regexpObject (readonly)

Returns the value of attribute route_regexp.



27
28
29
# File 'lib/pollen/configuration.rb', line 27

def route_regexp
  @route_regexp
end