Documentation
¶
Index ¶
- func CheckLogin() error
- func CleanupExposedTunnels(devName string) (int, error)
- func CreateCNAME(zoneID, recordName, target string, proxied bool) error
- func CreateTXT(zoneID, recordName, value string) error
- func GetToken(tunnelName string) (string, error)
- func LookupZoneID(zoneName string) (string, error)
- func RouteDNS(tunnelName, domain string) error
- func TunnelStatus(name string) (string, error)
- func WriteIngressConfig(tunnelID, fullDomain, targetPort string) (string, error)
- func WriteMultiIngressConfig(tunnelID string, entries []IngressEntry) (string, error)
- type IngressEntry
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckLogin ¶
func CheckLogin() error
CheckLogin verifies that cloudflared has a valid certificate on disk.
func CleanupExposedTunnels ¶
CleanupExposedTunnels forcefully deletes any tunnels tracking to this user's exposed dev environment. Returns the number of tunnels cleaned up and any error.
func CreateCNAME ¶ added in v0.17.0
CreateCNAME creates or updates a CNAME record in the given zone.
func CreateTXT ¶ added in v0.17.1
CreateTXT creates or updates a TXT record in the given zone. Used for domain verification (e.g., GitHub Pages challenge records).
func LookupZoneID ¶ added in v0.17.0
LookupZoneID finds the zone ID for a given domain. For "devx.vitruviansoftware.dev", this looks up "vitruviansoftware.dev".
func RouteDNS ¶
RouteDNS idempotently creates a CNAME routing domain → tunnel. Failures are treated as non-fatal (DNS may already be routed).
func TunnelStatus ¶
TunnelStatus returns a human-readable status string.
func WriteIngressConfig ¶ added in v0.2.2
WriteIngressConfig generates a temporary cloudflare tunnel ingress configuration file on disk. This is required for named tunnels since --url is ignored by cloudflared run unless an ingress config explicitly permits the hostname.
func WriteMultiIngressConfig ¶ added in v0.2.4
func WriteMultiIngressConfig(tunnelID string, entries []IngressEntry) (string, error)
WriteMultiIngressConfig writes a configuration file with multiple routing destinations.
Types ¶
type IngressEntry ¶ added in v0.2.4
IngressEntry maps a domain to a port.
type Tunnel ¶
type Tunnel struct {
ID string `json:"id"`
Name string `json:"name"`
CreatedAt string `json:"created_at"`
}
Tunnel represents a Cloudflare tunnel entry from the API.
func EnsureTunnel ¶
EnsureTunnel returns the existing tunnel by name or creates a new one.
func ListExposedTunnels ¶
ListExposedTunnels returns all active exposed tunnels for this environment.