Documentation
¶
Index ¶
- Constants
- Variables
- func NewCmd(f *cmdutil.Factory) *cobra.Command
- func NewCobraCmd(deploy *DeployCmd) *cobra.Command
- func PurgeForUpdatedFiles(cmd *DeployCmd, domain apidom.DomainResponse, confPath string, msgs *[]string) error
- func Worker(jobs <-chan contracts.FileOps, results chan<- error, currentFile *int64, ...)
- type Clients
- type Data
- type DeployCmd
- func (cmd *DeployCmd) DryRun(f *cmdutil.Factory) error
- func (cmd *DeployCmd) ExternalRun(f *cmdutil.Factory, configPath string, env string, ...) error
- func (cmd *DeployCmd) PurgeUrls(domain []string, path string) error
- func (cmd *DeployCmd) PurgeWildcard(domain []string, path string) error
- func (cmd *DeployCmd) Run(f *cmdutil.Factory) error
- type DeployState
- type V3DeployPipeline
Constants ¶
const PathStatic = ".edge/storage"
Variables ¶
var ( Jobs chan contracts.FileOps Retries int64 )
Functions ¶
func NewCobraCmd ¶
func PurgeForUpdatedFiles ¶
func Worker ¶
func Worker(jobs <-chan contracts.FileOps, results chan<- error, currentFile *int64, clientUpload *storage.Client, conf *contracts.AzionApplicationOptionsV3, bucket string)
worker reads the range of jobs and uploads the file, if there is an error during upload, we returning it through the results channel
Types ¶
type Clients ¶
type Clients struct {
EdgeFunction *apiEdgeFunction.Client
EdgeApplication *apiEdgeApplications.Client
Domain *apiDomain.Client
Origin *apiOrigin.Client
Bucket *apiStorage.Client
Storage *apiStorage.Client
}
func NewClients ¶
type DeployCmd ¶
type DeployCmd struct {
Io *iostreams.IOStreams
GetWorkDir func() (string, error)
FileReader func(path string) ([]byte, error)
WriteFile func(filename string, data []byte, perm fs.FileMode) error
GetAzionJsonContent func(pathConfig string) (*contracts.AzionApplicationOptionsV3, error)
WriteAzionJsonContent func(conf *contracts.AzionApplicationOptionsV3, confConf string) error
EnvLoader func(path string) ([]string, error)
BuildCmd func(f *cmdutil.Factory) *build.BuildCmd
Open func(name string) (*os.File, error)
FilepathWalk func(root string, fn filepath.WalkFunc) error
F *cmdutil.Factory
Unmarshal func(data []byte, v interface{}) error
Interpreter func() *manifestInt.ManifestInterpreter
VersionID func() string
Auto bool
Env string
NoPrompt bool
Path string
ProjectConf string
SkipBuild bool
Sync bool
AliasEnv bool
}
func NewDeployCmd ¶
func (*DeployCmd) DryRun ¶
DryRun describes what `azion deploy` would do, without doing any of it.
It asks the real v3 pipeline which steps apply — the same table Run executes — so the description cannot drift from the deploy. Nothing here issues an API request: dry-run mode evaluates the predicates and never calls a step's Run.
func (*DeployCmd) ExternalRun ¶
func (*DeployCmd) PurgeWildcard ¶
type DeployState ¶
type DeployState struct {
Cmd *DeployCmd
F *cmdutil.Factory
Ctx context.Context
Conf *contracts.AzionApplicationOptionsV3
Msgs *[]string
Clients *Clients
Interpreter *manifestInt.ManifestInterpreter
// PathManifest is set by the manifest-path step and read by the read step.
PathManifest string
// Manifest is set by the read step and read by the apply and domain steps.
Manifest *contracts.Manifest
}
DeployState is what the v3 deploy steps read and write.
type V3DeployPipeline ¶
type V3DeployPipeline struct{}
V3DeployPipeline is the deploy flow for the v3 API.
It starts later than the v4 one. v3 builds before it reads azion.json, so the build stays in Run's setup alongside the config read — moving it after would change which of the two runs first. The pipeline begins where the state is complete, at the first resource operation.
There is no timing summary here: v3 never had one.
func (V3DeployPipeline) Name ¶
func (V3DeployPipeline) Name() string
func (V3DeployPipeline) Steps ¶
func (V3DeployPipeline) Steps() []pipeline.Step[DeployState]