[FLINK-16948][docs] Change docs to better highlight embedded vs remote module configurations
This closes #93.
diff --git a/docs/io-module/apache-kafka.md b/docs/io-module/apache-kafka.md
index 762fd27..91146cc 100644
--- a/docs/io-module/apache-kafka.md
+++ b/docs/io-module/apache-kafka.md
@@ -59,7 +59,7 @@
6. The position to start consuming from
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
package org.apache.flink.statefun.docs.io.kafka;
@@ -85,7 +85,7 @@
}
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
version: "1.0"
@@ -126,12 +126,12 @@
Starts from offsets that were committed to Kafka for the specified consumer group.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KafkaIngressStartupPosition#fromGroupOffsets();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
startupPosition:
type: group-offsets
@@ -144,12 +144,12 @@
Starts from the earliest offset.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KafkaIngressStartupPosition#fromEarliest();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
startupPosition:
type: earliest
@@ -162,12 +162,12 @@
Starts from the latest offset.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KafkaIngressStartupPosition#fromLatest();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
startupPosition:
type: latest
@@ -180,7 +180,7 @@
Starts from specific offsets, defined as a map of partitions to their target starting offset.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
Map<TopicPartition, Long> offsets = new HashMap<>();
offsets.add(new TopicPartition("user-topic", 0), 91);
@@ -190,7 +190,7 @@
KafkaIngressStartupPosition#fromSpecificOffsets(offsets);
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
startupPosition:
type: specific-offsets
@@ -207,12 +207,12 @@
Starts from offsets that have an ingestion time larger than or equal to a specified date.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KafkaIngressStartupPosition#fromDate(ZonedDateTime.now());
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
startupPosition:
type: date
@@ -272,7 +272,7 @@
5. Properties for the Kafka producer
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
package org.apache.flink.statefun.docs.io.kafka;
@@ -294,7 +294,7 @@
}
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
version: "1.0"
@@ -330,12 +330,12 @@
Nothing is guaranteed, produced records can be lost or duplicated.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KafkaEgressBuilder#withNoProducerSemantics();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
deliverySemantic:
type: none
@@ -348,12 +348,12 @@
Stateful Functions will guarantee that no records will be lost but they can be duplicated.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KafkaEgressBuilder#withAtLeastOnceProducerSemantics();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
deliverySemantic:
type: at-least-once
@@ -366,12 +366,12 @@
Stateful Functions uses Kafka transactions to provide exactly-once semantics.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KafkaEgressBuilder#withExactlyOnceProducerSemantics(Duration.minutes(15));
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
deliverySemantic:
type: exactly-once
diff --git a/docs/io-module/aws-kinesis.md b/docs/io-module/aws-kinesis.md
index 65e7d51..1975004 100644
--- a/docs/io-module/aws-kinesis.md
+++ b/docs/io-module/aws-kinesis.md
@@ -59,7 +59,7 @@
6. The name of the stream to consume from
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
package org.apache.flink.statefun.docs.io.kinesis;
@@ -87,7 +87,7 @@
}
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
version: "1.0"
@@ -140,12 +140,12 @@
Start consuming from the latest position, i.e. head of the stream shards.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KinesisIngressStartupPosition#fromLatest();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
startupPosition:
type: latest
@@ -158,12 +158,12 @@
Start consuming from the earliest position possible.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KinesisIngressStartupPosition#fromEarliest();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
startupPosition:
type: earliest
@@ -176,12 +176,12 @@
Starts from offsets that have an ingestion time larger than or equal to a specified date.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
KinesisIngressStartupPosition#fromDate(ZonedDateTime.now());
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
startupPosition:
type: date
@@ -239,7 +239,7 @@
6. The number of max outstanding records before backpressure is applied
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
package org.apache.flink.statefun.docs.io.kinesis;
@@ -265,7 +265,7 @@
}
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
version: "1.0"
@@ -347,12 +347,12 @@
Consults AWS's default provider chain to determine the AWS region.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
AwsRegion.fromDefaultProviderChain();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
awsCredentials:
type: default
@@ -365,12 +365,12 @@
Specifies an AWS region using the region's unique id.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
AwsRegion.of("us-west-1");
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
awsCredentials:
type: specific
@@ -386,12 +386,12 @@
This is typically used only for development and testing purposes.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
AwsRegion.ofCustomEndpoint("https://localhost:4567", "us-west-1");
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
awsCredentials:
type: custom-endpoint
@@ -410,12 +410,12 @@
Consults AWS’s default provider chain to determine the AWS credentials.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
AwsCredentials.fromDefaultProviderChain();
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
awsCredentials:
type: default
@@ -428,12 +428,12 @@
Specifies the AWS credentials directly with provided access key ID and secret access key strings.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
AwsCredentials.basic("accessKeyId", "secretAccessKey");
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
awsCredentials:
type: basic
@@ -448,12 +448,12 @@
Specifies the AWS credentials using an AWS configuration profile, along with the profile's configuration path.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
AwsCredentials.profile("profile-name", "/path/to/profile/config");
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
awsCredentials:
type: basic
diff --git a/docs/io-module/index.md b/docs/io-module/index.md
index 3ae0905..34909fc 100644
--- a/docs/io-module/index.md
+++ b/docs/io-module/index.md
@@ -42,7 +42,7 @@
The spec defines the details of how to connect to the external system, which is specific to each individual I/O module. Each identifier-spec pair is bound to the system inside an stateful function module.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
package org.apache.flink.statefun.docs.io.ingress;
@@ -79,7 +79,7 @@
}
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
version: "1.0"
@@ -103,7 +103,7 @@
Routers are bound to the system via a stateful function module, and unlike other components, an ingress may have any number of routers.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
package org.apache.flink.statefun.docs.io.ingress;
@@ -146,7 +146,7 @@
}
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
When defined in ``yaml``, routers are defined by a list of function types.
The ``id`` component of the address is pulled from the key associated with each record in its underlying source implementation.
{% highlight yaml %}
@@ -167,7 +167,7 @@
Each identifier-spec pair are bound to the system inside a stateful function module.
<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
{% highlight java %}
package org.apache.flink.statefun.docs.io.egress;
@@ -205,7 +205,7 @@
}
{% endhighlight %}
</div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
{% highlight yaml %}
version: "1.0"