proxy
This module allows you to proxy any number of Dagger Servicesthrough a single Dagger Service on specified ports
Installation
dagger install github.com/rajatjindal/dagger-modules/proxy@6a0cdcff054cb19f0fefb12218c33c7bb935034d
Entrypoint
Return Type
Proxy !
Arguments
Name | Type | Description |
---|---|---|
ctr | Container | An OCI-compatible container, also known as a Docker container. |
Example
dagger -m github.com/rajatjindal/dagger-modules/proxy@6a0cdcff054cb19f0fefb12218c33c7bb935034d 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/rajatjindal/dagger-modules/proxy@6a0cdcff054cb19f0fefb12218c33c7bb935034d 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/rajatjindal/dagger-modules/proxy@6a0cdcff054cb19f0fefb12218c33c7bb935034d 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/rajatjindal/dagger-modules/proxy@6a0cdcff054cb19f0fefb12218c33c7bb935034d 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()
}