Merge pull request #970 from dmcgowan/remote-writer-ref
Set the remote writer ref on writer creation
This commit is contained in:
commit
0b13b07092
@ -115,6 +115,7 @@ func (rs *remoteStore) Writer(ctx context.Context, ref string, size int64, expec
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &remoteWriter{
|
return &remoteWriter{
|
||||||
|
ref: ref,
|
||||||
client: wrclient,
|
client: wrclient,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
}, nil
|
}, nil
|
||||||
|
@ -16,14 +16,6 @@ type remoteWriter struct {
|
|||||||
digest digest.Digest
|
digest digest.Digest
|
||||||
}
|
}
|
||||||
|
|
||||||
func newRemoteWriter(client contentapi.Content_WriteClient, ref string, offset int64) (*remoteWriter, error) {
|
|
||||||
return &remoteWriter{
|
|
||||||
ref: ref,
|
|
||||||
client: client,
|
|
||||||
offset: offset,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// send performs a synchronous req-resp cycle on the client.
|
// send performs a synchronous req-resp cycle on the client.
|
||||||
func (rw *remoteWriter) send(req *contentapi.WriteRequest) (*contentapi.WriteResponse, error) {
|
func (rw *remoteWriter) send(req *contentapi.WriteRequest) (*contentapi.WriteResponse, error) {
|
||||||
if err := rw.client.Send(req); err != nil {
|
if err := rw.client.Send(req); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user