Permalink
Fetching contributors…
Cannot retrieve contributors at this time
174 lines (87 sloc) 4.41 KB

Module hackney_pool

pool of sockets connections.

Behaviours: gen_server.

Function Index

checkin/2release a socket in the pool.
checkout/4fetch a socket from the pool.
child_spec/2return a child spec suitable for embeding your pool in the supervisor.
code_change/3
count/1get the number of connections in the pool.
count/2get the number of connections in the pool for {Host0, Port, Transport}
find_pool/1
handle_call/3
handle_cast/2
handle_info/2
init/1
max_connections/1get max pool size.
notify/2
set_max_connections/2change the pool size.
set_timeout/2change the connection timeout.
start/0
start_link/2
start_pool/2start a pool.
stop_pool/1stop a pool.
terminate/2
timeout/1get timeout.

Function Details

checkin/2

checkin(X1, Socket) -> any()

release a socket in the pool

checkout/4

checkout(Host0, Port, Transport, Client) -> any()

fetch a socket from the pool

child_spec/2

child_spec(Name, Options0) -> any()

return a child spec suitable for embeding your pool in the supervisor

code_change/3

code_change(OldVsn, State, Extra) -> any()

count/1

count(Name) -> any()

get the number of connections in the pool

count/2

count(Name, X2) -> any()

get the number of connections in the pool for {Host0, Port, Transport}

find_pool/1

find_pool(Name) -> any()

handle_call/3

handle_call(X1, From, State) -> any()

handle_cast/2

handle_cast(Msg, State) -> any()

handle_info/2

handle_info(X1, State) -> any()

init/1

init(X1) -> any()

max_connections/1

max_connections(Name) -> any()

get max pool size

notify/2

notify(Pool, Msg) -> any()

set_max_connections/2

set_max_connections(Name, NewSize) -> any()

change the pool size

set_timeout/2

set_timeout(Name, NewTimeout) -> any()

change the connection timeout

start/0

start() -> any()

start_link/2

start_link(Name, Options0) -> any()

start_pool/2

start_pool(Name, Options) -> any()

start a pool

stop_pool/1

stop_pool(Name) -> any()

stop a pool

terminate/2

terminate(Reason, State) -> any()

timeout/1

timeout(Name) -> any()

get timeout