Documentation ¶
Overview ¶
Package callopt contains options that control the behavior of client on request level.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(cos []Option, cfg rpcinfo.RPCConfig, svr remoteinfo.RemoteInfo, locks *client.ConfigLocks, httpResolver http.Resolver) string
Apply applies call options to the rpcinfo.RPCConfig and internal.RemoteInfo of kitex client. The return value records the name and arguments of each option. This function is for internal purpose only.
Types ¶
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option is a series of options used at the beginning of a RPC call.
func WithConnectTimeout ¶
WithConnectTimeout specifies the connection timeout for a RPC call.
func WithHTTPHost ¶
WithHTTPHost specifies host in http header(work when RPC over http).
func WithHostPort ¶
WithHostPort specifies the target address for a RPC call. The given address will overwrite the result from Resolver.
func WithRPCTimeout ¶
WithRPCTimeout specifies the RPC timeout for a RPC call.