Class WorkerServiceLoader

java.lang.Object
org.apache.pulsar.functions.worker.service.WorkerServiceLoader

public class WorkerServiceLoader extends Object
Loader to load worker service.
  • Constructor Details

    • WorkerServiceLoader

      public WorkerServiceLoader()
  • Method Details

    • getWorkerServiceDefinition

      public static WorkerServiceDefinition getWorkerServiceDefinition(String narPath, String narExtractionDirectory) throws IOException
      Retrieve the functions worker service definition from the provided worker service nar package.
      Parameters:
      narPath - the path to the worker service NAR package
      Returns:
      the worker service definition
      Throws:
      IOException - when fail to load the worker service or get the definition
    • load

      public static WorkerService load(org.apache.pulsar.functions.worker.WorkerConfig workerConfig)
      Load the worker services for the given protocol list.
      Parameters:
      workerConfig - the functions worker config
      Returns:
      the worker service