server

package
v0.0.0-...-fad18c3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 20 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)

Types

type Completion

type Completion struct {
	Ret     interface{}
	Status  int
	Message string
}

type HTTPError

type HTTPError struct {
	Code    int
	Message string
}

func NewHTTPError

func NewHTTPError(code int, msg string) *HTTPError

func (*HTTPError) Error

func (e *HTTPError) Error() string

type HandleFunc

type HandleFunc func(interface{}) (interface{}, *HTTPError)

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(uid string) *Completion

func (*TrailingDelayQueue) Shutdown

func (q *TrailingDelayQueue) Shutdown()

func (*TrailingDelayQueue) Submit

func (q *TrailingDelayQueue) Submit(item interface{}) string

Jump to

Keyboard shortcuts

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