echo

package
v0.0.0-...-82c42da Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerModeOptions = map[ServerMode][]string{
	ServerModeHTTP: {"", "http"},
	ServerModeGRPC: {"grpc"},
	ServerModeBoth: {"grpc+http", "both"},
}

Functions

func ServerModeVar

func ServerModeVar(flags *pflag.FlagSet, sm *ServerMode, name, usage string)

Types

type Pair

type Pair struct {
	PrivatePEM []byte
	CertPEM    []byte
}

func (Pair) X509KeyPair

func (p Pair) X509KeyPair() (tls.Certificate, error)

type Server

type Server struct {
	Hostname     string
	ListenHost   string
	ListenPort   int
	Mode         ServerMode
	PodName      string
	PodNamespace string
	PodNode      string
	TLSAutogen   bool
	TLSCertPath  string
	TLSKeyPath   string
}

func New

func New() *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

type ServerMode

type ServerMode enumflag.Flag
const (
	ServerModeHTTP ServerMode = iota
	ServerModeGRPC
	ServerModeBoth
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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