@@ -12,15 +12,7 @@ import (
1212 "github.com/silenium-dev/docker-wrapper/pkg/client/pull/state"
1313)
1414
15- func (c * Client ) PullWithState (ctx context.Context , ref reference.Named ) (chan state.Pull , error ) {
16- eventChan , err := c .PullWithEvents (ctx , ref )
17- if err != nil {
18- return nil , err
19- }
20- return pull .StateFromStream (ctx , ref , eventChan ), nil
21- }
22-
23- func (c * Client ) PullWithEvents (ctx context.Context , ref reference.Named ) (chan events.PullEvent , error ) {
15+ func (c * Client ) ImagePullWithEvents (ctx context.Context , ref reference.Named ) (chan events.PullEvent , error ) {
2416 var encodedAuth string
2517 var err error
2618 if c .authProvider != nil {
@@ -37,8 +29,16 @@ func (c *Client) PullWithEvents(ctx context.Context, ref reference.Named) (chan
3729 return pull .ParseStream (ctx , reader ), nil
3830}
3931
40- func (c * Client ) Pull (ctx context.Context , ref reference.Named ) (digest.Digest , error ) {
41- eventChan , err := c .PullWithEvents (ctx , ref )
32+ func (c * Client ) ImagePullWithState (ctx context.Context , ref reference.Named ) (chan state.Pull , error ) {
33+ eventChan , err := c .ImagePullWithEvents (ctx , ref )
34+ if err != nil {
35+ return nil , err
36+ }
37+ return pull .StateFromStream (ctx , ref , eventChan ), nil
38+ }
39+
40+ func (c * Client ) ImagePull (ctx context.Context , ref reference.Named ) (digest.Digest , error ) {
41+ eventChan , err := c .ImagePullWithEvents (ctx , ref )
4242 if err != nil {
4343 return "" , err
4444 }
0 commit comments