grpc

package
v0.0.0-...-31a7b77 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MinKeepAliveTime    = 15 * time.Second
	MinKeepAliveTimeout = 30 * time.Second
)

Variables

This section is empty.

Functions

func New

func New(target string, options ...func(*Option)) (*grpc.ClientConn, error)

New creates a new GRPC connection.

func WithKeepAlivePermitWithoutStream

func WithKeepAlivePermitWithoutStream(keepAlive bool) func(*Option)

WithKeepAlivePermitWithoutStream ...

func WithMaxKeepAliveTimeout

func WithMaxKeepAliveTimeout(duration time.Duration) func(*Option)

WithMaxKeepAliveTimeout ...

func WithMessageSizeMaxReceive

func WithMessageSizeMaxReceive(size int64) func(*Option)

WithMessageSizeMaxReceive ...

func WithMessageSizeMaxSend

func WithMessageSizeMaxSend(size int64) func(*Option)

WithMessageSizeMaxSend ...

func WithMinKeepAliveTime

func WithMinKeepAliveTime(duration time.Duration) func(*Option)

WithMinKeepAliveTime ...

func WithSOCKS5Enabled

func WithSOCKS5Enabled(enable bool) func(*Option)

WithSOCKS5Enabled ...

func WithTLSCertFilePath

func WithTLSCertFilePath(path string) func(*Option)

WithTLSCertFilePath ...

func WithTLSEnabled

func WithTLSEnabled(enable bool) func(*Option)

WithTLSEnabled ...

func WithTLSKeyFilePath

func WithTLSKeyFilePath(path string) func(*Option)

WithTLSKeyFilePath ...

Types

type Option

type Option struct {
	// contains filtered or unexported fields
}

Option is a container for options used for configuring a gRPC connection.

func (*Option) String

func (o *Option) String() string

String returns a string representation of the Option.

Jump to

Keyboard shortcuts

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