grpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 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 Discoverer

type Discoverer struct {
	// Dialer dials a new gRPC connection.
	Dialer libgrpc.Dialer
}

Discoverer can be used to discover remote hidden path instances.

func (*Discoverer) Discover

func (d *Discoverer) Discover(ctx context.Context, dsAddr net.Addr) (hiddenpath.Servers, error)

Discover discovers hidden path services at the discovery service that is given by the address.

type Register

type Register struct {
	// Dialer dials a new gRPC connection.
	Dialer libgrpc.Dialer
	// RegularRegistration is the regular segment registration.
	RegularRegistration beaconing.RPC
}

Register can be used to register segments to remotes.

func (Register) RegisterSegment

func (s Register) RegisterSegment(ctx context.Context,
	reg hiddenpath.SegmentRegistration, remote net.Addr) error

RegisterSegment registers the segment at the remote. If the hidden path group ID is not defined it is registered via a normal segment registration message

type RegistrationServer

type RegistrationServer struct {
	Registry hiddenpath.Registry
}

RegistrationServer handles gRPC segment registration requests.

func (RegistrationServer) HiddenSegmentRegistration

HiddenSegmentRegistration handles the gRPC hidden segment registration request.

type Requester

type Requester struct {
	// Dialer dials a new gRPC connection.
	Dialer libgrpc.Dialer
	// HPGroups is used to fetch hidden segments when the destination IA belongs
	// to the writers of a group configuration.
	HPGroups hiddenpath.Groups
	// RegularLookup is the regular segment lookup.
	RegularLookup segfetcher.RPC
}

Requester fetches segments from a remote using gRPC.

func (*Requester) Segments

func (f *Requester) Segments(ctx context.Context, req segfetcher.Request,
	server net.Addr) ([]*seg.Meta, error)

type SegmentServer

type SegmentServer struct {
	Lookup        hiddenpath.Lookuper
	Authoritative bool
}

SegmentServer serves segments from a lookuper.

func (*SegmentServer) HiddenSegments

HiddenSegments serves hidden segments requests using the provided lookup.

Jump to

Keyboard shortcuts

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