(ctx context.Context, _ *super.Context, poolID ksuid.KSUID, branchName string, reader sio.Reader, commit api.CommitMessage)
| 103 | } |
| 104 | |
| 105 | func (r *remote) Load(ctx context.Context, _ *super.Context, poolID ksuid.KSUID, branchName string, reader sio.Reader, commit api.CommitMessage) (ksuid.KSUID, error) { |
| 106 | pr, pw := io.Pipe() |
| 107 | go func() { |
| 108 | w := bsupio.NewWriter(sio.NopCloser(pw)) |
| 109 | err := sio.CopyWithContext(ctx, w, reader) |
| 110 | if err2 := w.Close(); err == nil { |
| 111 | err = err2 |
| 112 | } |
| 113 | pw.CloseWithError(err) |
| 114 | }() |
| 115 | res, err := r.conn.Load(ctx, poolID, branchName, api.MediaTypeBSUP, pr, commit) |
| 116 | return res.Commit, err |
| 117 | } |
| 118 | |
| 119 | func (r *remote) Revert(ctx context.Context, poolID ksuid.KSUID, branchName string, commitID ksuid.KSUID, message api.CommitMessage) (ksuid.KSUID, error) { |
| 120 | res, err := r.conn.Revert(ctx, poolID, branchName, commitID, message) |
nothing calls this directly
no test coverage detected