httpserver

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package httpserver implements the core HTTP server

Index

Constants

View Source
const MaxQuoteSize = 12800

Variables

This section is empty.

Functions

func DummyAttest

func DummyAttest(appdata [64]byte) ([]byte, error)

func TdxAttest

func TdxAttest(appdata [64]byte) ([]byte, error)

Types

type AttestFn

type AttestFn = func([64]byte) ([]byte, error)

type HTTPServerConfig

type HTTPServerConfig struct {
	ListenAddr  string
	MetricsAddr string
	EnablePprof bool
	Log         *slog.Logger

	DrainDuration            time.Duration
	GracefulShutdownDuration time.Duration
	ReadTimeout              time.Duration
	WriteTimeout             time.Duration

	UseDummy bool
}

type Server

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

func New

func New(cfg *HTTPServerConfig) (srv *Server, err error)

func (*Server) RunInBackground

func (s *Server) RunInBackground()

func (*Server) Shutdown

func (s *Server) Shutdown()

Jump to

Keyboard shortcuts

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