Class: GV::Addons::Memcached
Constant Summary
collapse
- PORT =
11211
- CONTAINER_DIR =
"/data/db"
Instance Attribute Summary
#cmd, #params
Instance Method Summary
collapse
#info, #initialize, #port
Instance Method Details
#create(app_name) ⇒ Object
20
21
22
23
|
# File 'lib/gv/addons/memcached.rb', line 20
def create app_name
super app_name
self.class.space.write([@name.to_sym,@app_name,"#{self.external_ip}:#{port(app_name)}",self.external_ip])
end
|
#destroy(app_name) ⇒ Object
25
26
27
28
29
|
# File 'lib/gv/addons/memcached.rb', line 25
def destroy app_name
super app_name
tuple = [@name.to_sym,@app_name,nil,nil]
(self.class.space.take(tuple,0) rescue nil) while (self.class.space.read(tuple,0) rescue nil)
end
|
#image ⇒ Object
12
|
# File 'lib/gv/addons/memcached.rb', line 12
def image; "bacongobbler/memcached" end
|
#url(app_name) ⇒ Object
15
16
17
18
|
# File 'lib/gv/addons/memcached.rb', line 15
def url app_name
@app_name = app_name
self.class.space.read([@name.to_sym,@app_name,nil,nil],0) rescue nil
end
|