MCPcopy
hub / github.com/cloudflare/cloudflared / OriginService

Interface OriginService

ingress/origin_service.go:32–40  ·  view source on GitHub ↗

OriginService is something a tunnel can proxy traffic to.

Source from the content-addressed store, hash-verified

30
31// OriginService is something a tunnel can proxy traffic to.
32type OriginService interface {
33 String() string
34 // Start the origin service if it's managed by cloudflared, e.g. proxy servers or Hello World.
35 // If it's not managed by cloudflared, this is a no-op because the user is responsible for
36 // starting the origin service.
37 // Implementor of services managed by cloudflared should terminate the service if shutdownC is closed
38 start(log *zerolog.Logger, shutdownC <-chan struct{}, cfg OriginRequestConfig) error
39 MarshalJSON() ([]byte, error)
40}
41
42// unixSocketPath is an OriginService representing a unix socket (which accepts HTTP or HTTPS)
43type unixSocketPath struct {

Callers 13

StringCIDRMethod · 0.65
MultiLineStringMethod · 0.65
MarshalJSONMethod · 0.65
handlePacketMethod · 0.65
RequestSpanMethod · 0.65
RequestMethod · 0.65
RequestMethod · 0.65
ServeMethod · 0.65
StartOriginsMethod · 0.65
startMethod · 0.65

Implementers 9

unixSocketPathingress/origin_service.go
httpServiceingress/origin_service.go
rawTCPServiceingress/origin_service.go
tcpOverWSServiceingress/origin_service.go
socksProxyOverWSServiceingress/origin_service.go
helloWorldingress/origin_service.go
statusCodeingress/origin_service.go
ManagementServiceingress/origin_service.go
MockOriginHTTPServiceingress/origin_service.go

Calls

no outgoing calls

Tested by

no test coverage detected