bundles

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BundleListJsonFilename string = "bundle-list.json"
	BundleListFilename     string = "bundle-list"
	RepoBundleListFilename string = "repo-bundle-list"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	// The absolute path to the bundle from the root of the bundle web server,
	// typically '/org/route/filename'.
	URI string

	// The absolute path to the bundle on disk
	Filename string

	// The creation token used in Git's 'creationToken' heuristic
	CreationToken int64
}

func NewBundle

func NewBundle(repo *core.Repository, timestamp int64) Bundle

type BundleHeader

type BundleHeader struct {
	Version int64

	// The Refs map is given as Refs[<refname>] = <oid>.
	Refs map[string]string

	// The PrereqCommits map is given as
	// PrereqCommits[<oid>] = <commit-msg>
	PrereqCommits map[string]string
}

type BundleList

type BundleList struct {
	Version   int
	Mode      string
	Heuristic string
	Bundles   map[int64]Bundle
}

func NewBundleList

func NewBundleList() *BundleList

type BundleProvider

type BundleProvider interface {
	CreateInitialBundle(ctx context.Context, repo *core.Repository) Bundle
	CreateIncrementalBundle(ctx context.Context, repo *core.Repository, list *BundleList) (*Bundle, error)

	CreateSingletonList(ctx context.Context, bundle Bundle) *BundleList
	WriteBundleList(ctx context.Context, list *BundleList, repo *core.Repository) error
	GetBundleList(ctx context.Context, repo *core.Repository) (*BundleList, error)
	CollapseList(ctx context.Context, repo *core.Repository, list *BundleList) error
}

func NewBundleProvider

func NewBundleProvider(
	l log.TraceLogger,
	fs common.FileSystem,
	g git.GitHelper,
) BundleProvider

Jump to

Keyboard shortcuts

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