Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

transport: create Client interface #132

Merged
merged 3 commits into from
Nov 23, 2016
Merged

transport: create Client interface #132

merged 3 commits into from
Nov 23, 2016

Conversation

smola
Copy link
Collaborator

@smola smola commented Nov 22, 2016

  • plumbing: move plumbing/client package to plumbing/transport.
  • a Client can instantiate any client transport service.
  • InstallProtocol installs a Client for a given protocol, instead of just a UploadPackService.
  • A Client can open a session for fetch-pack or send-pack for a specific Endpoint.
  • Adapt ssh and http clients to the new client interface.

* A Client can instantiate any client transport service.
* InstallProtocol installs a Client for a given protocol,
  instead of just a UploadPackService.
* A Client can open a session for fetch-pack or send-pack
  for a specific Endpoint.
* Adapt ssh and http clients to the new client interface.
@@ -1,46 +1,114 @@
// Package clients includes the implementation for different transport protocols
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the package has change from clients to transport.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated docs, since they were outdated (not just the package name).

@@ -1,46 +1,114 @@
// Package clients includes the implementation for different transport protocols
//
// go-git needs the packfile and the refs of the repo. The
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should capitalize go-git here, as in man pages: https://groups.google.com/forum/#!topic/comp.os.plan9/lZ6kTwJfeAA

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

type FetchPackSession interface {
Session
// AdvertisedReferences retrieves the advertised references for a
// repository. It must be called before Pack.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Pack/FetchPack/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must be called before Pack.

we should briefly explain why: is this because the protocol says so or because some internal limitation in our code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Added further clarifications.
It SHOULD be called before FetchPack and it MUST NOT be called after FetchPack. This is to respect the protocol, so that one of our "Sessions" match a single git-fetch-pack execution.

@mcuadros mcuadros merged commit 6aaad69 into src-d:master Nov 23, 2016
mcuadros pushed a commit that referenced this pull request Nov 23, 2016
* plumbing: move plumbing/client package to plumbing/transport.

* transport: create Client interface.

* A Client can instantiate any client transport service.
* InstallProtocol installs a Client for a given protocol,
  instead of just a UploadPackService.
* A Client can open a session for fetch-pack or send-pack
  for a specific Endpoint.
* Adapt ssh and http clients to the new client interface.

* updated doc
mcuadros pushed a commit that referenced this pull request Jan 31, 2017
* plumbing: move plumbing/client package to plumbing/transport.

* transport: create Client interface.

* A Client can instantiate any client transport service.
* InstallProtocol installs a Client for a given protocol,
  instead of just a UploadPackService.
* A Client can open a session for fetch-pack or send-pack
  for a specific Endpoint.
* Adapt ssh and http clients to the new client interface.

* updated doc
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants