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 RenderStandaloneConfig ¶
func RenderStandaloneConfig(cfg StandaloneConfig) ([]byte, error)
RenderStandaloneConfig renders a deterministic cloudflared YAML config that keeps the tunnel token out of argv and out of the config file itself.
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 StandaloneConfig ¶
type StandaloneConfig struct {
TokenFile string
MetricsAddress string
LogLevel string
TransportLogLevel string
Protocol string
EdgeIPVersion string
Retries int
GracePeriod time.Duration
}
StandaloneConfig is the token-free cloudflared runtime configuration emitted for operators who intentionally run cloudflared without tunnel-client.
TokenFile is a path only. The generator never reads or embeds the tunnel token, so the rendered config is safe to check into deployment manifests.
func DefaultStandaloneConfig ¶
func DefaultStandaloneConfig(tokenFile string) StandaloneConfig
DefaultStandaloneConfig returns the reviewed production defaults for a directly supervised cloudflared process.
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 *config.CloudflaredConfig) *State
NewState creates readiness state from the effective cloudflared config.
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.