fleetinspect

package
v0.182.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package fleetinspect collects concrete fleet rollups using existing domain authorities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Select     func(reposelection.Request) ([]reposelection.Target, error)
	Inspect    func([]reposelection.Target, int, func(reposelection.Target, repostatus.Row)) []repostatus.Row
	Scan       func(string) ([]discover.Repo, error)
	Layout     func(context.Context, string) (layout.Summary, error)
	Worktrees  func(context.Context, worktrees.ListOptions) ([]worktrees.ListResult, error)
	Remote     func(string, string, func() []string) ([]discover.Repo, error)
	Owners     func([]string) []string
	Sync       func(context.Context, discover.Repo, string, bool, bool) fleetsync.Result
	Hooks      func(string, string, string, string) (hooks.CheckReport, error)
	Executable func() string
}

type DepthOptions

type DepthOptions struct{ Remote, Hooks bool }

type GitStats

type GitStats struct {
	Inspected int `yaml:"inspected" json:"inspected"`
	Clean     int `yaml:"clean" json:"clean"`
	Attention int `yaml:"attention" json:"attention"`
	Error     int `yaml:"error" json:"error"`
}

type HooksStats

type HooksStats struct {
	Repositories int `yaml:"repositories" json:"repositories"`
	Findings     int `yaml:"findings" json:"findings"`
	Errors       int `yaml:"errors" json:"errors"`
}

type InventoryStats

type InventoryStats struct {
	Organizations int `yaml:"organizations" json:"organizations"`
	Repositories  int `yaml:"repositories" json:"repositories"`
}

type LayoutStats

type LayoutStats struct {
	OK         int `yaml:"ok" json:"ok"`
	TopLevel   int `yaml:"top_level" json:"top_level"`
	Misowned   int `yaml:"misowned" json:"misowned"`
	NoOrigin   int `yaml:"no_origin" json:"no_origin"`
	Unreadable int `yaml:"unreadable" json:"unreadable"`
}

type Options

type Options struct {
	Fleet, AllowEmpty bool
	Parallel          int
	Match, Regex      string
}

type OverviewReport

type OverviewReport struct {
	SchemaVersion int              `yaml:"schema_version" json:"schema_version"`
	Stats         StatsReport      `yaml:"stats" json:"stats"`
	Status        repostatus.Index `yaml:"status" json:"status"`
}

type RemoteStats

type RemoteStats struct {
	WouldClone   int `yaml:"would_clone" json:"would_clone"`
	WouldPull    int `yaml:"would_pull" json:"would_pull"`
	SkippedDirty int `yaml:"skipped_dirty" json:"skipped_dirty"`
	// Ignored counts repos marked with `wb repo ignore`. Distinct from
	// LocalOnly below, which counts repos wb found on disk but not on GitHub.
	Ignored int `yaml:"ignored" json:"ignored"`
	// EmptyRemote counts repos whose origin publishes no branches yet, so
	// there is nothing to pull until someone pushes.
	EmptyRemote int `yaml:"empty_remote" json:"empty_remote"`
	// ArchivedUnlandable counts archived repos whose clone holds commits that
	// exist on no remote. The remote is read-only, so they can never be
	// pushed: the state needs a decision and will not clear on its own.
	ArchivedUnlandable int `yaml:"archived_unlandable" json:"archived_unlandable"`
	LocalOnly          int `yaml:"local_only" json:"local_only"`
	RemoteOnly         int `yaml:"remote_only" json:"remote_only"`
	NoOp               int `yaml:"noop" json:"noop"`
	Error              int `yaml:"error" json:"error"`
}

type Request

type Request struct {
	ProjectsRoot, Filter, Match, Regex string
	Parallel                           int
	AllowEmpty, Remote, Hooks, All     bool
}

type Scope

type Scope struct{ ProjectsRoot string }

type Service

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

func New

func New(deps Dependencies) *Service

func (*Service) Overview

func (service *Service) Overview(_ context.Context, r Request) (OverviewReport, error)

func (*Service) Stats

func (service *Service) Stats(_ context.Context, r Request) (StatsReport, error)

type StatsReport

type StatsReport struct {
	SchemaVersion int            `yaml:"schema_version" json:"schema_version"`
	Inventory     InventoryStats `yaml:"inventory" json:"inventory"`
	Git           GitStats       `yaml:"git" json:"git"`
	Layout        LayoutStats    `yaml:"layout" json:"layout"`
	Worktrees     WorktreeStats  `yaml:"worktrees" json:"worktrees"`
	Remote        *RemoteStats   `yaml:"remote,omitempty" json:"remote,omitempty"`
	Hooks         *HooksStats    `yaml:"hooks,omitempty" json:"hooks,omitempty"`
}

type WorktreeStats

type WorktreeStats struct {
	Tasks     int `yaml:"tasks" json:"tasks"`
	Checkouts int `yaml:"checkouts" json:"checkouts"`
	Dirty     int `yaml:"dirty" json:"dirty"`
	Locked    int `yaml:"locked" json:"locked"`
}

Jump to

Keyboard shortcuts

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