server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const RequestHistorySize = 100

Variables

This section is empty.

Functions

func GetRunGroup

func GetRunGroup() (func() error, func(error))

func InitHttpServer

func InitHttpServer(ctx context.Context, cfg *config.Config)

func LoggingMiddleware

func LoggingMiddleware(next http.Handler) http.Handler

LoggingMiddleware logs request/response details

Types

type Completion

type Completion struct {
	Ret     any
	Status  int
	Message string
}

type HandleFunc

type HandleFunc func(any) (any, *httperr.Error)

type Hashable added in v0.3.0

type Hashable interface {
	Hash() (string, error)
}

type HttpServer

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

func (*HttpServer) Start

func (s *HttpServer) Start() error

func (*HttpServer) Stop

func (s *HttpServer) Stop(err error)

type TrailingDelayQueue

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

func NewTrailingDelayQueue

func NewTrailingDelayQueue(handle HandleFunc, delay time.Duration) *TrailingDelayQueue

func (*TrailingDelayQueue) Get

func (q *TrailingDelayQueue) Get(hash string) *Completion

func (*TrailingDelayQueue) Shutdown

func (q *TrailingDelayQueue) Shutdown()

func (*TrailingDelayQueue) Submit

func (q *TrailingDelayQueue) Submit(item Hashable) (string, error)

Jump to

Keyboard shortcuts

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