func (s *Server) WriteSnapshotFile(path string) error { f, err := os.Create(path) if err != nil { return err } defer f.Close() return snapshot.WriteTo(s.Aggregator.ReadAll(), f) }
func (a *aggregatorAPI) GetSnapshot(ctx context.Context, w http.ResponseWriter, req *http.Request) { w.Header().Set("Content-Type", "application/vnd.flynn.logaggregator-snapshot") snapshot.WriteTo(a.agg.ReadAll(), w) }
func (s *Server) WriteSnapshot(w io.Writer) error { return snapshot.WriteTo(s.Aggregator.ReadAll(), w) }