Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown linting: Add languages to code blocks #5322

Merged
merged 9 commits into from
Oct 18, 2021
16 changes: 8 additions & 8 deletions docs/articles/actors/coordinated-shutdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ There's an `ActorSystem` extension called `CoordinatedShutdown` that will stop c

The default phases and their orderings are defined in the default HOCON configuration as `akka.coordinated-shutdown.phases`, and they are defined below:

```
```hocon
phases {

# The first pre-defined phase that applications can add tasks to.
Expand Down Expand Up @@ -88,7 +88,7 @@ As an end-user, you can register tasks to execute during any of these shutdown p

More phases can be added to an application by overriding the HOCON of an existing phase to include additional members in its `phase.depends-on` property. Here's an example where an additional phase might be executing before shutting down the cluster, for instance:

```
```hocon
akka.coordinated-shutdown.phases.before-cluster-shutdown.depends-on = [service-stop, my-phase]
my-phase{
timeout = 10s
Expand All @@ -108,7 +108,7 @@ The default phases are defined in a linear order, but in practice the phases are

For instance, if you're using [Akka.Cluster](xref:cluster-overview) it's commonplace to register application-specific cleanup tasks during the `cluster-leave` and `cluster-exiting` phases. Here's an example:

```
```csharp
var coordShutdown = CoordinatedShutdown.Get(myActorSystem);
coordShutdown.AddTask(CoordinatedShutdown.PhaseClusterLeave, "cleanup-my-api", () =>
{
Expand Down Expand Up @@ -137,15 +137,15 @@ It's safe to call this method multiple times as the shutdown process will only b

By default, when the final phase of the `CoordinatedShutdown` executes the calling `ActorSystem` will be terminated. This behavior can be changed by setting the following HOCON value in your configuration:

```
```hocon
akka.coordinated-shutdown.terminate-actor-system = off
```

If this setting is disabled (it is enabled b default), the `ActorSystem` will not be terminated as the final phase of the `CoordinatedShutdown` phases.

`CoordinatedShutdown` phases, by default, are also executed when the `ActorSystem` is terminated. You can change this behavior by disabling this HOCON value in your configuration:

```
```hocon
akka.coordinated-shutdown.run-by-actor-system-terminate = off
```

Expand All @@ -154,7 +154,7 @@ akka.coordinated-shutdown.run-by-actor-system-terminate = off

The CLR process will still be running, even when the `ActorSystem` is terminated by the `CoordinatedShutdown`. If you'd like to automatically terminate the process running your `ActorSystem`, you can set the following HOCON value in your configuration:

```
```hocon
akka.coordinated-shutdown.exit-clr = on
```

Expand All @@ -172,7 +172,7 @@ By default, this graceful leave action will by triggered whenever the `Coordinat

`CoordinatedShutdown.Run()` will also be executed if a node is removed via `Cluster.Down` (non-graceful exit), but this can be disabled by changing the following Akka.Cluster HOCON setting:

```
```hocon
akka.cluster.run-coordinated-shutdown-when-down = off
```

Expand All @@ -182,6 +182,6 @@ By default `CoordinatedShutdown.Run()` will be called whenever the current proce

If you wish to disable this behavior, you can pass in the following HOCON configuration value:

```
```hocon
akka.coordinated-shutdown.run-by-clr-shutdown-hook = off
```
2 changes: 1 addition & 1 deletion docs/articles/actors/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ As of Akka.NET v1.4.15 we recommend to Akka.NET users adopt the Akka.DependencyI

You can install Akka.DependencyInjection via NuGet:

```
```console
PS> Install-Package Akka.DependencyInjection
```

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/actors/dispatchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ During its initial development and benchmarks, we observed the following:

The `ChannelExectuor` re-uses the same threading settings as the `ForkJoinExecutor` to determine its effective upper and lower parallelism limits, and you can configure the `ChannelExecutor` to run inside your `ActorSystem` via the following HOCON configuration:

```
```hocon
akka.actor.default-dispatcher = {
executor = channel-executor
fork-join-executor { #channelexecutor will re-use these settings
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/clustering/cluster-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ An actor system that is not part of the cluster can communicate with actors some

Also, note it's necessary to change akka.actor.provider from `Akka.Actor.LocalActorRefProvider` to `Akka.Remote.RemoteActorRefProvider` or `Akka.Cluster.ClusterActorRefProvider` when using the cluster client.

```
```hocon
akka.actor.provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
```

or this shorthand notation

```
```hocon
akka.actor.provider = cluster
```

Expand Down
4 changes: 2 additions & 2 deletions docs/articles/clustering/cluster-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ akka {

You can silence the logging of cluster events at info level with configuration property:

```
```hocon
akka.cluster.log-info = off
```

You can enable verbose logging of cluster events at info level, e.g. for temporary troubleshooting, with configuration property:

```
```hocon
akka.cluster.log-info-verbose = on
```

Expand Down
4 changes: 2 additions & 2 deletions docs/articles/clustering/cluster-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The frontend that receives user jobs and delegates to the backends via the route

As you can see, the router is defined in the same way as other routers, and in this case it is configured as follows:

```
```hocon
akka.actor.deployment {
/factorialFrontend/factorialBackendRouter = {
# Router type provided by metrics extension.
Expand Down Expand Up @@ -130,7 +130,7 @@ Custom metrics collector implementation class must be specified in the `akka.clu

The Cluster metrics extension can be configured with the following properties:

```
```hocon
##############################################
# Akka Cluster Metrics Reference Config File #
##############################################
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/clustering/cluster-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Now that we've gone over some of the concepts and distributed programming concer

The first step towards using Akka.Cluster is to install the [Akka.Cluster NuGet package](http://www.nuget.org/packages/Akka.Cluster/ "Akka.Cluster NuGet Package"), which you can do inside the Package Manager Console in Visual Studio:

```
```console
PM> Install-Package Akka.Cluster
```

Expand Down
8 changes: 4 additions & 4 deletions docs/articles/clustering/cluster-sharding.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ There are two options for the remember entities store:

You can enable persistence mode (enabled by default) with:

```
```hocon
akka.cluster.sharding.state-store-mode = persistence
```

This mode uses [persistence](../persistence/event-sourcing.md) to store the active shards and active entities for each shard.
By default, cluster sharding will use the journal and snapshot store plugin defined in `akka.persistence.journal.plugin` and
`akka.persistence.snapshot-store.plugin` respectively; to change this behavior, you can use these configuration:

```
```hocon
akka.cluster.sharding.journal-plugin-id = <plugin>
akka.cluster.sharding.snapshot-plugin-id = <plugin>
```
Expand All @@ -147,14 +147,14 @@ akka.cluster.sharding.snapshot-plugin-id = <plugin>

You can enable DData mode by setting these configuration:

```
```hocon
akka.cluster.sharding.state-store-mode = ddata
```

To support restarting entities after a full cluster restart (non-rolling) the remember entities store
is persisted to disk by distributed data. This can be disabled if not needed:

```
```hocon
akka.cluster.sharding.distributed-data.durable.keys = []
```

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/clustering/distributed-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Distributed Data

Akka.DistributedData plugin can be used as in-memory, highly-available, distributed key-value store, where values conform to so called [Conflict-Free Replicated Data Types](http://hal.upmc.fr/inria-00555588/document) (CRDT). Those data types can have replicas across multiple nodes in the cluster, where DistributedData plugin has been initialized. We are free to perform concurrent updates on replicas with the same corresponding key without need of coordination (distributed locks or transactions) - all state changes will eventually converge with conflicts being automatically resolved, thanks to the nature of CRDTs. To use distributed data plugin, simply install it via NuGet:

```
```console
install-package Akka.DistributedData
```

Expand Down
6 changes: 3 additions & 3 deletions docs/articles/discovery/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ For simple use cases configuration can be used for service discovery. The advant

Configure it to be used as discovery method in your `application.conf`

```
```hocon
akka {
discovery.method = config
}
```

By default the services discoverable are defined in `akka.discovery.config.services` and have the following format:

```
```hocon
akka.discovery.config.services = {
service1 = {
endpoints = [
Expand All @@ -85,7 +85,7 @@ want to aggregate.

Configure `aggregate` as `akka.discovery.method` and which discovery methods are tried and in which order.

```
```hocon
akka {
discovery {
method = aggregate
Expand Down
8 changes: 4 additions & 4 deletions docs/articles/hocon/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ The only way to ensure that your environment variables have the desired case is

For example, the the ambient environment might have this definition ...

```
```cmd
set Path=A;B;C
```

... we just don't know. But if the HOCON needs "PATH", then the start script must take a precautionary approach and enforce the necessary case as follows ...

```
```cmd
set OLDPATH=%PATH%
set PATH=
set PATH=%OLDPATH%
Expand All @@ -327,14 +327,14 @@ You cannot know what ambient environment variables might exist in the ambient en

The idea of self-referential substitution is to allow a new value for a field to be based on the older value.

```
```text
path : "a:b:c"
path : ${path}":d"
```

is equal to:

```
```text
path : "a:b:c:d"
```

Expand Down
6 changes: 3 additions & 3 deletions docs/articles/intro/tutorial-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ counterpart. This is how it looks like in practice:

We see that the following two lines are printed

```
```text
First : Actor[akka://testSystem/user/first-actor#1053618476]
Second: Actor[akka://testSystem/user/first-actor/second-actor#-1544706041]
```
Expand Down Expand Up @@ -180,7 +180,7 @@ Again, we can try out all this with a simple experiment:

After running it, we get the output

```
```text
first started
second started
second stopped
Expand Down Expand Up @@ -211,7 +211,7 @@ the default strategy in this simple experiment:

After running the snippet, we see the following output on the console:

```
```text
supervised actor started
supervised actor fails now
supervised actor stopped
Expand Down
8 changes: 4 additions & 4 deletions docs/articles/networking/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Starting from Akka.NET v1.5, default Newtonsoft.Json serializer will be replaced

Then bind `hyperion` serializer using following HOCON configuration in your actor system settings:

```
```hocon
akka {
actor {
serializers {
Expand Down Expand Up @@ -357,7 +357,7 @@ from being deserialized:
Be warned that these class can be used as a man in the middle attack vector, but if you need
to serialize one of these class, you can turn off this feature using this inside your HOCON settings:

```
```hocon
akka.actor.serialization-settings.hyperion.disallow-unsafe-type = false
```

Expand All @@ -384,7 +384,7 @@ There are two ways to set this up, one through the HOCON configuration file, and

HOCON example:

```
```hocon
akka.actor.serialization-settings.hyperion.cross-platform-package-name-overrides = {
netfx = [
{
Expand Down Expand Up @@ -524,7 +524,7 @@ reflecting actual fields and properties of `Foo` class, it will use the much sim
`FooSurrogate` class instead. To tell Hyperion to use this information, we need to pass the
surrogate information inside the HOCON settings:

```
```hocon
akka.actor {
serializers.hyperion = ""Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion""
serialization-bindings {
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/persistence/persistent-fsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ On recovery state data is initialized according to the latest available snapshot

You can enable periodical `SaveStateSnapshot()` calls in `PersistentFSM` if you turn the following flag on in `reference.conf`

```
```hocon
akka.persistence.fsm.snapshot-after = 1000
```

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/persistence/storage-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ By default, persistence plugins are started on-demand, as they are used. In some

For example, if you want eager initialization for the sqlite journal and snapshot store plugin, your configuration should look like this:

```
```hocon
akka {
persistence {
journal {
Expand Down
6 changes: 3 additions & 3 deletions docs/articles/remoting/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Here is how Akka.NET v1.4.14 performs with batching enabled (it's on by default)

Versus the numbers with

```
```hocon
akka.remote.dot-netty.tcp.batching.enabled = false
```

Expand All @@ -49,7 +49,7 @@ The way the I/O batching system works is by grouping messages that written in su

The Akka.Remote batching system can be disabled and tuned via the following settings:

```
```hocon
akka.remote.dot-netty.tcp{
batching{

Expand Down Expand Up @@ -116,7 +116,7 @@ You can achieve similar results for your application.

To take advantage of I/O batching in DotNetty, you need to [tailor the following Akka.Remote configuration values to your use case](../../configuration/akka.remote.md):

```
```hocon
akka.remote.dot-netty.tcp{
batching{

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/remoting/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The release of Akka.NET version 1.2.0 introduces the default [DotNetty](https://

Once you've installed valid SSL certificates, TLS is enabled via your HOCON configuration by setting `enable-ssl = true` and configuring the `ssl` HOCON configuration section like below:

```
```hocon
akka {
loglevel = DEBUG
actor {
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/streams/buffersandworkingwithrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To run a stage asynchronously it has to be marked explicitly as such using the .

Running the above example, one of the possible outputs looks like this:

```
```text
A: 2
B: 1
A: 3
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/streams/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Source.From(Enumerable.Range(0, 6)).Select(n =>

This will output:

```
```text
0
1
2
Expand Down Expand Up @@ -76,7 +76,7 @@ Source.From(Enumerable.Range(0, 10)).Select(n =>

This will output:

```
```text
0
1
2
Expand Down
Loading