MCPcopy
hub / github.com/wal-g/wal-g / PushStream

Method PushStream

internal/stream_push_helper.go:23–29  ·  view source on GitHub ↗

TODO : unit tests PushStream compresses a stream and push it

(ctx context.Context, stream io.Reader)

Source from the content-addressed store, hash-verified

21// TODO : unit tests
22// PushStream compresses a stream and push it
23func (uploader *RegularUploader) PushStream(ctx context.Context, stream io.Reader) (string, error) {
24 backupName := StreamPrefix + utility.TimeNowCrossPlatformUTC().Format(utility.BackupTimeFormat)
25 dstPath := GetStreamName(backupName, uploader.Compressor.FileExtension())
26 err := uploader.PushStreamToDestination(ctx, stream, dstPath)
27
28 return backupName, err
29}
30
31// TODO : unit tests
32// returns backup_prefix

Callers

nothing calls this directly

Calls 4

TimeNowCrossPlatformUTCFunction · 0.92
GetStreamNameFunction · 0.85
FileExtensionMethod · 0.65

Tested by

no test coverage detected