homerun
It exposes a Redis service (optionally password-protected), a randomlygenerated password helper, an interactive redis-cli container, a one-shot
connectivity probe, and a `RunTestWithRedis` runner that wires a Redis
service into a Go test container — all without requiring an external Redis.
Installation
dagger install github.com/stuttgart-things/dagger/homerun@v0.129.4Entrypoint
Return Type
Homerun Example
dagger -m github.com/stuttgart-things/dagger/homerun@ad38e597157fa216aeeedca4210455c91f1feb61 call \
func (m *MyModule) Example() *dagger.Homerun {
return dag.
Homerun()
}@function
def example() -> dagger.Homerun:
return (
dag.homerun()
)@func()
example(): Homerun {
return dag
.homerun()
}Types
Homerun 🔗
generatePassword() 🔗
GeneratePassword generates a random password of specified length
Useful for creating secure passwords for Redis or other services
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| length | Integer | 16 | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@ad38e597157fa216aeeedca4210455c91f1feb61 call \
generate-passwordfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Homerun().
Generatepassword(ctx)
}@function
async def example() -> str:
return await (
dag.homerun()
.generatepassword()
)@func()
async example(): Promise<string> {
return dag
.homerun()
.generatePassword()
}redisCli() 🔗
RedisCli opens an interactive redis-cli shell connected to a Redis service
This is useful for debugging and manual interaction with Redis
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "7.2.0-v18" | No description provided |
| password | String | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@ad38e597157fa216aeeedca4210455c91f1feb61 call \
redis-clifunc (m *MyModule) Example() *dagger.Container {
return dag.
Homerun().
Rediscli()
}@function
def example() -> dagger.Container:
return (
dag.homerun()
.rediscli()
)@func()
example(): Container {
return dag
.homerun()
.redisCli()
}redisService() 🔗
RedisService creates a Redis service with optional password protection
Returns a Redis service that can be bound to other containers for testing
Return Type
Service !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "7.2.0-v18" | No description provided |
| password | String | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@ad38e597157fa216aeeedca4210455c91f1feb61 call \
redis-servicefunc (m *MyModule) Example() *dagger.Service {
return dag.
Homerun().
Redisservice()
}@function
def example() -> dagger.Service:
return (
dag.homerun()
.redisservice()
)@func()
example(): Service {
return dag
.homerun()
.redisService()
}runRedis() 🔗
RunRedis starts a Redis service that can be accessed with ‘dagger up’
Example: dagger call -m homerun run-redis –port 6379 –password “mypass” up
Return Type
Service !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "7.2.0-v18" | No description provided |
| port | Integer | 6379 | No description provided |
| password | String | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@ad38e597157fa216aeeedca4210455c91f1feb61 call \
run-redisfunc (m *MyModule) Example() *dagger.Service {
return dag.
Homerun().
Runredis()
}@function
def example() -> dagger.Service:
return (
dag.homerun()
.runredis()
)@func()
example(): Service {
return dag
.homerun()
.runRedis()
}runTestWithRedis() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
| goVersion | String | "1.25.4" | No description provided |
| redisVersion | String | "7.2.0-v18" | No description provided |
| testPath | String ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@ad38e597157fa216aeeedca4210455c91f1feb61 call \
run-test-with-redis --source DIR_PATH --test-path stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, testPath string) string {
return dag.
Homerun().
Runtestwithredis(ctx, source, testPath)
}@function
async def example(source: dagger.Directory, testpath: str) -> str:
return await (
dag.homerun()
.runtestwithredis(source, testpath)
)@func()
async example(source: Directory, testPath: string): Promise<string> {
return dag
.homerun()
.runTestWithRedis(source, testPath)
}testRedisConnection() 🔗
TestRedisConnection tests if Redis service is reachable and working
This is useful to verify the Redis service is up and accessible from the CLI
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "7.2.0-v18" | No description provided |
| password | String | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@ad38e597157fa216aeeedca4210455c91f1feb61 call \
test-redis-connectionfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Homerun().
Testredisconnection(ctx)
}@function
async def example() -> str:
return await (
dag.homerun()
.testredisconnection()
)@func()
async example(): Promise<string> {
return dag
.homerun()
.testRedisConnection()
}