Module: TwistlockControl

Defined in:
lib/twistlock_control.rb,
lib/twistlock_control/entity.rb,
lib/twistlock_control/version.rb,
lib/twistlock_control/collections.rb,
lib/twistlock_control/actions/service.rb,
lib/twistlock_control/provisioner_api.rb,
lib/twistlock_control/entities/service.rb,
lib/twistlock_control/actions/container.rb,
lib/twistlock_control/entities/container.rb,
lib/twistlock_control/actions/provisioner.rb,
lib/twistlock_control/entities/provisioner.rb,
lib/twistlock_control/rethinkdb_repository.rb,
lib/twistlock_control/actions/service_instance.rb,
lib/twistlock_control/entities/service_instance.rb,
lib/twistlock_control/actions/container_instance.rb,
lib/twistlock_control/entities/composite_service.rb,
lib/twistlock_control/entities/container_instance.rb,
lib/twistlock_control/entities/provisioning_configuration.rb

Overview

Update this for releases

Defined Under Namespace

Modules: Actions, Collections, Entities Classes: Entity, PersistedEntity, ProvisionerAPI, RethinkDBRepository

Constant Summary collapse

VERSION =
'0.0.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.connection_pool_sizeObject

Returns the value of attribute connection_pool_size.



19
20
21
# File 'lib/twistlock_control.rb', line 19

def connection_pool_size
  @connection_pool_size
end

.connection_pool_timeoutObject

Returns the value of attribute connection_pool_timeout.



19
20
21
# File 'lib/twistlock_control.rb', line 19

def connection_pool_timeout
  @connection_pool_timeout
end

.database_nameObject

Returns the value of attribute database_name.



19
20
21
# File 'lib/twistlock_control.rb', line 19

def database_name
  @database_name
end

.rethinkdb_hostObject

Returns the value of attribute rethinkdb_host.



19
20
21
# File 'lib/twistlock_control.rb', line 19

def rethinkdb_host
  @rethinkdb_host
end

.rethinkdb_portObject

Returns the value of attribute rethinkdb_port.



19
20
21
# File 'lib/twistlock_control.rb', line 19

def rethinkdb_port
  @rethinkdb_port
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



25
26
27
28
29
30
31
# File 'lib/twistlock_control.rb', line 25

def configure
	yield self

	set_defaults

	setup_connection_pool
end

.databaseObject



33
34
35
# File 'lib/twistlock_control.rb', line 33

def database
	RethinkDB::RQL.new.db(database_name)
end

.with_connectionObject



37
38
39
40
41
# File 'lib/twistlock_control.rb', line 37

def with_connection
	@connection_pool.with do |conn|
		yield conn
	end
end