serve

package
v0.0.0-...-6faa853 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 38 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Measure

func Measure(ctx context.Context) error

func Nodegraph

func Nodegraph(req *http.Request) []byte

Nodegraph produces the process connections node graph.

func Serve

func Serve(ctx context.Context)

serve sets up gomon's endpoints and starts the server.

Types

type Id

type Id struct {
}

Id identifies the message.

type Metrics

type Metrics struct {
	HTTPRequests int `json:"http_requests" gomon:"counter,count"`
	Prometheus   `gomon:""`
	LokiStreams  int `json:"loki_streams" gomon:"counter,count"`
}

Metrics defines measurement metrics.

type Pid

type Pid = process.Pid

Pid alias for Pid in process package.

type Prometheus

type Prometheus struct {
	Collections    int           `json:"collections" gomon:"counter,count"`
	CollectionTime time.Duration `json:"collection_time" gomon:"counter,ns"`
}

type Properties

type Properties struct {
	WebServer `gomon:""`
}

Properties defines measurement properties.

type Query

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

query parameters for request.

func (Query) Arrow

func (query Query) Arrow() string

Arrow returns the character to use in edges' tooltip connections list.

func (Query) BuildGraph

func (query Query) BuildGraph(
	tb process.Table,
	itr process.Tree,
	hosts map[Pid]string,
	prcss map[int]map[Pid]string,
	datas map[Pid]string,
	edges map[[2]Pid][]string,
) []byte

func (Query) DataEdge

func (query Query) DataEdge(_ process.Table, conn process.Connection) []string

func (Query) DataNode

func (query Query) DataNode(conn process.Connection) string

func (Query) HostEdge

func (query Query) HostEdge(_ process.Table, conn process.Connection) []string

func (Query) HostNode

func (query Query) HostNode(conn process.Connection) string

func (Query) Pid

func (query Query) Pid() Pid

Pid returns the query's pid.

func (Query) ProcEdge

func (query Query) ProcEdge(_ process.Table, self, peer Pid) []string

func (Query) ProcNode

func (query Query) ProcNode(p *process.Process) string

type WebServer

type WebServer struct {
	Address   string   `json:"address" gomon:"property"`
	Endpoints []string `json:"endpoints" gomon:"property"`
}

WebServer reports the address and endpoints of gomon.

Jump to

Keyboard shortcuts

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