class Pantry::ClientInfo

Simple class to keep track of a given client’s identifying information

Attributes

application[R]
environment[R]
filter[R]

The above gets packaged into a ClientFilter for use elsewhere

identity[R]

This client’s current identity. By default a client’s identity is it’s ‘hostname`, but a specific one can be given. These identities should be unique across the set of clients connecting to a single Pantry Server, behavior of multiple clients with the same identity is currently undefined.

roles[R]

Public Class Methods

new(application: nil, environment: nil, roles: [], identity: nil) click to toggle source
# File lib/pantry/client_info.rb, line 20
def initialize(application: nil, environment: nil, roles: [], identity: nil)
  @application = application
  @environment = environment
  @roles       = roles
  @identity    = identity

  @filter = Pantry::Communication::ClientFilter.new(
    application: @application,
    environment: @environment,
    roles:       @roles,
    identity:    @identity
  )
end