mirror of
https://github.com/garethgeorge/backrest.git
synced 2025-12-13 09:15:39 +00:00
32 lines
474 B
Go
32 lines
474 B
Go
package orchestrator
|
|
|
|
import (
|
|
"bytes"
|
|
"sync"
|
|
)
|
|
|
|
func pruneHelper() {
|
|
// TODO: This is a stub.
|
|
|
|
}
|
|
|
|
// synchronizedBuffer is used for collecting prune command's output
|
|
type synchronizedBuffer struct {
|
|
mu sync.Mutex
|
|
buf bytes.Buffer
|
|
}
|
|
|
|
func (w *synchronizedBuffer) Write(p []byte) (n int, err error) {
|
|
w.mu.Lock()
|
|
defer w.mu.Unlock()
|
|
|
|
return w.buf.Write(p)
|
|
}
|
|
|
|
func (w *synchronizedBuffer) String() string {
|
|
w.mu.Lock()
|
|
defer w.mu.Unlock()
|
|
|
|
return w.buf.String()
|
|
}
|