Example #1
0
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)
}
Example #2
0
File: api.go Project: devick/flynn
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)
}
Example #3
0
func (s *Server) WriteSnapshot(w io.Writer) error {
	return snapshot.WriteTo(s.Aggregator.ReadAll(), w)
}