devserver

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 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

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   `json:",default=true"`
	Host          string `json:",optional"`
	Port          int    `json:",default=6060"`
	MetricsPath   string `json:",default=/metrics"`
	HealthPath    string `json:",default=/healthz"`
	EnableMetrics bool   `json:",default=true"`
	EnablePprof   bool   `json:",default=true"`
}

Config is config for inner http server.

type Server

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

Server is 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()

StartAsync start inner http server background.

Jump to

Keyboard shortcuts

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