http2

package
v0.0.0-...-5262aa1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOptions

func GetOptions() map[string]string

GetOptions returns a map of configurable server options typically used when creating a listener

Types

type Server

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

Server is a structure for the HTTP/2 clear-text (h2c) server

func New

func New(options map[string]string) (*Server, error)

New creates a new HTTP2 server object and returns a pointer All arguments are taken in as strings and are converted/validate

func Renew

func Renew(ctx handlers.ContextInterface, options map[string]string) (*Server, error)

Renew generates a new Server object and retains original encryption keys

func (*Server) GetConfiguredOptions

func (s *Server) GetConfiguredOptions() map[string]string

GetConfiguredOptions returns the server's current configuration for options that can be set by the user

func (*Server) GetContext

func (s *Server) GetContext() handlers.ContextInterface

GetContext returns the Server's current context information such as encryption keys

func (*Server) GetInterface

func (s *Server) GetInterface() string

GetInterface function returns the interface that the server is bound to

func (*Server) GetPort

func (s *Server) GetPort() int

GetPort function returns the port that the server is bound to

func (*Server) GetProtocol

func (s *Server) GetProtocol() int

GetProtocol returns the server's protocol as an integer for a constant in the servers package

func (*Server) GetProtocolString

func (s *Server) GetProtocolString() string

GetProtocolString function returns the server's protocol

func (*Server) SetOption

func (s *Server) SetOption(option string, value string) error

SetOption sets an option for an instantiated server object

func (*Server) Start

func (s *Server) Start() error

Start the HTTP2 server

func (*Server) Status

func (s *Server) Status() int

Status enumerates if the server is currently running or stopped and returns the value as a string

func (*Server) Stop

func (s *Server) Stop() error

Stop the HTTP2 server

type Template

type Template struct {
	servers.Template
	X509Key  string // The x.509 private key used for TLS encryption
	X509Cert string // The x.509 public key used for TLS encryption
	PSK      string // The pre-shared key password used prior to Password Authenticated Key Exchange (PAKE)
}

Template is a structure used to collect the information needed to create an instance with the New() function

Jump to

Keyboard shortcuts

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