observability

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package observability implements the `da observability` command subtree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(deps Deps) *cobra.Command

NewCmd builds the `da observability login|sync|status` subtree.

Types

type Deps

type Deps struct {
	Version string
	JSON    func() bool
	// contains filtered or unexported fields
}

Deps carries build metadata and global output flags from package commands. Runtime collaborators have production defaults and are replaced only by same-package tests.

type SyncReport

type SyncReport struct {
	Accepted    int      `json:"accepted"`
	Deduped     int      `json:"deduped"`
	Retained    int      `json:"retained"`
	Quarantined int      `json:"quarantined"`
	Pruned      int      `json:"pruned,omitempty"`
	Skipped     int      `json:"skipped,omitempty"`
	Errors      []string `json:"errors,omitempty"`
}

SyncReport is the stable result returned to explicit and best-effort callers.

func PublishBestEffort

func PublishBestEffort(ctx context.Context, projectDir, version string, out io.Writer) SyncReport

PublishBestEffort drains due outbox entries for workflow-hook callers. It deliberately returns only a report: publication can never replace the local workflow command's exit status. Explicit `da observability sync` uses the same state machine with forced attempts and returns failures as errors.

Jump to

Keyboard shortcuts

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