repodiff

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CallbackPrefix = "[file_change] "

Variables

View Source
var SyntheticGuard = NewRunGuard()

Functions

func CaptureSnapshots

func CaptureSnapshots(ctx context.Context, repos []string) map[string]Snapshot

func CollectMessages

func CollectMessages(ctx context.Context, repos []string, previous map[string]Snapshot) ([]string, map[string]Snapshot)

func DiscoverWatchRepos

func DiscoverWatchRepos(workspaceDir string) []string

func FormatMessage

func FormatMessage(path string, status FileChangeStatus, stat FileDiffStat) string

Types

type Emitter

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

func NewEmitter

func NewEmitter(ctx context.Context, workspaceDir string, progress func(string)) *Emitter

func (*Emitter) Close

func (e *Emitter) Close()

func (*Emitter) Emit

func (e *Emitter) Emit()

type FileChangeStatus

type FileChangeStatus int
const (
	FileChangeStatusUnknown FileChangeStatus = iota
	FileChangeStatusModified
	FileChangeStatusAdded
	FileChangeStatusDeleted
)

type FileDiffStat

type FileDiffStat struct {
	Additions int
	Deletions int
}

type Lease

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

type RunGuard

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

func NewRunGuard

func NewRunGuard() *RunGuard

func (*RunGuard) Acquire

func (g *RunGuard) Acquire(repos []string) *Lease

func (*RunGuard) CanEmit

func (g *RunGuard) CanEmit(lease *Lease) bool

func (*RunGuard) Release

func (g *RunGuard) Release(lease *Lease)

type Snapshot

type Snapshot map[string]FileDiffStat

Jump to

Keyboard shortcuts

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