proxyprotocol

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package proxyprotocol is an enumeration of the states V1, V2, V2Ssl, V2SslCn

Index

Constants

This section is empty.

Variables

View Source
var ValidStrings = []string{
	V1.String(),
	V2.String(),
	V2Ssl.String(),
	V2SslCn.String(),
}

ValidStrings is the set of strings that are valid inputs to ParseEnum

Functions

This section is empty.

Types

type Enum

type Enum uint8

Enum is an enumerated type

const (
	// V1 is an enumeration for proxyprotocol.Enum
	V1 Enum = iota + 1
	// V2 is an enumeration for proxyprotocol.Enum
	V2
	// V2Ssl is an enumeration for proxyprotocol.Enum
	V2Ssl
	// V2SslCn is an enumeration for proxyprotocol.Enum
	V2SslCn
)

func ParseEnum

func ParseEnum(name string) (Enum, error)

ParseEnum attempts to convert a string into a Enum

func (Enum) MarshalText

func (i Enum) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (Enum) String

func (i Enum) String() string

String makes Enum satisfy the Stringer interface

func (*Enum) UnmarshalText

func (i *Enum) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

Jump to

Keyboard shortcuts

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