http2

package
v0.9.1-beta Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: GPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOptions added in v1.0.0

func GetOptions() map[string]string

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

Types

type Server added in v0.6.0

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

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

func New added in v0.6.0

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 added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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

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

func (*Server) GetInterface added in v1.0.0

func (s *Server) GetInterface() string

GetInterface function returns the interface that the server is bound to

func (*Server) GetPort added in v1.0.0

func (s *Server) GetPort() int

GetPort function returns the port that the server is bound to

func (*Server) GetProtocol added in v1.0.0

func (s *Server) GetProtocol() int

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

func (*Server) GetProtocolString added in v1.0.0

func (s *Server) GetProtocolString() string

GetProtocolString function returns the server's protocol

func (*Server) SetOption added in v1.0.0

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

SetOption sets an option for an instantiated server object

func (*Server) Start added in v1.0.0

func (s *Server) Start() error

Start the HTTP2 server

func (*Server) Status added in v1.0.0

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 added in v1.0.0

func (s *Server) Stop() error

Stop the HTTP2 server

type Template added in v1.0.0

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