devserver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartAgent

func StartAgent(c Config)

StartAgent start inner http server by config.

Types

type Config

type Config struct {
	Enabled        bool
	Host           string `json:",optional"`
	Port           int
	MetricsPath    string
	HealthPath     string
	EnableMetrics  bool
	EnablePprof    bool
	HealthResponse string
}

Config is config for inner http server.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns Hexas development server defaults.

func (Config) Validate

func (c Config) Validate() error

Validate checks development server configuration.

type Server

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

Server is an inner http server, expose some useful observability information of app. For example, health check, metrics and pprof.

func NewServer

func NewServer(config Config) *Server

NewServer returns a new inner http Server.

func (*Server) StartAsync

func (s *Server) StartAsync(c Config)

StartAsync start inner http server background.

Jump to

Keyboard shortcuts

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