router

package
v3.25.0-rc0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 15 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 interface {
	Info
	Router
	Discoverer
}

func New

func New(
	ctx context.Context,
	c config.Config,
	pool conn.Pool,
	opts ...discoveryConfig.Option,
) (_ Connection, err error)

type Discoverer

type Discoverer interface {
	Discovery() discovery.Client
}

type Info

type Info interface {
	// Endpoint returns initial endpoint
	Endpoint() string

	// Name returns router name
	Name() string

	// Secure returns true if router connection is secure
	Secure() bool
}

type Router

type Router interface {
	// ClientConnInterface interface allows Router use as grpc.ClientConnInterface
	// with lazy getting raw grpc-connection in Invoke() or NewStream() stages.
	// Lazy getting grpc-connection must use for embedded into driver client-side
	// balancing may be put into code-generated client constructor as is.
	grpc.ClientConnInterface
	closer.Closer
}

Jump to

Keyboard shortcuts

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