import RoutesSvcConsumer from 'devapt-core-server/js/services/routes_svc_consumer.js'
RoutesSvcConsumer
Extends:
Routes service consumer class for middleware routes.
Constructor Summary
Public Constructor | ||
public |
constructor(arg_consumer_name: string, arg_service_instance: Service, arg_context: string): nothing Create a service consumer for routes. |
Method Summary
Public Methods | ||
public |
consume_local(arg_provider: object, arg_routes: array): object Consume a service on the same host. |
|
public |
consume_remote(arg_provider: object, arg_routes: array): Promise Consume a service on a remote host. |
|
public |
prepare_args(arg_operands: *): array Enhance operands if needed |
Public Constructors
Public Methods
public consume_local(arg_provider: object, arg_routes: array): object source
Consume a service on the same host.
Params:
Name | Type | Attribute | Description |
arg_provider | object | service provider |
|
arg_routes | array | Routes to request |
public consume_remote(arg_provider: object, arg_routes: array): Promise source
Consume a service on a remote host.
Params:
Name | Type | Attribute | Description |
arg_provider | object | service provider |
|
arg_routes | array | Routes to request |
public prepare_args(arg_operands: *): array source
Enhance operands if needed
Params:
Name | Type | Attribute | Description |
arg_operands | * |
Return:
array | array of routes to consume |