Skip to content

Commit

Permalink
Move client content store to proxy package
Browse files Browse the repository at this point in the history
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
  • Loading branch information
dmcgowan committed May 8, 2018
1 parent 48b0a02 commit 6e64091
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
versionservice "github.com/containerd/containerd/api/services/version/v1"
"github.com/containerd/containerd/containers"
"github.com/containerd/containerd/content"
contentproxy "github.com/containerd/containerd/content/proxy"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/dialer"
"github.com/containerd/containerd/errdefs"
Expand Down Expand Up @@ -460,7 +461,7 @@ func (c *Client) ContentStore() content.Store {
if c.contentStore != nil {
return c.contentStore
}
return NewContentStoreFromClient(contentapi.NewContentClient(c.conn))
return contentproxy.NewContentStore(contentapi.NewContentClient(c.conn))
}

// SnapshotService returns the underlying snapshotter for the provided snapshotter name
Expand Down
2 changes: 1 addition & 1 deletion content_reader.go → content/proxy/content_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package containerd
package proxy

import (
"context"
Expand Down
7 changes: 4 additions & 3 deletions content_store.go → content/proxy/content_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package containerd
package proxy

import (
"context"
Expand All @@ -31,8 +31,9 @@ type remoteContent struct {
client contentapi.ContentClient
}

// NewContentStoreFromClient returns a new content store
func NewContentStoreFromClient(client contentapi.ContentClient) content.Store {
// NewContentStore returns a new content store which communicates over a GRPC
// connection using the containerd content GRPC API.
func NewContentStore(client contentapi.ContentClient) content.Store {
return &remoteContent{
client: client,
}
Expand Down
2 changes: 1 addition & 1 deletion content_writer.go → content/proxy/content_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package containerd
package proxy

import (
"context"
Expand Down

0 comments on commit 6e64091

Please sign in to comment.