core

package
v0.0.0-...-7a5fecb Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPort is the default port to listen.
	DefaultPort = 38080
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	Service *service.Service
	// contains filtered or unexported fields
}

Diagnostic is the diagnostic.

func NewDiagnostic

func NewDiagnostic(options *DiagnosticConfig) *Diagnostic

NewDiagnostic creates a new diagnostic.

func (*Diagnostic) Start

func (d *Diagnostic) Start()

Start starts the diagnostic.

type DiagnosticConfig

type DiagnosticConfig struct {
	// ProcessID is the process id to diagnose.
	// If it is 0, the current process id will be used.
	// Optional+. Default is 0.
	Pid int
	// EnablePersist is the flag to enable persist the diagnostic data.
	// Default is mongoDB, you can use other storage by implement the interface.
	// Optional+. Default is false.
	EnablePersist bool
	// Port is the port to listen.
	// Optional+. Default is 38080.
	Port int
}

DiagnosticConfig is the configuration for diagnostic.

Jump to

Keyboard shortcuts

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