LocalCodeLoader Class
A simple code loader that caches a mapping of package name to a Fluid entry point. On load, it retrieves the entry point matching the package name in the given code details.
Signature
export declare class LocalCodeLoader implements ICodeDetailsLoader
Implements: ICodeDetailsLoader
Constructors
Constructor | Description |
---|---|
(constructor)(packageEntries, runtimeOptions) | Constructs a new instance of the LocalCodeLoader class |
Methods
Method | Return Type | Description |
---|---|---|
load(source) | Promise<IFluidModuleWithDetails> | It finds the entry point for the package name in the given source and return it as a Fluid module. |
Constructor Details
(constructor)
Constructs a new instance of the LocalCodeLoader
class
Signature
constructor(packageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>, runtimeOptions?: IContainerRuntimeOptions);
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
packageEntries | Iterable<[IFluidCodeDetails, fluidEntryPoint]> | ||
runtimeOptions | optional | IContainerRuntimeOptions |
Method Details
load
It finds the entry point for the package name in the given source and return it as a Fluid module.
Signature
load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;
Parameters
Parameter | Type | Description |
---|---|---|
source | IFluidCodeDetails | Details of where to find chaincode |
Returns
Return type: Promise<IFluidModuleWithDetails>