serviceconnections

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConn

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

func NewClientConn

func NewClientConn(serviceName string, opts ...ConnectionOption) *ClientConn

func (*ClientConn) Close

func (c *ClientConn) Close() error

func (*ClientConn) Connect

func (c *ClientConn) Connect() error

func (*ClientConn) Connection

func (c *ClientConn) Connection() *grpc.ClientConn

type Connection

type Connection interface {
	Connect() error
	Close() error
}

type ConnectionOption

type ConnectionOption interface {
	// contains filtered or unexported methods
}

ConnectionOption configures how to connectService to a service.

func WithConnectTimeout

func WithConnectTimeout(connectTimeout time.Duration) ConnectionOption

func WithDialOptions

func WithDialOptions(dialOption ...grpc.DialOption) ConnectionOption

func WithHost

func WithHost(host string) ConnectionOption

func WithPort

func WithPort(port int) ConnectionOption

type EmptyConnectionOption

type EmptyConnectionOption struct{}

EmptyConnectionOption does not alter the configuration. It can be embedded in another structure to build custom connection options.

Jump to

Keyboard shortcuts

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