blob: 593c5298538f473deb2ec45ebb37a9733fb7462e [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.diagnostics.persist;
const uint64 MAX_NAME_SIZE = 100;
enum PersistResult {
// The persistence request was scheduled to
// a fetcher's queue.
QUEUED = 1;
// TODO(cphoenix): What is too big?
TOO_BIG = 2;
// The provided tag for persistence wasn't present
// in the service configuration.
BAD_NAME = 3;
// Service encountered an issue that prevented the scheduling of
// the persistence.
INTERNAL_ERROR = 4;
};
/// Stores limited amounts of Inspect-formatted data till the next boot and publishes it in
/// the "diagnostics-persistence" component's inspect tree.
[Discoverable]
protocol DataPersistence {
/// Schedule the persistence the selected data associated with this
/// tag in diagnostics-persistence config files. Fetching the selected
/// data may be delayed if there is other work in a given service's queue.
Persist(string:MAX_NAME_SIZE tag) -> (PersistResult result);
};