Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Module( "cloudflared", fx.Provide(NewState, NewSupervisor), fx.Invoke(registerLifecycle), )
Module wires the optional pinned cloudflared companion into the tunnel-client lifecycle.
Functions ¶
func BundledVersion ¶
func BundledVersion() string
BundledVersion returns the pinned cloudflared version shipped by supported tunnel-client distributions.
func StartupTimeout ¶
func StartupTimeout( base time.Duration, cloudflared runtimeconfig.CloudflaredSettings, controlPlane runtimeconfig.ControlPlaneConfig, ) time.Duration
StartupTimeout returns the Fx startup budget needed by the optional cloudflared companion. Managed mode without a configured token first fetches one from the control plane, so it receives one full poll deadline in addition to the cloudflared readiness budget.
Types ¶
type Manifest ¶
type Manifest struct {
Version string `json:"version"`
ReleaseURL string `json:"release_url"`
ReleaseCommit string `json:"release_commit"`
ModulePath string `json:"module_path"`
PackagePath string `json:"package_path"`
ModuleVersion string `json:"module_version"`
ModuleSum string `json:"module_sum"`
GoModSum string `json:"go_mod_sum"`
BuildTime string `json:"build_time"`
SecurityPatchOwner string `json:"security_patch_owner"`
SecurityUpdatePolicy string `json:"security_update_policy"`
Platforms []string `json:"platforms"`
}
Manifest is the shipped provenance and platform contract for the bundled cloudflared companion.
func BundledManifest ¶
func BundledManifest() Manifest
BundledManifest returns the parsed, checked-in provenance manifest.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State tracks whether the optional cloudflared companion is currently ready. It intentionally stores no token material.
func NewState ¶
func NewState(cfg *runtimeconfig.CloudflaredSettings) *State
NewState creates readiness state from the effective cloudflared runtimeconfig.
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor owns one bundled cloudflared process for the lifetime of the tunnel-client runtime.
func NewSupervisor ¶
func NewSupervisor(p SupervisorParams) (*Supervisor, error)
NewSupervisor constructs the optional child-process supervisor.
func (*Supervisor) Failures ¶
func (s *Supervisor) Failures() <-chan error
Failures receives one token-safe error when cloudflared exits unexpectedly. It never receives during a normal tunnel-client shutdown.
type SupervisorParams ¶
type SupervisorParams struct {
fx.In
Config *runtimeconfig.CloudflaredSettings
State *State
Logger *slog.Logger
ManagedRuntimeFetcher controlplane.ManagedCloudflareTunnelFetcher `optional:"true"`
}
SupervisorParams contains the dependencies needed to construct the shared cloudflared supervisor. It is exported so the full-client compatibility package can delegate to this canonical implementation without copying it.