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.
Click to show internal directories.
Click to hide internal directories.