pub struct TopicGenerator { /* private fields */ }Expand description
A generator that uses various config options to generate the proper topic names for the wadm API
Implementations§
Source§impl TopicGenerator
impl TopicGenerator
Sourcepub fn new(lattice: &str, prefix: Option<&str>) -> TopicGenerator
pub fn new(lattice: &str, prefix: Option<&str>) -> TopicGenerator
Creates a new topic generator with a lattice ID and an optional API prefix
Sourcepub fn prefix(&self) -> &str
pub fn prefix(&self) -> &str
Returns the full prefix for the topic, including the API prefix and the lattice ID
Sourcepub fn model_prefix(&self) -> &str
pub fn model_prefix(&self) -> &str
Returns the full prefix for model operations (currently the only operations supported in the API)
Sourcepub fn model_put_topic(&self) -> String
pub fn model_put_topic(&self) -> String
Returns the full topic for a model put operation
Sourcepub fn model_get_topic(&self, model_name: &str) -> String
pub fn model_get_topic(&self, model_name: &str) -> String
Returns the full topic for a model get operation
Sourcepub fn model_delete_topic(&self, model_name: &str) -> String
pub fn model_delete_topic(&self, model_name: &str) -> String
Returns the full topic for a model delete operation
Sourcepub fn model_list_topic(&self) -> String
pub fn model_list_topic(&self) -> String
Returns the full topic for a model list operation
Sourcepub fn model_versions_topic(&self, model_name: &str) -> String
pub fn model_versions_topic(&self, model_name: &str) -> String
Returns the full topic for listing the versions of a model
Sourcepub fn model_deploy_topic(&self, model_name: &str) -> String
pub fn model_deploy_topic(&self, model_name: &str) -> String
Returns the full topic for a model deploy operation
Sourcepub fn model_undeploy_topic(&self, model_name: &str) -> String
pub fn model_undeploy_topic(&self, model_name: &str) -> String
Returns the full topic for a model undeploy operation
Sourcepub fn model_status_topic(&self, model_name: &str) -> String
pub fn model_status_topic(&self, model_name: &str) -> String
Returns the full topic for getting a model status
Sourcepub fn wadm_status_topic(&self, app_name: &str) -> String
pub fn wadm_status_topic(&self, app_name: &str) -> String
Returns the full topic for WADM status subscriptions