server

package
v0.20.14 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	HttpServerHealthProcessorPath = "/health"
	HttpServerCallProcessorPath   = "/call"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

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

func NewHttpServer

func NewHttpServer(options HttpServerOptions, logger common.Logger) *HttpServer

func (*HttpServer) Start

func (h *HttpServer) Start(wg *sync.WaitGroup)

type HttpServerCallProcessor

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

func (*HttpServerCallProcessor) HandleRequest

func (h *HttpServerCallProcessor) HandleRequest(w http.ResponseWriter, r *http.Request) error

func (*HttpServerCallProcessor) Path

func (h *HttpServerCallProcessor) Path() string

type HttpServerCallRequest

type HttpServerCallRequest struct {
	ID      string        `form:"id"`
	Name    string        `form:"name"`
	Package string        `form:"package,omitempty"`
	Params  []interface{} `form:"params,omitempty"`
	Timeout int           `form:"timeout,omitempty"`
}

type HttpServerCallResponse added in v0.20.13

type HttpServerCallResponse struct {
	Request *HttpServerCallRequest `json:"request"`
	Result  []interface{}          `json:"result,omitempty"`
	Error   string                 `json:"error,omitempty"`
}

type HttpServerHealthProcessor

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

func (*HttpServerHealthProcessor) HandleRequest

func (*HttpServerHealthProcessor) Path

type HttpServerOptions

type HttpServerOptions struct {
	ServerName      string
	Listen          string
	Tls             bool
	Insecure        bool
	CA              string
	Crt             string
	Key             string
	Timeout         int
	Methods         []string
	SensitiveFields []string
}

type HttpServerProcessor

type HttpServerProcessor interface {
	Path() string
	HandleRequest(w http.ResponseWriter, r *http.Request) error
}

Jump to

Keyboard shortcuts

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