diagnostic

package
v0.0.0-...-58f07da Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Examples

Constants

View Source
const (
	AgentName = "common:sql:agent/diagnostic/postgres"
)

Variables

View Source
var Diagnostic = func() *Interface {
	return &Interface{
		Ping: func(ctx context.Context) error {
			if ctx == nil {
				ctx = context.Background()
			}
			start := time.Now().UTC()
			err := agent.ping(ctx)
			agent.log(start, time.Since(start), routeName, newRequest(name, method), newResponse(agent.statusCode(err)), ctx)
			return err
		},
		Stat: func() error {
			return agent.stat()
		},
	}
}()

Diagnostic -

Functions

func NewAgent

func NewAgent() messaging.Agent
Example
a := newAgent()

fmt.Printf("test: newAgent() -> [%v]\n", a)
Output:
test: newAgent() -> [common:sql:agent/diagnostic/postgres]

Types

type Interface

type Interface struct {
	Ping func(ctx context.Context) error
	Stat func() error
}

Interface -

type Stat

type Stat struct {
}

Jump to

Keyboard shortcuts

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