grpc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advertiser

type Advertiser interface {
	AdvertiseList(from, to addr.IA) ([]netip.Prefix, error)
}

Advertiser returns a list of IP prefixes to advertise.

type Discoverer

type Discoverer struct {
	Remote addr.IA
	Dialer grpc.Dialer
	Paths  control.PathMonitorRegistration
}

Discoverer discovers the gateways for a specific remote AS.

func (Discoverer) Gateways

func (d Discoverer) Gateways(ctx context.Context) ([]control.Gateway, error)

type IPPrefixServer

type IPPrefixServer struct {
	// LocalIA is the IA of the local AS.
	LocalIA addr.IA
	// Advertiser is the advertiser used to get the list of prefixes to advertise.
	Advertiser Advertiser
	// PrefixesAdvertised reports the number of IP prefixes advertised. If nil, no  metrics are
	// reported.
	PrefixesAdvertised metrics.Gauge
}

IPPrefixServer serves IP prefix requests.

func (IPPrefixServer) Prefixes

type PrefixFetcher

type PrefixFetcher struct {
	Remote addr.IA
	Pather control.PathMonitorRegistration
	Dialer grpc.Dialer
}

PrefixFetcher fetches prefixes from a gateway in a specific remote.

func (PrefixFetcher) Prefixes

func (f PrefixFetcher) Prefixes(ctx context.Context, gateway *net.UDPAddr) ([]*net.IPNet, error)

type ProbeDispatcher

type ProbeDispatcher struct {
}

ProbeDispatcher handles incoming gateway protocol messages. Currently, it only supports probe requests, and immediately replies to them.

func (*ProbeDispatcher) Listen

func (d *ProbeDispatcher) Listen(ctx context.Context, conn net.PacketConn) error

Listen handles the received control requests.

Directories

Path Synopsis
Package mock_grpc is a generated GoMock package.
Package mock_grpc is a generated GoMock package.

Jump to

Keyboard shortcuts

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