proxy
This module allows you to proxy any number of Dagger Servicesthrough a single Dagger Service on specified ports
Installation
dagger install github.com/kpenfound/dagger-modules/proxy@v0.2.2
Entrypoint
Return Type
Proxy !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ctr | Container | - | An OCI-compatible container, also known as a Docker container. |
Example
dagger -m github.com/kpenfound/dagger-modules/proxy@6e600a04576a9baa771b9f3f30da7d2a19b12eba call \
func (m *myModule) example() *Proxy {
return dag.
Proxy()
}
@function
def example() -> dag.Proxy:
return (
dag.proxy()
)
@func()
example(): Proxy {
return dag
.proxy()
}
Types
Proxy 🔗
Forwards multiple services into a single service with multiple ports
ctr() 🔗
An OCI-compatible container, also known as a Docker container.
Return Type
Container !
Example
dagger -m github.com/kpenfound/dagger-modules/proxy@6e600a04576a9baa771b9f3f30da7d2a19b12eba call \
ctr
func (m *myModule) example() *Container {
return dag.
Proxy().
Ctr()
}
@function
def example() -> dagger.Container:
return (
dag.proxy()
.ctr()
)
@func()
example(): Container {
return dag
.proxy()
.ctr()
}
withService() 🔗
Add a service to proxy
Return Type
Proxy !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
service | Service ! | - | A content-addressed service providing TCP connectivity. |
name | String ! | - | No description provided |
frontend | Integer ! | - | No description provided |
backend | Integer ! | - | No description provided |
isTcp | Boolean ! | false | No description provided |
Example
dagger -m github.com/kpenfound/dagger-modules/proxy@6e600a04576a9baa771b9f3f30da7d2a19b12eba call \
with-service --service PROTOCOL://HOST:PORT --name string --frontend integer --backend integer --is-tcp boolean
func (m *myModule) example(service *Service, name string, frontend int, backend int, isTcp bool) *Proxy {
return dag.
Proxy().
WithService(service, name, frontend, backend, isTcp)
}
@function
def example(service: dagger.Service, name: str, frontend: int, backend: int, is_tcp: bool) -> dag.Proxy:
return (
dag.proxy()
.with_service(service, name, frontend, backend, is_tcp)
)
@func()
example(service: Service, name: string, frontend: number, backend: number, isTcp: boolean): Proxy {
return dag
.proxy()
.withService(service, name, frontend, backend, isTcp)
}
service() 🔗
Get the proxy Service
Return Type
Service !
Example
dagger -m github.com/kpenfound/dagger-modules/proxy@6e600a04576a9baa771b9f3f30da7d2a19b12eba call \
service
func (m *myModule) example() *Service {
return dag.
Proxy().
Service()
}
@function
def example() -> dagger.Service:
return (
dag.proxy()
.service()
)
@func()
example(): Service {
return dag
.proxy()
.service()
}