Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader struct { // Detector is the detector configuration. If this is nil then // no type detection will be done. Detector *detect.Config // Compiler is the appfile compiler that we're using. This is used // to do a minimal compile (MinCompile) to realize imports of // Appfiles prior to implicit loading. Compiler *appfile.Compiler // Apps will be used to load the proper app implementation for // implicit loading. Apps map[app.Tuple]app.Factory }
Loader is used to load an Appfile.
This logic used to live in the "compile" command directly but was extracted so it could be tested in isolation better and in case there is any interest in reusability.
The purpose of the loader is to do the multi-step Appfile load outlined below. As input, we have the "real" Appfile, which is the real physical Appfile if it exists (or nil if it doesn't).
1.) Detect the type, known as the "detected" Appfile 2.) Merge with the detected Appfile with the real Appfile. If the "detect" setting is set to "false", then we're done. Otherwise, continue. 3.) Instantiate the proper plugin for the app type and call the Implicit API to get an Appfile known as the "implicit" Appfile. 4.) Merge in the order: detected, implicit, real. Return the real Appfile.
Click to show internal directories.
Click to hide internal directories.