edgedeploy

package
v0.1.74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: AGPL-3.0 Imports: 31 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deploy

func Deploy(ctx context.Context, opts Options, out io.Writer) (retErr error)

Deploy runs the edge deployment against Cloudflare's v4 API. Tests provide an httptest client and API base URL.

func ResetLogin added in v0.1.49

func ResetLogin(ctx context.Context, opts RecoveryOptions, out io.Writer) error

ResetLogin puts a fresh one-time recovery-token hash on the admin Worker and prints the matching link once.

func SetupLink(path string, out io.Writer) error

Types

type Options

type Options struct {
	Host       string
	Name       string
	D1Location string
	BundleDir  string
	// Version is the release tag to download (vX.Y.Z). DefaultVersion is used when neither Version nor BundleDir is given:
	// the tag of this binary's own release, empty for a development build (which then needs --version or --bundle).
	Version               string
	DefaultVersion        string
	Resume                bool
	DryRun                bool
	Rollback              bool
	InsecureSkipSignature bool
	Token                 string
	StatePath             string
	PublicKey             ed25519.PublicKey
	APIBaseURL            string
	GitHubDownloadBaseURL string
	HTTPClient            *http.Client
	Now                   func() time.Time
	Random                io.Reader
	PollInterval          time.Duration
	PollAttempts          int
	Sleep                 func(context.Context, time.Duration) error
	DecoyURL              string
	Resolve               func(context.Context, string) ([]netip.Addr, error)
}

type RecoveryOptions added in v0.1.49

type RecoveryOptions struct {
	StatePath  string
	Token      string
	AdminLogin string
	DryRun     bool
	APIBaseURL string
	HTTPClient *http.Client
	Random     io.Reader
}

RecoveryOptions contains only local configuration and the API token from CLOUDFLARE_API_TOKEN. The recovery token is created for this call and is never added to the deployment file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL