mirror of
https://github.com/containerd/containerd.git
synced 2026-08-12 22:16:27 +00:00
Merge pull request #3219 from jcordasc/cherrypick-#3213-release-1.2
[release/1.2 backport] Correct import path and PusherFunc signature
This commit is contained in:
@@ -72,9 +72,9 @@ func (fn FetcherFunc) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.Re
|
||||
|
||||
// PusherFunc allows package users to implement a Pusher with just a
|
||||
// function.
|
||||
type PusherFunc func(ctx context.Context, desc ocispec.Descriptor, r io.Reader) error
|
||||
type PusherFunc func(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error)
|
||||
|
||||
// Push content
|
||||
func (fn PusherFunc) Push(ctx context.Context, desc ocispec.Descriptor, r io.Reader) error {
|
||||
return fn(ctx, desc, r)
|
||||
func (fn PusherFunc) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) {
|
||||
return fn(ctx, desc)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ package server
|
||||
import (
|
||||
"context"
|
||||
|
||||
srvconfig "github.com/containerd/containerd/server/config"
|
||||
srvconfig "github.com/containerd/containerd/services/server/config"
|
||||
)
|
||||
|
||||
func apply(_ context.Context, _ *srvconfig.Config) error {
|
||||
|
||||
Reference in New Issue
Block a user