cloudflare

package
v0.0.125 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(args []string) error

Handle is production entry: HandleWith(args, HandleOpts{}).

func HandleWith

func HandleWith(args []string, opts HandleOpts) error

HandleWith is the injectable entry used by doctests.

Types

type HandleOpts

type HandleOpts struct {
	// StartSession nil → real cloudflare.StartSession adapter.
	StartSession func(SessionStartOptions) (Session, error)
	// WaitSignal nil → block until SIGINT/SIGTERM.
	WaitSignal func() error
	// Stdout/Stderr nil → os.Stdout / os.Stderr (help + user messages).
	Stdout io.Writer
	Stderr io.Writer
}

HandleOpts injects dependencies for tests and production defaults.

type Session

type Session interface {
	Stop() error
	PublicBaseURL() string
}

Session is the stoppable surface returned by StartSession.

type SessionStartOptions

type SessionStartOptions struct {
	Domain     string
	LocalURL   string
	TunnelName string
}

SessionStartOptions is the subset of session config used by the CLI.

Jump to

Keyboard shortcuts

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