drpcauth

package
v1.89.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package drpcauth implements the same functionality as package httpauth but with DRPC as transport.

This way the Auth service can be called with libuplink without requiring a HTTP client as a dependency.

Currently no authentication is required for this functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartListen

func StartListen(
	ctx context.Context,
	authServer pb.DRPCEdgeAuthServer,
	maximumBuffer memory.Size,
	listener net.Listener,
) (err error)

StartListen start a DRPC server on the given listener.

Types

type Server

type Server struct {
	pb.DRPCEdgeAuthServer
	// contains filtered or unexported fields
}

Server is a collection of dependencies for the DRPC-based service It is an interface for clients like Uplink to use the auth service.

func NewServer

func NewServer(
	log *zap.Logger,
	db *authdb.Database,
	endpoint *url.URL,
	accessGrantSizeLimit memory.Size,
) *Server

NewServer creates a Server that is not running.

func (*Server) RegisterAccess

func (g *Server) RegisterAccess(
	ctx context.Context,
	request *pb.EdgeRegisterAccessRequest,
) (_ *pb.EdgeRegisterAccessResponse, err error)

RegisterAccess implements interface DRPCEdgeAuthServer. Wraps the actual functionality with logging.

Jump to

Keyboard shortcuts

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