include "uuid.fbs";

namespace vast.fbs.layout_statistics;

table v0 {
  /// Name of the layout.
  name: string;

  /// Number of events of that type.
  count: uint64;
}

namespace vast.fbs.meta_index;

/// The persistent state of the meta index.
table v0 {
  /// The meta index state.
  /// TODO: tear apart into different pieces.
  state: [ubyte];
}

namespace vast.fbs.index;

/// The persistent state of the index.
table v0 {
  /// The contained partition UUIDs.
  partitions: [uuid.v0];

  /// The index statistics
  stats: [layout_statistics.v0];
}

namespace vast.fbs.index;

union Index {
  v0,
}

namespace vast.fbs;

table Index {
  index: index.Index;
}

root_type Index;

file_identifier "vIDX";
