blob: 57d65a0c851aa1a1ac98ebb29d8b115036c7b8a3 [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 MAX_NAME_SIZE uint64 = 100;
type PersistResult = strict enum {
// 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(struct {
tag string:MAX_NAME_SIZE;
}) -> (struct {
result PersistResult;
});
};