Module maestro

September 27, 2015 ยท View on GitHub

Data Types

maestro()


maestro() = maestro_serv:maestro()

maestro_ref()


maestro_ref() = maestro_serv:maestro_ref()

pool_ref()


pool_ref() = maestro_serv:pool_ref()

start_ret()


start_ret() = maestro_serv:start_ret()

Function Index

checkout/1Pick a pool and check-out one worker.
checkout/2Pick a pool and check-out one worker; optional block.
checkout/3Pick a pool and check-out one worker; optional block and check-out timeout.
child_spec/3
pick_pool/1Throw some dice.
pool_checkin/2Check in a particular worker into an arbitrary pool.
pool_checkout/1Check-out one worker from an arbitrary pool.
pool_checkout/2Check-out one worker from an arbitrary pool; optional block.
pool_checkout/3Check-out one worker from an arbitrary pool; optional block and check-out timeout.
pool_status/1Run a single function in-between a check-out and a check-in; optional check-out timeout.
pool_transaction/2
pool_transaction/3Run a single function in-between a check-out and a check-in.
start/1
start/2
start_link/1
start_link/2
status/1
stop/1
transaction/2Pick a pool and run a single function in-between a check-out and a check-in.
transaction/3Pick a pool and run a single function in-between a check-out and a check-in; optional check-out timeout.

Function Details

checkout/1


checkout(Maestro::maestro()) -> {pool_ref(), pid()}



Pick a pool and check-out one worker.

checkout/2


checkout(Maestro::maestro(), Block::boolean()) -> {pool_ref(), pid()} | full



Pick a pool and check-out one worker; optional block.

checkout/3


checkout(Maestro::maestro(), Block::boolean(), Timeout::timeout()) -> {pool_ref(), pid()} | full



Pick a pool and check-out one worker; optional block and check-out timeout.

child_spec/3


child_spec(Id::term(), MaestroArgs::proplists:proplist(), WorkerArgs::proplists:proplist()) -> supervisor:child_spec()



pick_pool/1


pick_pool(Maestro::maestro()) -> pool_ref()



Throw some dice.

pool_checkin/2


pool_checkin(PoolRef::pool_ref(), Worker::pid()) -> ok



Check in a particular worker into an arbitrary pool.

pool_checkout/1


pool_checkout(PoolRef::pool_ref()) -> pid()



Check-out one worker from an arbitrary pool.

pool_checkout/2


pool_checkout(PoolRef::pool_ref(), Block::boolean()) -> pid() | full



Check-out one worker from an arbitrary pool; optional block.

pool_checkout/3


pool_checkout(PoolRef::pool_ref(), Block::boolean(), Timeout::timeout()) -> pool_ref() | full



Check-out one worker from an arbitrary pool; optional block and check-out timeout.

pool_status/1


pool_status(PoolRef::pool_ref()) -> {atom(), integer(), integer(), integer()}



Run a single function in-between a check-out and a check-in; optional check-out timeout.

pool_transaction/2


pool_transaction(PoolRef::pool_ref(), Fun::fun((Worker::pid()) -> any())) -> any()



pool_transaction/3


pool_transaction(PoolRef::pool_ref(), Fun::fun((Worker::pid()) -> any()), Timeout::timeout()) -> any()



Run a single function in-between a check-out and a check-in.

start/1


start(MaestroArgs::proplists:proplist()) -> start_ret()



start/2


start(MaestroArgs::proplists:proplist(), WorkerArgs::proplists:proplist()) -> start_ret()



start_link/1


start_link(MaestroArgs::proplists:proplist()) -> start_ret()



start_link/2


start_link(MaestroArgs::proplists:proplist(), WorkerArgs::proplists:proplist()) -> start_ret()



status/1


status(Maestro::maestro()) -> [{atom(), integer(), integer(), integer()}]



stop/1


stop(MaestroRef::maestro_ref()) -> ok



transaction/2


transaction(Maestro::maestro(), Fun::fun((Worker::pid()) -> any())) -> any()



Pick a pool and run a single function in-between a check-out and a check-in.

transaction/3


transaction(Maestro::maestro(), Fun::fun((Worker::pid()) -> any()), Timeout::timeout()) -> any()



Pick a pool and run a single function in-between a check-out and a check-in; optional check-out timeout.