bundleuri

package
v16.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package bundleuri is used to enable the use Bundle-URI when the client clones/fetches from the repository.

Bundle-URI is a concept in Git that allows the server to send one or more URIs where git bundles are available. The client can download such bundles to prepopulate the repository before it starts the object negotiation with the server. This reduces the CPU load on the server, and the amount of traffic that has to travel directly from server to client.

This feature piggy-backs onto server-side backups. Refer to the backup documentation how to create and store bundles on a cloud provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InfoRefsGitConfig

func InfoRefsGitConfig(ctx context.Context) []git.ConfigPair

InfoRefsGitConfig return a slice of git.ConfigPairs you can inject into the call to git-upload-pack(1) --advertise-refs, to advertise the use of bundle-URI to the client who clones/fetches from the repository.

func UploadPackGitConfig

func UploadPackGitConfig(
	ctx context.Context,
	backupLocator backup.Locator,
	backupSink backup.Sink,
	repo storage.Repository,
) []git.ConfigPair

UploadPackGitConfig return a slice of git.ConfigPairs you can inject into the call to git-upload-pack(1) to advertise the available bundle to the client who clones/fetches from the repository. In case no backups could be found or something else goes wrong, an empty slice is returned without error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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