server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package server provides the server handlers for the protocol version 1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handle(w io.Writer, r io.Reader, remoteAddr net.Addr) error
}

Handler is the interface that wraps the Handle method.

type HandlerV1

type HandlerV1 struct {
	// contains filtered or unexported fields
}

HandlerV1 handles requests related to the protocol version 1.

func NewHandlerV1

func NewHandlerV1(
	handler Handler,
	keyManager key.ServerManager,
	secrets secret.Manager,
	logger *log.Logger,
) HandlerV1

NewHandlerV1 returns a new protocol version 1 handler.

func (HandlerV1) Handle

func (h HandlerV1) Handle(requestCommon protocol.RequestCommon, conn net.Conn) error

Handle handles the request.

Jump to

Keyboard shortcuts

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