Dagger
Search

kafka

Kafka service module for Dagger.

Installation

dagger install github.com/sagikazarmark/daggerverse/kafka@v0.4.0

Entrypoint

Return Type
Kafka !
Arguments
NameTypeDescription
versionString Version (image tag) to use from the official image repository as a base container.
containerContainer Custom container to use as a base container.
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
func (m *myModule) example() *Kafka  {
	return dag.
			Kafka()
}
@function
def example() -> dag.Kafka:
	return (
		dag.kafka()
	)
@func()
example(): Kafka {
	return dag
		.kafka()
}

Types

Kafka 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 container
func (m *myModule) example() *Container  {
	return dag.
			Kafka().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.kafka()
		.container()
	)
@func()
example(): Container {
	return dag
		.kafka()
		.container()
}

withEnvVariable() 🔗

Set an environment variable.

Return Type
Kafka !
Arguments
NameTypeDefault ValueDescription
nameString !-The name of the environment variable (e.g., "HOST").
valueString !-The value of the environment variable (e.g., "localhost").
expandBoolean -Replace `${VAR}` or $VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 with-env-variable --name string --value string
func (m *myModule) example(name string, value string) *Kafka  {
	return dag.
			Kafka().
			WithEnvVariable(name, value)
}
@function
def example(name: str, value: str) -> dag.Kafka:
	return (
		dag.kafka()
		.with_env_variable(name, value)
	)
@func()
example(name: string, value: string): Kafka {
	return dag
		.kafka()
		.withEnvVariable(name, value)
}

singleNode() 🔗

Launch a single-node Kafka cluster.

Return Type
Node !
Arguments
NameTypeDefault ValueDescription
serviceNameString "kafka"Name of the service.
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 single-node
func (m *myModule) example() *KafkaNode  {
	return dag.
			Kafka().
			SingleNode()
}
@function
def example() -> dag.KafkaNode:
	return (
		dag.kafka()
		.single_node()
	)
@func()
example(): KafkaNode {
	return dag
		.kafka()
		.singleNode()
}

cluster() 🔗

Launch a Kafka cluster.

Return Type
Cluster !
Arguments
NameTypeDefault ValueDescription
serviceNamePrefixString "kafka"Name of the service.
nodeCountInteger 3Number of nodes in the cluster.
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 cluster
func (m *myModule) example() *KafkaCluster  {
	return dag.
			Kafka().
			Cluster()
}
@function
def example() -> dag.KafkaCluster:
	return (
		dag.kafka()
		.cluster()
	)
@func()
example(): KafkaCluster {
	return dag
		.kafka()
		.cluster()
}

Node 🔗

A Kafka node.

serviceName() 🔗

Return Type
String !
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 single-node \
 service-name
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Kafka().
			SingleNode().
			ServiceName(ctx)
}
@function
async def example() -> str:
	return await (
		dag.kafka()
		.single_node()
		.service_name()
	)
@func()
async example(): Promise<string> {
	return dag
		.kafka()
		.singleNode()
		.serviceName()
}

withEnvVariable() 🔗

Set an environment variable.

Return Type
Node !
Arguments
NameTypeDefault ValueDescription
nameString !-The name of the environment variable (e.g., "HOST").
valueString !-The value of the environment variable (e.g., "localhost").
expandBoolean -Replace `${VAR}` or $VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 single-node \
 with-env-variable --name string --value string
func (m *myModule) example(name string, value string) *KafkaNode  {
	return dag.
			Kafka().
			SingleNode().
			WithEnvVariable(name, value)
}
@function
def example(name: str, value: str) -> dag.KafkaNode:
	return (
		dag.kafka()
		.single_node()
		.with_env_variable(name, value)
	)
@func()
example(name: string, value: string): KafkaNode {
	return dag
		.kafka()
		.singleNode()
		.withEnvVariable(name, value)
}

container() 🔗

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 single-node \
 container
func (m *myModule) example() *Container  {
	return dag.
			Kafka().
			SingleNode().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.kafka()
		.single_node()
		.container()
	)
@func()
example(): Container {
	return dag
		.kafka()
		.singleNode()
		.container()
}

service() 🔗

Launch the Kafka service.

Return Type
Service !
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 single-node \
 service
func (m *myModule) example() *Service  {
	return dag.
			Kafka().
			SingleNode().
			Service()
}
@function
def example() -> dagger.Service:
	return (
		dag.kafka()
		.single_node()
		.service()
	)
@func()
example(): Service {
	return dag
		.kafka()
		.singleNode()
		.service()
}

Cluster 🔗

A Kafka cluster.

withEnvVariable() 🔗

Set an environment variable.

Return Type
Cluster !
Arguments
NameTypeDefault ValueDescription
nameString !-The name of the environment variable (e.g., "HOST").
valueString !-The value of the environment variable (e.g., "localhost").
expandBoolean -Replace `${VAR}` or $VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 cluster \
 with-env-variable --name string --value string
func (m *myModule) example(name string, value string) *KafkaCluster  {
	return dag.
			Kafka().
			Cluster().
			WithEnvVariable(name, value)
}
@function
def example(name: str, value: str) -> dag.KafkaCluster:
	return (
		dag.kafka()
		.cluster()
		.with_env_variable(name, value)
	)
@func()
example(name: string, value: string): KafkaCluster {
	return dag
		.kafka()
		.cluster()
		.withEnvVariable(name, value)
}

nodes() 🔗

Return the Kafka nodes.

Return Type
[Node ! ] !
Example
dagger -m github.com/sagikazarmark/daggerverse/kafka@c964ee26f982c4db0282523cd06f75ecb7e1102f call \
 cluster \
 nodes
func (m *myModule) example() []*KafkaNode  {
	return dag.
			Kafka().
			Cluster().
			Nodes()
}
@function
def example() -> List[dag.KafkaNode]:
	return (
		dag.kafka()
		.cluster()
		.nodes()
	)
@func()
example(): KafkaNode[] {
	return dag
		.kafka()
		.cluster()
		.nodes()
}