servers

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package servers contains servers for various protocols to listen for and return Agent communications

Index

Constants

View Source
const (
	// HTTP is HTTP/1.1 Clear-Text protocol
	HTTP int = 1
	// HTTPS is HTTP/1.1 Secure (over SSL/TLS) protocol
	HTTPS int = 2
	// H2C is HTTP/2.0 Clear-Text protocol
	H2C int = 3
	// HTTP2 is HTTP/2.0 Secure (over SSL/TLS)
	HTTP2 int = 4
	// HTTP3 is HTTP/2.0 Secure over Quick UDP Internet Connection (QUIC)
	HTTP3 int = 5
)

Supported protocols

Variables

View Source
var RegisteredServers = make(map[int]string)

RegisteredServers contains an array of registered server types

Functions

func FromString

func FromString(protocol string) int

FromString converts a protocol constant to its string representation

func Protocol

func Protocol(protocol int) string

Protocol is used to transform a server protocol constant into a string for use in written messages or logs

Types

type ServerInterface

type ServerInterface interface {
	Addr() string
	ConfiguredOptions() map[string]string
	ID() uuid.UUID
	Interface() string
	Listen() error
	Protocol() int
	ProtocolString() string
	Port() int
	SetOption(string, string) error
	Start()
	Status() string
	Stop() error
}

ServerInterface is used to provide a standard set of methods a server module must support to work with Merlin

Directories

Path Synopsis
Package http holds the HTTP servers to send/receive Agent messages
Package http holds the HTTP servers to send/receive Agent messages
memory
Package memory is an in-memory database used to store and retrieve HTTP servers
Package memory is an in-memory database used to store and retrieve HTTP servers

Jump to

Keyboard shortcuts

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