server

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 14 Imported by: 0

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 HttpServerCallRespone

type HttpServerCallRespone 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