router

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 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 Pool

type Pool interface {
	Borrow(ctx context.Context, servers []string, wait bool) (pool.Connection, error)
	Return(c pool.Connection)
}

type ReadRoutingTableError

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

func (*ReadRoutingTableError) Error

func (e *ReadRoutingTableError) Error() string

type Router

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

Thread safe

func New

func New(rootRouter string, getRouters func() []string, routerContext map[string]string, pool Pool, logger log.Logger) *Router

func (*Router) CleanUp

func (r *Router) CleanUp()

func (*Router) Context

func (r *Router) Context() map[string]string

func (*Router) Invalidate

func (r *Router) Invalidate(database string)

func (*Router) Readers

func (r *Router) Readers(database string) ([]string, error)

func (*Router) Writers

func (r *Router) Writers(database string) ([]string, error)

Jump to

Keyboard shortcuts

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