pubstruct Pool {
pub host stringpub port intpub endpoint stringpub access_key stringpub secret_key stringpub region stringpub state chan pool.State
pub max_idle int
}
用途
公开结构体 `Pool`。
参数
hoststring
主机
portint
端口
endpointstring
字段(string)
access_keystring
字段(string)
secret_keystring
字段(string)
regionstring
字段(string)
statechan pool.State
字段(通道;类型 chan pool.State)
max_idleint
字段(int)
new_pool
XuAPI
pubfn new_pool(endpoint string, access_key string, secret_key string, region string, max_idle int) Pool
用途
构造 pool。
参数
endpointstring
endpoint(string)
access_keystring
access_key(string)
secret_keystring
secret_key(string)
regionstring
region(string)
max_idleint
max_idle(int)
返回
Pool — 该类型的值
(&Pool) get
XuAPI
pubfn (p &Pool) get() Client
用途
在 `&Pool` 上调用 `get`。
参数
p&Pool
接收者 &Pool(借用)
返回
Client — 该类型的值
(&Pool) dup
XuAPI
pubfn (p &Pool) dup() Pool
用途
在 `&Pool` 上调用 `dup`。
参数
p&Pool
接收者 &Pool(借用)
返回
Pool — 该类型的值
(&Pool) get_conn
XuAPI
pubfn (p &Pool) get_conn() int
用途
`&Pool` 上的方法:读取 conn。
参数
p&Pool
接收者 &Pool(借用)
返回
int — 该类型的值
(&Pool) put_conn
XuAPI
pubfn (p &Pool) put_conn(fd int)
用途
`&Pool` 上的方法:put连接。
参数
p&Pool
接收者 &Pool(借用)
fdint
文件描述符(int)
(&Pool) discard_conn
XuAPI
pubfn (p &Pool) discard_conn(fd int)
用途
`&Pool` 上的方法:丢弃连接。
参数
p&Pool
接收者 &Pool(借用)
fdint
文件描述符(int)
(&Pool) make_bucket
XuAPI
pubfn (p &Pool) make_bucket(bucket string) int
用途
`&Pool` 上的方法:makebucket。失败时 throw。
参数
p&Pool
接收者 &Pool(借用)
bucketstring
bucket(string)
返回
int — 该类型的值
(&Pool) bucket_exists
XuAPI
pubfn (p &Pool) bucket_exists(bucket string) bool
用途
`&Pool` 上的方法:bucketexists。
参数
p&Pool
接收者 &Pool(借用)
bucketstring
bucket(string)
返回
bool — 是否成立
(&Pool) remove_bucket
XuAPI
pubfn (p &Pool) remove_bucket(bucket string) int
用途
`&Pool` 上的方法:删除bucket。失败时 throw。
参数
p&Pool
接收者 &Pool(借用)
bucketstring
bucket(string)
返回
int — 该类型的值
(&Pool) put_object
XuAPI
pubfn (p &Pool) put_object(bucket string, key string, data string, content_type string) int