db

package
v3.11.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster added in v3.8.0

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

type Connection

type Connection interface {
	Cluster
	conn.PoolGetter
	ConnectionInfo
	ConnectionDiscovery
}

func New

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

type ConnectionDiscovery added in v3.10.0

type ConnectionDiscovery interface {
	Discovery() discovery.Client
}

type ConnectionInfo added in v3.10.0

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

	// Name returns database name
	Name() string

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

Jump to

Keyboard shortcuts

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