(ctx context.Context, name string, conditions *storage.Conditions)
| 456 | } |
| 457 | |
| 458 | func (rw *readerWriter) writer(ctx context.Context, name string, conditions *storage.Conditions) *storage.Writer { |
| 459 | o := rw.bucket.Object(name) |
| 460 | if conditions != nil { |
| 461 | o = o.If(*conditions) |
| 462 | } |
| 463 | w := o.NewWriter(ctx) |
| 464 | w.ChunkSize = rw.cfg.ChunkBufferSize |
| 465 | |
| 466 | if rw.cfg.ObjectMetadata != nil { |
| 467 | w.Metadata = rw.cfg.ObjectMetadata |
| 468 | } |
| 469 | |
| 470 | if rw.cfg.ObjectCacheControl != "" { |
| 471 | w.CacheControl = rw.cfg.ObjectCacheControl |
| 472 | } |
| 473 | |
| 474 | return w |
| 475 | } |
| 476 | |
| 477 | func (rw *readerWriter) readAll(ctx context.Context, name string) ([]byte, *storage.ReaderObjectAttrs, error) { |
| 478 | r, err := rw.hedgedBucket.Object(name).NewReader(ctx) |
no outgoing calls
no test coverage detected