tailscale
A Dagger module for integrating with Tailscale
Installation
dagger install github.com/shykes/daggerverse/tailscale@v0.2.0
Entrypoint
Return Type
Tailscale
Example
func (m *myModule) example() *Tailscale {
return dag.
Tailscale()
}
@function
def example() -> dag.Tailscale:
return (
dag.tailscale()
)
@func()
example(): Tailscale {
return dag
.tailscale()
}
Types
Tailscale
A module to integrate with Tailscale https://tailscale.com
proxy()
Expose a backend service on Tailscale at the given hostname, using the given Tailscale key.
Return Type
Proxy !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
hostname | String ! | "dagger-proxy" | No description provided |
backend | Service | - | No description provided |
key | Secret ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/tailscale@fa30eca63b4010873a02edc386f115fb2865074d call \
proxy --hostname string --key env:MYSECRET \
up
func (m *myModule) example(hostname string, key *Secret) *TailscaleProxy {
return dag.
Tailscale().
Proxy(hostname, key)
}
@function
def example(hostname: str, key: dagger.Secret) -> dag.TailscaleProxy:
return (
dag.tailscale()
.proxy(hostname, key)
)
@func()
example(hostname: string, key: Secret): TailscaleProxy {
return dag
.tailscale()
.proxy(hostname, key)
}
Proxy
A proxy exposing a Dagger service on a Tailscale network
hostname()
Hostname of the proxy on the tailscale network
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/tailscale@fa30eca63b4010873a02edc386f115fb2865074d call \
proxy --hostname string --key env:MYSECRET \
hostname
func (m *myModule) example(ctx context.Context, hostname string, key *Secret) string {
return dag.
Tailscale().
Proxy(hostname, key).
Hostname(ctx)
}
@function
async def example(hostname: str, key: dagger.Secret) -> str:
return await (
dag.tailscale()
.proxy(hostname, key)
.hostname()
)
@func()
async example(hostname: string, key: Secret): Promise<string> {
return dag
.tailscale()
.proxy(hostname, key)
.hostname()
}
key()
Tailscale authentication key to register the proxy
Return Type
Secret !
Example
dagger -m github.com/shykes/daggerverse/tailscale@fa30eca63b4010873a02edc386f115fb2865074d call \
proxy --hostname string --key env:MYSECRET \
key
func (m *myModule) example(hostname string, key *Secret) *Secret {
return dag.
Tailscale().
Proxy(hostname, key).
Key()
}
@function
def example(hostname: str, key: dagger.Secret) -> dagger.Secret:
return (
dag.tailscale()
.proxy(hostname, key)
.key()
)
@func()
example(hostname: string, key: Secret): Secret {
return dag
.tailscale()
.proxy(hostname, key)
.key()
}
backend()
Backend of the proxy. All exposed ports are also exposed on the proxy.
Return Type
Service !
Example
dagger -m github.com/shykes/daggerverse/tailscale@fa30eca63b4010873a02edc386f115fb2865074d call \
proxy --hostname string --key env:MYSECRET \
backend
func (m *myModule) example(hostname string, key *Secret) *Service {
return dag.
Tailscale().
Proxy(hostname, key).
Backend()
}
@function
def example(hostname: str, key: dagger.Secret) -> dagger.Service:
return (
dag.tailscale()
.proxy(hostname, key)
.backend()
)
@func()
example(hostname: string, key: Secret): Service {
return dag
.tailscale()
.proxy(hostname, key)
.backend()
}
backendPorts()
Return a list of the backend’s exposed ports’
Return Type
[Port ! ] !
Example
Function TailscaleProxy.backendPorts is not accessible from the tailscale module
func (m *myModule) example(hostname string, key *Secret) []*Port {
return dag.
Tailscale().
Proxy(hostname, key).
BackendPorts()
}
@function
def example(hostname: str, key: dagger.Secret) -> List[dag.Port]:
return (
dag.tailscale()
.proxy(hostname, key)
.backend_ports()
)
@func()
example(hostname: string, key: Secret): Port[] {
return dag
.tailscale()
.proxy(hostname, key)
.backendPorts()
}
rules()
List the proxy’s port forwarding rules
Return Type
[ProxyRule ! ] !
Example
Function TailscaleProxy.rules is not accessible from the tailscale module
func (m *myModule) example(hostname string, key *Secret) []*TailscaleProxyRule {
return dag.
Tailscale().
Proxy(hostname, key).
Rules()
}
@function
def example(hostname: str, key: dagger.Secret) -> List[dag.TailscaleProxyRule]:
return (
dag.tailscale()
.proxy(hostname, key)
.rules()
)
@func()
example(hostname: string, key: Secret): TailscaleProxyRule[] {
return dag
.tailscale()
.proxy(hostname, key)
.rules()
}
up()
Return Type
Void !
Example
dagger -m github.com/shykes/daggerverse/tailscale@fa30eca63b4010873a02edc386f115fb2865074d call \
proxy --hostname string --key env:MYSECRET \
up
func (m *myModule) example(ctx context.Context, hostname string, key *Secret) {
return dag.
Tailscale().
Proxy(hostname, key).
Up(ctx)
}
@function
async def example(hostname: str, key: dagger.Secret) -> None:
return await (
dag.tailscale()
.proxy(hostname, key)
.up()
)
@func()
async example(hostname: string, key: Secret): Promise<void> {
return dag
.tailscale()
.proxy(hostname, key)
.up()
}
container()
Convert the proxy to a ready-to-run container
Return Type
Container !
Example
dagger -m github.com/shykes/daggerverse/tailscale@fa30eca63b4010873a02edc386f115fb2865074d call \
proxy --hostname string --key env:MYSECRET \
container
func (m *myModule) example(hostname string, key *Secret) *Container {
return dag.
Tailscale().
Proxy(hostname, key).
Container()
}
@function
def example(hostname: str, key: dagger.Secret) -> dagger.Container:
return (
dag.tailscale()
.proxy(hostname, key)
.container()
)
@func()
example(hostname: string, key: Secret): Container {
return dag
.tailscale()
.proxy(hostname, key)
.container()
}
ProxyRule
An individual port forward rule
protocol()
Return Type
String !
Example
Function TailscaleProxyRule.protocol is not accessible from the tailscale module
Function TailscaleProxyRule.protocol is not accessible from the tailscale module
Function TailscaleProxyRule.protocol is not accessible from the tailscale module
Function TailscaleProxyRule.protocol is not accessible from the tailscale module
frontendPort()
Return Type
Integer !
Example
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale module
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale module
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale module
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale module
backendPort()
Return Type
Integer !
Example
Function TailscaleProxyRule.backendPort is not accessible from the tailscale module
Function TailscaleProxyRule.backendPort is not accessible from the tailscale module
Function TailscaleProxyRule.backendPort is not accessible from the tailscale module
Function TailscaleProxyRule.backendPort is not accessible from the tailscale module
backendHost()
Return Type
String !
Example
Function TailscaleProxyRule.backendHost is not accessible from the tailscale module
Function TailscaleProxyRule.backendHost is not accessible from the tailscale module
Function TailscaleProxyRule.backendHost is not accessible from the tailscale module
Function TailscaleProxyRule.backendHost is not accessible from the tailscale module