dispatcher

package
v0.0.0 Latest Latest
Warning

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

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

type Config struct {
	Logger               logger.Logger
	EndpointsProvider    EndpointsProvider
	Auth                 transport.Authenticator
	TransportCredentials credentials.TransportCredentials
	DB                   string
	InitNodes            []string
	GridConfig           grid.Config
}

type Dispatcher

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

Dispatcher provides dynamic transport layer by gluing together endpoints provider and balancer.

It uses provider's announces to populate balancing grid.

Balancing grid in turn is used by YDB services as abstract transport.

func New

func New(cfg Config) *Dispatcher

func (*Dispatcher) Run

func (r *Dispatcher) Run(ctx context.Context, wg *sync.WaitGroup)

func (*Dispatcher) Transport

func (r *Dispatcher) Transport() grpc.ClientConnInterface

type EndpointsProvider

type EndpointsProvider interface {
	EndpointsChan() <-chan endpoints.Announce
}

Jump to

Keyboard shortcuts

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