1#ifndef adc_publisher_hpp
2#define adc_publisher_hpp
48 virtual std::string_view
name()
const = 0;
51 virtual std::string_view
version()
const = 0;
56 virtual int publish(std::shared_ptr<builder_api> b) = 0;
64 virtual int config(
const std::map< std::string, std::string >& m) = 0;
73 virtual int config(
const std::map< std::string, std::string >& m, std::string_view env_prefix) = 0;
97typedef std::map< const std::string, std::shared_ptr<publisher_api> >
plugin_map;
Publisher plugin interface.
virtual std::string_view name() const =0
virtual std::string_view version() const =0
virtual void pause()=0
Pause publishing until a call to resume. Duplicate calls are allowed.
virtual int publish(std::shared_ptr< builder_api > b)=0
Publish the content of the builder.
virtual int config(const std::map< std::string, std::string > &m, std::string_view env_prefix)=0
Configure the plugin with the options given and the corresponding environment variables.
virtual int initialize()=0
Ready the plugin to publish following the configuration options set or defaulted.
virtual void finalize()=0
Stop publishing and release any resources held for managing publication.
virtual void resume()=0
Resume publishing Duplicate calls are allowed.
virtual int config(const std::map< std::string, std::string > &m)=0
Configure the plugin with the options given.
virtual const std::map< const std::string, const std::string > & get_option_defaults()=0
Look up the settable options and their defaults.
std::string get_default_affinity()
std::vector< std::shared_ptr< publisher_api > > publisher_vector
list of publishers
std::map< const std::string, std::shared_ptr< publisher_api > > plugin_map
name/plugin map.
std::pair< std::string, std::shared_ptr< publisher_api > > pair_string_publisher_api
named publisher
version publisher_api_version("1.0.0", {"none"})
A version with tags list.