Skip to content

Commit 6e64091

Browse files
committed
Move client content store to proxy package
Signed-off-by: Derek McGowan <[email protected]>
1 parent 48b0a02 commit 6e64091

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import (
3838
versionservice "github.com/containerd/containerd/api/services/version/v1"
3939
"github.com/containerd/containerd/containers"
4040
"github.com/containerd/containerd/content"
41+
contentproxy "github.com/containerd/containerd/content/proxy"
4142
"github.com/containerd/containerd/defaults"
4243
"github.com/containerd/containerd/dialer"
4344
"github.com/containerd/containerd/errdefs"
@@ -460,7 +461,7 @@ func (c *Client) ContentStore() content.Store {
460461
if c.contentStore != nil {
461462
return c.contentStore
462463
}
463-
return NewContentStoreFromClient(contentapi.NewContentClient(c.conn))
464+
return contentproxy.NewContentStore(contentapi.NewContentClient(c.conn))
464465
}
465466

466467
// SnapshotService returns the underlying snapshotter for the provided snapshotter name
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package containerd
17+
package proxy
1818

1919
import (
2020
"context"
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package containerd
17+
package proxy
1818

1919
import (
2020
"context"
@@ -31,8 +31,9 @@ type remoteContent struct {
3131
client contentapi.ContentClient
3232
}
3333

34-
// NewContentStoreFromClient returns a new content store
35-
func NewContentStoreFromClient(client contentapi.ContentClient) content.Store {
34+
// NewContentStore returns a new content store which communicates over a GRPC
35+
// connection using the containerd content GRPC API.
36+
func NewContentStore(client contentapi.ContentClient) content.Store {
3637
return &remoteContent{
3738
client: client,
3839
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package containerd
17+
package proxy
1818

1919
import (
2020
"context"

0 commit comments

Comments
 (0)