serviceconnections

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	*grpc.ClientConn
	// contains filtered or unexported fields
}

func NewClientConn

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

func (*Connection) Addr

func (c *Connection) Addr() string

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Connect

func (c *Connection) Connect() error

func (*Connection) Ready

func (c *Connection) Ready() bool

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