Documentation
¶
Index ¶
- func GetCallOptions(ops []Option) []callopt.Option
- type Option
- func ConvertOptionFrom(option callopt.Option) Optiondeprecated
- func WithConnectTimeout(d time.Duration) Option
- func WithGRPCCompressor(compressorName string) Option
- func WithHostPort(hostPort string) Option
- func WithRecvTimeout(d time.Duration) Option
- func WithTag(key, val string) Option
- func WithURL(url string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCallOptions ¶
GetCallOptions converts given streamcall.Option(s) to callopt.Option
Types ¶
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option is the option type used in StreamClient's Call method
func ConvertOptionFrom
deprecated
Deprecated: it's not supposed to be called by users directly; may be removed in future versions. ConvertOptionFrom converts a callopt.Option to StreamOption It's convenient for creating StreamOption from existing callopt.Option Note: NOT all callopt.Option(s) converted will work for stream clients; Even if it works for now, it's NOT guaranteed that it will always work for future versions.
func WithConnectTimeout ¶
WithConnectTimeout specifies the connection timeout for a RPC call.
func WithGRPCCompressor ¶
WithGRPCCompressor specifies the compressor for the GRPC frame payload.
func WithHostPort ¶
WithHostPort specifies the target address for an RPC call.
func WithRecvTimeout ¶ added in v0.13.0
WithRecvTimeout add recv timeout for stream.Recv function. NOTICE: ONLY effective for ttheader streaming protocol for now.
func WithURL ¶
WithURL specifies the target for a RPC call with url. The given url will be resolved to hostport and overwrites the result from Resolver.