Struct splinter::orchestrator::ServiceOrchestrator [−][src]
pub struct ServiceOrchestrator { /* fields omitted */ }Expand description
The ServiceOrchestrator manages initialization and shutdown of services.
Implementations
pub fn new(
service_factories: Vec<Box<dyn ServiceFactory>>,
connection: Box<dyn Connection>,
incoming_capacity: usize,
outgoing_capacity: usize,
channel_capacity: usize
) -> Result<Self, NewOrchestratorError>👎 Deprecated since 0.5.1: please use ServiceOrchestratorBuilder instead
pub fn new(
service_factories: Vec<Box<dyn ServiceFactory>>,
connection: Box<dyn Connection>,
incoming_capacity: usize,
outgoing_capacity: usize,
channel_capacity: usize
) -> Result<Self, NewOrchestratorError>please use ServiceOrchestratorBuilder instead
Create a new ServiceOrchestrator. This starts up 3 threads for relaying messages to and
from services. Returns the ServiceOrchestrator and the threads JoinHandles
pub fn initialize_service(
&self,
service_definition: ServiceDefinition,
args: HashMap<String, String>
) -> Result<(), InitializeServiceError>
pub fn initialize_service(
&self,
service_definition: ServiceDefinition,
args: HashMap<String, String>
) -> Result<(), InitializeServiceError>Initialize (create and start) a service according to the specified definition. The arguments provided must match those required to create the service.
pub fn stop_service(
&self,
service_definition: &ServiceDefinition
) -> Result<(), ShutdownServiceError>
pub fn stop_service(
&self,
service_definition: &ServiceDefinition
) -> Result<(), ShutdownServiceError>Stop the specified service.
pub fn purge_service(
&self,
service_definition: &ServiceDefinition
) -> Result<(), InternalError>
pub fn purge_service(
&self,
service_definition: &ServiceDefinition
) -> Result<(), InternalError>Purge the specified service state, based on its service implementation.
Shut down (stop and destroy) all services managed by this ServiceOrchestrator and single
the ServiceOrchestrator to shutdown
pub fn list_services(
&self,
circuits: Vec<String>,
service_types: Vec<String>
) -> Result<Vec<ServiceDefinition>, ListServicesError>
pub fn list_services(
&self,
circuits: Vec<String>,
service_types: Vec<String>
) -> Result<Vec<ServiceDefinition>, ListServicesError>List services managed by this ServiceOrchestrator; filters may be provided to only show
services on specified circuit(s) and of given service type(s).
pub fn add_stopped_service(
&self,
service_definition: ServiceDefinition,
args: HashMap<String, String>
) -> Result<(), AddServiceError>
pub fn add_stopped_service(
&self,
service_definition: ServiceDefinition,
args: HashMap<String, String>
) -> Result<(), AddServiceError>Create a service that has previously been stopped according to the specified definition. The arguments provided must match those required to create the service.
Trait Implementations
The ServiceOrchestrator exposes REST API resources provided by the
ServiceFactory::get_rest_endpoints methods of its factories. Each factory defines the
endpoints provided by the services it creates; the ServiceOrchestrator then exposes these
endpoints under the /{service_type}/{circuit}/{service_id} route.
Auto Trait Implementations
impl !RefUnwindSafe for ServiceOrchestratorimpl Send for ServiceOrchestratorimpl !Sync for ServiceOrchestratorimpl Unpin for ServiceOrchestratorimpl !UnwindSafe for ServiceOrchestratorBlanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Convert self to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>, Convert &self to an expression for Diesel’s query builder. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V