Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthoritativeRequester ¶
type AuthoritativeRequester struct { // Dialer dials a new gRPC connection. Dialer libgrpc.Dialer // Signer is used to sign the requests. Signer Signer }
AuthoritativeRequester requests hidden segments from an authoritative server.
func (AuthoritativeRequester) HiddenSegments ¶
func (r AuthoritativeRequester) HiddenSegments(ctx context.Context, req hiddenpath.SegmentRequest, server net.Addr) ([]*seg.Meta, error)
HiddenSegments requests from the authoritative server.
type AuthoritativeSegmentServer ¶
type AuthoritativeSegmentServer struct { Lookup hiddenpath.Lookuper Verifier infra.Verifier }
AuthoritativeSegmentServer serves hidden segments from a lookuper and verifies that requests are correctly signed from the peer.
func (AuthoritativeSegmentServer) AuthoritativeHiddenSegments ¶
func (s AuthoritativeSegmentServer) AuthoritativeHiddenSegments(ctx context.Context, pbReq *hspb.AuthoritativeHiddenSegmentsRequest, ) (*hspb.AuthoritativeHiddenSegmentsResponse, error)
AuthoritativeHiddenSegments serves the given hidden segments request.
type Discoverer ¶
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 Registerer ¶
type Registerer struct { // Dialer dials a new gRPC connection. Dialer libgrpc.Dialer // RegularRegistration is the regular segment registration. RegularRegistration beaconing.RPC // Signer signs segment registration requests. Signer Signer }
Registerer can be used to register segments to remotes.
func (Registerer) RegisterSegment ¶
func (s Registerer) 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 Verifier infra.Verifier }
RegistrationServer handles gRPC segment registration requests.
func (RegistrationServer) HiddenSegmentRegistration ¶
func (s RegistrationServer) HiddenSegmentRegistration(ctx context.Context, req *hspb.HiddenSegmentRegistrationRequest) (*hspb.HiddenSegmentRegistrationResponse, error)
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) (segfetcher.SegmentsReply, error)
type SegmentServer ¶
type SegmentServer struct {
Lookup hiddenpath.Lookuper
}
SegmentServer serves segments from a lookuper.
func (*SegmentServer) HiddenSegments ¶
func (s *SegmentServer) HiddenSegments(ctx context.Context, pbReq *hspb.HiddenSegmentsRequest) (*hspb.HiddenSegmentsResponse, error)
HiddenSegments serves hidden segments requests using the provided lookup.