Documentation
¶
Overview ¶
Package lfs keeps Git LFS objects in the PC's local Space. git-lfs runs modlock as its transfer agent, and the agent reaches the daemon, which serves one UnixFS object that every repository on the PC shares: LFS names each object by its content's hash, so repositories that hold the same file store it once.
Index ¶
Constants ¶
const ObjectKey = "git-lfs"
ObjectKey is the Space's UnixFS object that holds the LFS objects.
Variables ¶
This section is empty.
Functions ¶
func Refuse ¶
Refuse answers git-lfs's first request with cause and returns cause, so git-lfs shows why the agent cannot run.
func RunAgent ¶
func RunAgent(ctx context.Context, client srpc.Client, tmpDir string, r io.Reader, w io.Writer) error
RunAgent serves git-lfs's transfer protocol on r and w, storing objects through the daemon that client reaches. Downloads land in tmpDir, which must be on the same filesystem as the repository's LFS store. A daemon that cannot serve the object answers git-lfs with the cause.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the Space's LFS object to agents once the daemon has opened the Space. Calls that arrive earlier wait for it.
func (*Server) Fail ¶
Fail fails each agent with err, for a daemon that cannot open its Space. Call it at most once, and not with Serve.
func (*Server) InvokeMethod ¶
InvokeMethod serves a call on the object's root once it is open.