Trait splinter::service::ServiceFactory [−][src]
pub trait ServiceFactory: Send {
fn available_service_types(&self) -> &[String];
fn create(
&self,
service_id: String,
service_type: &str,
circuit_id: &str,
args: HashMap<String, String>
) -> Result<Box<dyn Service>, FactoryCreateError>;
fn get_rest_endpoints(&self) -> Vec<ServiceEndpoint>;
}
Expand description
A ServiceFactory
creates services.
Required methods
fn available_service_types(&self) -> &[String]
fn available_service_types(&self) -> &[String]
Return the available service types that this factory can create.
Create a Service instance with the given ID, of the given type, the given circuit_id, with the given arguments.
fn get_rest_endpoints(&self) -> Vec<ServiceEndpoint>
fn get_rest_endpoints(&self) -> Vec<ServiceEndpoint>
Get the ServiceEndpoint
definitions that represent the REST API resources provided by
the services that this factory can create.