     ) {
       self.target = target
       self.eventLoopGroup = eventLoopGroup
-      self.serviceProviders = serviceProviders
+      self.serviceProvidersByName = Dictionary(uniqueKeysWithValues: serviceProviders.map { ($0.serviceName, $0) })
       self.errorDelegate = errorDelegate
       self.tls = tls
       self.connectionKeepalive = connectionKeepalive

    public var eventLoopGroup: EventLoopGroup

    /// Providers the server should use to handle gRPC requests.
    public var serviceProviders: [CallHandlerProvider]

    /// An error delegate which is called when errors are caught. Provided delegates **must not
    /// maintain a strong reference to this `Server`**. Doing so will cause a retain cycle.

      self.logger = logger
      self.debugChannelInitializer = debugChannelInitializer
    }
  }
}

