Function createService

  • Creates a Service class instance, automatically calls load() and init() methods (loads the initial payload, initializes the bus and RPC

    Parameters

    • __namedParameters: {
          info: ServiceInfo;
          onFrame?: ((frame) => void | Promise<void>);
          onRpcCall?: ((e) => undefined | Buffer | Promise<undefined | Buffer>);
      }
      • info: ServiceInfo
      • Optional onFrame?: ((frame) => void | Promise<void>)
          • (frame): void | Promise<void>
          • Parameters

            Returns void | Promise<void>

      • Optional onRpcCall?: ((e) => undefined | Buffer | Promise<undefined | Buffer>)
          • (e): undefined | Buffer | Promise<undefined | Buffer>
          • Parameters

            Returns undefined | Buffer | Promise<undefined | Buffer>

    Returns Promise<Service>

Generated using TypeDoc