link

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

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address string
type Link interface {
	// TODO[wprzytula]: retries, consider backoff lib to unify retries in every method here
	Init(ctx context.Context, requestId api.RequestId) error
	Step(ctx context.Context, vertexId db.VertexId, distance float64, through db.VertexId, reqId api.RequestId) (db.VertexId, float64, db.VertexId, error)
	Reconstruct(ctx context.Context, vertexId db.VertexId, requestId api.RequestId) ([]db.VertexId, error)
	Finish(ctx context.Context, requestId api.RequestId) error

	io.Closer
}

func New

func New(ctx context.Context, addr string) (Link, error)

New creates new link. Currently, nodes connects even to itself via gRPC as it should be fast enough.

type RegionManager

type RegionManager interface {
	UpdateInstances(ctx context.Context, instances []discoverer.WorkerInstance) error
	GetLink() (Address, Link, error)
}

func NewRegionDialer

func NewRegionDialer(port int) RegionManager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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