streamcall

package
v0.11.3-genericstreaming Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCallOptions

func GetCallOptions(ops []Option) []callopt.Option

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

func ConvertOptionFrom(option callopt.Option) Option

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

func WithConnectTimeout(d time.Duration) Option

WithConnectTimeout specifies the connection timeout for a RPC call.

func WithGRPCCompressor

func WithGRPCCompressor(compressorName string) Option

WithGRPCCompressor specifies the compressor for the GRPC frame payload.

func WithHostPort

func WithHostPort(hostPort string) Option

WithHostPort specifies the target address for an RPC call.

func WithTag

func WithTag(key, val string) Option

WithTag sets the tags for service discovery for an RPC call.

func WithURL

func WithURL(url string) Option

WithURL specifies the target for a RPC call with url. The given url will be resolved to hostport and overwrites the result from Resolver.

func (Option) GetCallOption deprecated

func (o Option) GetCallOption() callopt.Option

Deprecated: it's not supposed to be called by users directly and may be removed in future versions. GetCallOption returns a callopt.Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL