Move client content store to proxy package
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
48b0a022ef
commit
6e64091322
@ -38,6 +38,7 @@ import (
|
|||||||
versionservice "github.com/containerd/containerd/api/services/version/v1"
|
versionservice "github.com/containerd/containerd/api/services/version/v1"
|
||||||
"github.com/containerd/containerd/containers"
|
"github.com/containerd/containerd/containers"
|
||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
|
contentproxy "github.com/containerd/containerd/content/proxy"
|
||||||
"github.com/containerd/containerd/defaults"
|
"github.com/containerd/containerd/defaults"
|
||||||
"github.com/containerd/containerd/dialer"
|
"github.com/containerd/containerd/dialer"
|
||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
@ -460,7 +461,7 @@ func (c *Client) ContentStore() content.Store {
|
|||||||
if c.contentStore != nil {
|
if c.contentStore != nil {
|
||||||
return c.contentStore
|
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
|
// SnapshotService returns the underlying snapshotter for the provided snapshotter name
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package containerd
|
package proxy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
@ -14,7 +14,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package containerd
|
package proxy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -31,8 +31,9 @@ type remoteContent struct {
|
|||||||
client contentapi.ContentClient
|
client contentapi.ContentClient
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewContentStoreFromClient returns a new content store
|
// NewContentStore returns a new content store which communicates over a GRPC
|
||||||
func NewContentStoreFromClient(client contentapi.ContentClient) content.Store {
|
// connection using the containerd content GRPC API.
|
||||||
|
func NewContentStore(client contentapi.ContentClient) content.Store {
|
||||||
return &remoteContent{
|
return &remoteContent{
|
||||||
client: client,
|
client: client,
|
||||||
}
|
}
|
@ -14,7 +14,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package containerd
|
package proxy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
Loading…
Reference in New Issue
Block a user