scanner

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scan

func Scan(basePath string, cfg ScanConfig) ([]Service, *NameIndex, error)

func StaleCount

func StaleCount(svc *Service, services []Service, idx *NameIndex) int

Types

type Integration

type Integration struct {
	ClientID    string // e.g. "case-data"
	SpecVersion string // version from integration spec's info.version (empty if no spec found)
}

type NameIndex

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

NameIndex is a pre-computed lookup for resolving client IDs to service names. Built once after scanning, reused everywhere.

func NewNameIndex

func NewNameIndex(serviceNames map[string]bool) *NameIndex

func NewNameIndexFromServices

func NewNameIndexFromServices(services []Service) *NameIndex

NewNameIndexFromServices builds a NameIndex from a slice of services.

func (*NameIndex) IsInternal

func (idx *NameIndex) IsInternal(clientID string) bool

func (*NameIndex) Resolve

func (idx *NameIndex) Resolve(clientID string) string

func (*NameIndex) ResolveExcluding added in v1.0.10

func (idx *NameIndex) ResolveExcluding(clientID, exclude string) string

ResolveExcluding resolves a client ID but skips the excluded name. Falls back to collision aliases when the primary match is excluded.

type ScanConfig

type ScanConfig struct {
	RepoPrefixes    []string
	StandaloneRepos map[string]string
}

ScanConfig holds the configurable parts of scanning.

type Service

type Service struct {
	Name         string        // e.g. "case-data" (from dir name)
	Path         string        // absolute path to repo
	Version      string        // from pom.xml <version>
	Integrations []Integration // outbound dependencies
	DependedOnBy []string      // computed: which services integrate with this one
}

func FindService

func FindService(name string, services []Service) *Service

Jump to

Keyboard shortcuts

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