Skip to main content
Version: v1

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

ConstructorDescription
(constructor)(packageEntries, runtimeOptions)Constructs a new instance of the LocalCodeLoader class

Methods

MethodReturn TypeDescription
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

ParameterModifiersTypeDescription
packageEntriesIterable<[IFluidCodeDetails, fluidEntryPoint]>
runtimeOptionsoptionalIContainerRuntimeOptions

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

ParameterTypeDescription
sourceIFluidCodeDetailsDetails of where to find chaincode

Returns

Return type: Promise<IFluidModuleWithDetails>