Trait AsyncDataSourceService

Source
pub trait AsyncDataSourceService {
    // Required methods
    fn search_channels(
        &self,
        auth_: BearerToken,
        query: SearchChannelsRequest,
    ) -> impl Future<Output = Result<SearchChannelsResponse, Error>> + Send;
    fn search_filtered_channels(
        &self,
        auth_: BearerToken,
        query: SearchFilteredChannelsRequest,
    ) -> impl Future<Output = Result<SearchFilteredChannelsResponse, Error>> + Send;
    fn search_hierarchical_channels(
        &self,
        auth_: BearerToken,
        query: SearchHierarchicalChannelsRequest,
    ) -> impl Future<Output = Result<SearchHierarchicalChannelsResponse, Error>> + Send;
    fn index_channel_prefix_tree(
        &self,
        auth_: BearerToken,
        request: IndexChannelPrefixTreeRequest,
    ) -> impl Future<Output = Result<ChannelPrefixTree, Error>> + Send;
    fn batch_get_channel_prefix_trees(
        &self,
        auth_: BearerToken,
        request: BatchGetChannelPrefixTreeRequest,
    ) -> impl Future<Output = Result<BatchGetChannelPrefixTreeResponse, Error>> + Send;
    fn get_available_tags_for_channel(
        &self,
        auth_: BearerToken,
        request: GetAvailableTagsForChannelRequest,
    ) -> impl Future<Output = Result<GetAvailableTagsForChannelResponse, Error>> + Send;
    fn get_data_scope_bounds(
        &self,
        auth_: BearerToken,
        request: BatchGetDataScopeBoundsRequest,
    ) -> impl Future<Output = Result<BatchGetDataScopeBoundsResponse, Error>> + Send;
    fn get_tag_values_for_data_source(
        &self,
        auth_: BearerToken,
        data_source_rid: DataSourceRid,
        request: GetTagValuesForDataSourceRequest,
    ) -> impl Future<Output = Result<BTreeMap<TagName, BTreeSet<TagValue>>, Error>> + Send;
}
Expand description

Data sources are data input to runs, including databases, CSV, video, and streaming data. They contain channels that represent the series data. The DataSource Service is responsible for indexing and searching channels across data sources.

Required Methods§

Source

fn search_channels( &self, auth_: BearerToken, query: SearchChannelsRequest, ) -> impl Future<Output = Result<SearchChannelsResponse, Error>> + Send

Returns channels that match the search criteria. Results are sorted by similarity score.

Source

fn search_filtered_channels( &self, auth_: BearerToken, query: SearchFilteredChannelsRequest, ) -> impl Future<Output = Result<SearchFilteredChannelsResponse, Error>> + Send

Returns channels that match the search criteria. Results are sorted by similarity score.

Source

fn search_hierarchical_channels( &self, auth_: BearerToken, query: SearchHierarchicalChannelsRequest, ) -> impl Future<Output = Result<SearchHierarchicalChannelsResponse, Error>> + Send

Returns only channels that are direct children of the parent. Returns results sorted alphabetically.

Source

fn index_channel_prefix_tree( &self, auth_: BearerToken, request: IndexChannelPrefixTreeRequest, ) -> impl Future<Output = Result<ChannelPrefixTree, Error>> + Send

Indexes the channel prefix tree for a specified data source. This operation constructs a prefix tree from the channels available in the data source.

Source

fn batch_get_channel_prefix_trees( &self, auth_: BearerToken, request: BatchGetChannelPrefixTreeRequest, ) -> impl Future<Output = Result<BatchGetChannelPrefixTreeResponse, Error>> + Send

Returns the channel prefix tree for each of the specified data sources. If the tree for a data source has not been indexed, it will be omitted from the map.

Source

fn get_available_tags_for_channel( &self, auth_: BearerToken, request: GetAvailableTagsForChannelRequest, ) -> impl Future<Output = Result<GetAvailableTagsForChannelResponse, Error>> + Send

Returns the the set of all tag keys and their values that are available for the specified channel given an initial set of filters.

Source

fn get_data_scope_bounds( &self, auth_: BearerToken, request: BatchGetDataScopeBoundsRequest, ) -> impl Future<Output = Result<BatchGetDataScopeBoundsResponse, Error>> + Send

Returns the maximum data timestamps for the specified data scopes. Responses are returned in the same order as requests.

Source

fn get_tag_values_for_data_source( &self, auth_: BearerToken, data_source_rid: DataSourceRid, request: GetTagValuesForDataSourceRequest, ) -> impl Future<Output = Result<BTreeMap<TagName, BTreeSet<TagValue>>, Error>> + Send

Returns available tag values for a given data source for a set of tag keys. For Nominal data sources, a time range can be provided to filter tag values to those present within the months spanned by the range. If no time range is provided, this defaults to the last month. For external data sources, the range must not be specified, as all tag values are returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§