/// create server and spin up services, but don't run server
create server and spin up services, but don't run server
create server and spin up services but don ' t run server
pub fn create_services(
    local_spu: SpuConfig,
    internal: bool,
    public: bool,
) -> (
    DefaultSharedGlobalContext,
    Option<InternalApiServer>,
    Option<PublicApiServer>,
) {
    let ctx = FileReplicaContext::new_shared_context(local_spu);
    let public_ep_addr = ctx.config().public_socket_addr().clone();
    let private_ep_addr = ctx.config().private_socket_addr().clone();
    let public_server = if public {
        Some(create_public_server(public_ep_addr, ctx.clone()))
    } else {
        None
    };
    let internal_server = if internal {
        Some(create_internal_server(private_ep_addr, ctx.clone()))
    } else {
        None
    };
    let sc_dispatcher = ScDispatcher::new(ctx.clone());
    sc_dispatcher.run();
    (ctx, internal_server, public_server)
}
pub fn create_services ( local_spu : SpuConfig , internal : bool , public : bool , ) -> ( DefaultSharedGlobalContext , Option < InternalApiServer > , Option < PublicApiServer > , ) { let ctx = FileReplicaContext :: new_shared_context ( local_spu ) ; let public_ep_addr = ctx . config ( ) . public_socket_addr ( ) . clone ( ) ; let private_ep_addr = ctx . config ( ) . private_socket_addr ( ) . clone ( ) ; let public_server = if public { Some ( create_public_server ( public_ep_addr , ctx . clone ( ) ) ) } else { None } ; let internal_server = if internal { Some ( create_internal_server ( private_ep_addr , ctx . clone ( ) ) ) } else { None } ; let sc_dispatcher = ScDispatcher :: new ( ctx . clone ( ) ) ; sc_dispatcher . run ( ) ; ( ctx , internal_server , public_server ) }
create server and spin up services, but don't run server
create server and spin up services but don ' t run server
local_spu
SpuConfig
internal
bool
public
bool