discovery

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceNameQuery = "query_service"
)

Variables

View Source
var (
	ErrEndpointsList         = errors.New("unable to get endpoints")
	ErrEndpointsUnmarshal    = errors.New("unable to unmarshal endpoints")
	ErrOperationUnsuccessful = errors.New("operation unsuccessful")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger     logger.Logger
	Transport  grpc.ClientConnInterface
	DB         string
	DoAnnounce bool
}

type Filter

type Filter struct {
	Require *Require
	Prefer  *Prefer
}

func NewFilter

func NewFilter() *Filter

func (*Filter) WithQueryService

func (f *Filter) WithQueryService() *Filter

type Prefer

type Prefer struct {
	Locations []string
}

type Require

type Require struct {
	Services  []string
	Locations []string
}

type Service

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

func NewService

func NewService(cfg Config) *Service

func (*Service) EndpointsChan

func (svc *Service) EndpointsChan() <-chan endpoints.Announce

func (*Service) GetAllEndpoints

func (svc *Service) GetAllEndpoints() endpoints.Map

func (*Service) Run

func (svc *Service) Run(ctx context.Context, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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