implement list indexes

This commit is contained in:
mpostma
2021-02-03 17:44:20 +01:00
parent 482f734e53
commit d43dc4824c
6 changed files with 120 additions and 26 deletions

View File

@ -9,8 +9,8 @@ use std::sync::Arc;
use sha2::Digest;
use crate::index_controller::{IndexController, LocalIndexController};
use crate::{option::Opt, index_controller::Settings};
use crate::index_controller::{IndexController, LocalIndexController, IndexMetadata, Settings};
use crate::option::Opt;
#[derive(Clone)]
pub struct Data {
@ -114,6 +114,10 @@ impl Data {
})
}
pub fn list_indexes(&self) -> anyhow::Result<Vec<IndexMetadata>> {
self.index_controller.list_indexes()
}
#[inline]
pub fn http_payload_size_limit(&self) -> usize {
self.options.http_payload_size_limit.get_bytes() as usize