Documentation ¶
Index ¶
- type Pool
- type Router
- func (r *Router) CleanUp(ctx context.Context) error
- func (r *Router) Context() map[string]string
- func (r *Router) GetNameOfDefaultDatabase(ctx context.Context, bookmarks []string, user string, auth *idb.ReAuthToken, ...) (string, error)
- func (r *Router) GetOrUpdateReaders(ctx context.Context, bookmarks func(context.Context) ([]string, error), ...) ([]string, error)
- func (r *Router) GetOrUpdateWriters(ctx context.Context, bookmarks func(context.Context) ([]string, error), ...) ([]string, error)
- func (r *Router) Invalidate(ctx context.Context, database string) error
- func (r *Router) InvalidateReader(ctx context.Context, db string, server string) error
- func (r *Router) InvalidateWriter(ctx context.Context, db string, server string) error
- func (r *Router) Readers(ctx context.Context, database string) ([]string, error)
- func (r *Router) Writers(ctx context.Context, database string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool interface { // Borrow acquires a connection from the provided list of servers // If all connections are busy and the pool is full, calls to Borrow may wait for a connection to become idle // If a connection has been idle for longer than idlenessThreshold, it will be reset // to check if it's still alive. Borrow(ctx context.Context, getServers func(context.Context) ([]string, error), wait bool, boltLogger log.BoltLogger, idlenessThreshold time.Duration, auth *idb.ReAuthToken) (idb.Connection, error) Return(ctx context.Context, c idb.Connection) error }
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is thread safe
func (*Router) GetNameOfDefaultDatabase ¶
func (*Router) GetOrUpdateReaders ¶
func (*Router) GetOrUpdateWriters ¶
func (*Router) InvalidateReader ¶
func (*Router) InvalidateWriter ¶
Click to show internal directories.
Click to hide internal directories.