Documentation ¶
Index ¶
- func ParseAndSanitizeEndpointURL(input string, isIngressURL bool) (*url.URL, error)
- type Dialer
- type TunnelDriver
- func (td *TunnelDriver) Alive(_ context.Context, _ *http.Request) error
- func (td *TunnelDriver) CreateAgentEndpoint(ctx context.Context, name string, spec ngrokv1alpha1.AgentEndpointSpec, ...) error
- func (td *TunnelDriver) CreateTunnel(ctx context.Context, name string, spec ingressv1alpha1.TunnelSpec) error
- func (td *TunnelDriver) DeleteAgentEndpoint(ctx context.Context, name string) error
- func (td *TunnelDriver) DeleteTunnel(ctx context.Context, name string) error
- func (td *TunnelDriver) Ready(_ context.Context, _ *http.Request) error
- type TunnelDriverComments
- type TunnelDriverOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseAndSanitizeEndpointURL ¶
ParseAndSanitizeEndpointURL parses/sanitizes an input string for an endpoint url and provides a *url.URL following the restrictions for endpoints. when isIngressURL is true, the input string does not require a port (excluding tcp addresses)
Types ¶
type Dialer ¶
Dialer is the portion of *net.Dialer that this package uses. This is exported only for testing reasons.
type TunnelDriver ¶
type TunnelDriver struct {
// contains filtered or unexported fields
}
TunnelDriver is a driver for creating and deleting ngrok tunnels
func New ¶
func New(ctx context.Context, logger logr.Logger, opts TunnelDriverOpts) (*TunnelDriver, error)
New creates and initializes a new TunnelDriver
func (*TunnelDriver) Alive ¶
Alive implements the healthcheck.HealthChecker interface for when the TunnelDriver is alive
func (*TunnelDriver) CreateAgentEndpoint ¶
func (td *TunnelDriver) CreateAgentEndpoint(ctx context.Context, name string, spec ngrokv1alpha1.AgentEndpointSpec, trafficPolicy string) error
CreateAgentEndpoint will create or update an agent endpoint by name using the provided desired configuration state
func (*TunnelDriver) CreateTunnel ¶
func (td *TunnelDriver) CreateTunnel(ctx context.Context, name string, spec ingressv1alpha1.TunnelSpec) error
CreateTunnel creates and starts a new tunnel in a goroutine. If a tunnel with the same name already exists, it will be stopped and replaced with a new tunnel unless the labels match.
func (*TunnelDriver) DeleteAgentEndpoint ¶
func (td *TunnelDriver) DeleteAgentEndpoint(ctx context.Context, name string) error
func (*TunnelDriver) DeleteTunnel ¶
func (td *TunnelDriver) DeleteTunnel(ctx context.Context, name string) error
DeleteTunnel stops and deletes a tunnel
type TunnelDriverComments ¶
type TunnelDriverComments struct {
Gateway string `json:"gateway,omitempty"`
}
type TunnelDriverOpts ¶
type TunnelDriverOpts struct { ServerAddr string Region string RootCAs string Comments *TunnelDriverComments }
TunnelDriverOpts are options for creating a new TunnelDriver