OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::api::metadata::pull_fn Struct Reference

Function object to pull container metadata records and their timestamps from the metadata database. More...

#include <metadata.hpp>

Public Types

using coro_t = boost::coroutines2::coroutine<result_t>
using result_t = std::tuple<record_t, timestamp_t>

Public Member Functions

auto operator() (context_t const &ctx) const -> coro_t::pull_type
auto operator() (context_t const &ctx, std::string const &filter_name) const -> coro_t::pull_type

Detailed Description

Function object to pull container metadata records and their timestamps from the metadata database.

This function object provides two operator() overloads: one that takes a context and returns a pull coroutine for iterating over all records, and another that takes a context and a filter name for iterating over records that match the specified filter. It is designed to be used in a coroutine-based context for efficient retrieval of container metadata records and their timestamps.

Member Function Documentation

◆ operator()() [1/2]

auto oxy::api::metadata::pull_fn::operator() ( context_t const & ctx) const -> coro_t::pull_type
Parameters
ctx- The context for container metadata record operations.
Returns
A coroutine pull type that yields tuples of container metadata records and their timestamps from the metadata database.

◆ operator()() [2/2]

auto oxy::api::metadata::pull_fn::operator() ( context_t const & ctx,
std::string const & filter_name ) const -> coro_t::pull_type
Parameters
ctx- The context for container metadata record operations.
filter_name- The name of the filter to apply when pulling records.
Returns
A coroutine pull type that yields tuples of container metadata records and their timestamps that match