Slide 16
Slide 16 text
αʔΩοτϒϨʔΧʔͷಋೖʙ(FNͷίΞ෦
def run
if open?
# ϩάग़ྗͳͲ
else
begin
response = execution_timer.time(service, notifier, 'execution_time') do
yield
end
success! # HALF-OPENͩͬͨ߹ɺCLOSEDʹ͢Δ
rescue
response = nil
failure! # HALF_OPENͩͬͨ߹ɺOPENʹ / CLOSEDͩͬͨ߹ɺ݅ʹΑͬͯOPENʹ
End
end
response
end
def http_get
circuit.run do
Zephyr.new('http://example.com').get('/api/messages')
end
end
˞͔ͳΓ؆ૉԽ͍ͯ͠·͢ɻࢀߟɿ(JU)VCͷ֘Օॴ