class_docstr: Composite Server implementation
class_docstr_tok: ["Composite","Server","implementation"]
docstr: Initialize the gateway
  :param kwargs: keyword args
docstr_tok: ["Initialize","the","gateway",":","param","kwargs",":","keyword","args"]
code: def __init__(
      self,
      **kwargs,
  ):
      """Initialize the gateway
      :param kwargs: keyword args
      """
      super().__init__(**kwargs)
      from jina.parsers.helper import _get_gateway_class
  
      self.servers: List[BaseServer] = []
      for server_kwargs in self._server_kwargs:
          server_cls = _get_gateway_class(
              server_kwargs["runtime_args"]["protocol"],
              works_as_load_balancer=self.works_as_load_balancer,
          )
          server = server_cls(**server_kwargs)
          self.servers.append(server)
      self.gateways = self.servers
  
file_path: jina/jina/serve/runtimes/servers/composite.py
imports: import asyncio
  import copy
  from typing import Any, List, TYPE_CHECKING
  from jina.serve.runtimes.servers import BaseServer
label_desc: Use image node_id 1 to create a new CompositeServer object from inherited base classes: CompositeBaseServer with example: obj = CompositeServer()