discovery

package
v0.0.0-...-3a733ff Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 13 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 {
	PeerCount       int32                     `json:"node_count"`
	ClientCount     int32                     `json:"client_count"`
	Algorithm       peerpb.Algorithm          `json:"algorithm"`
	MaxFailures     int32                     `json:"max_failures"`
	MaxFastFailures int32                     `json:"max_fast_failures"`
	LeaderRegion    string                    `json:"leader_region"`
	KeyFile         string                    `json:"key_file"`
	ServerConfig    masterpb.BaseServerConfig `json:"server"`
	ClientConfig    masterpb.BaseClientConfig `json:"client"`
}

type Discovery

type Discovery struct {
	Config
	// contains filtered or unexported fields
}

func NewDiscoveryServer

func NewDiscoveryServer(logger logger.Logger, config Config, ipMapping map[string]string) *Discovery

func (*Discovery) GetServiceInfo

func (d *Discovery) GetServiceInfo(ctx context.Context, info *peerpb.BasicPeerInfo) (*masterpb.ClientResponse, error)

func (*Discovery) Register

Register is the grpc handler for registering a service

func (*Discovery) Run

func (d *Discovery) Run(ctx context.Context)

func (*Discovery) Serve

func (d *Discovery) Serve(lis net.Listener) error

func (*Discovery) Stop

func (d *Discovery) Stop()

func (*Discovery) TriggerClients

func (d *Discovery) TriggerClients()

func (*Discovery) WaitReady

func (d *Discovery) WaitReady(ctx context.Context) error

Jump to

Keyboard shortcuts

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