telemetry

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEndpoint = "https://api.net-shield.net/api/v1/telemetry"
	DefaultTimeout  = 200 * time.Millisecond
)

Variables

This section is empty.

Functions

func Send

func Send(payload Payload) *sync.WaitGroup

Send fires a telemetry payload asynchronously with a WaitGroup.

func WaitWithTimeout

func WaitWithTimeout(wg *sync.WaitGroup, timeout time.Duration)

WaitWithTimeout waits for the WaitGroup with a deadline.

Types

type Payload

type Payload struct {
	ToolName      string                 `json:"tool_name"`
	Repo          string                 `json:"repo,omitempty"`
	Decision      string                 `json:"decision,omitempty"`
	FindingCount  int                    `json:"finding_count,omitempty"`
	BlockingCount int                    `json:"blocking_count,omitempty"`
	DurationMs    int64                  `json:"duration_ms,omitempty"`
	Metadata      map[string]interface{} `json:"metadata,omitempty"`
}

Payload is the telemetry data sent to the platform API.

Jump to

Keyboard shortcuts

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