Skip to content

Commit c42c1e9

Browse files
authored
Act system (#46)
* Remove termination and acceptance policy * Fix code snippet * Add Act system docs * Update last modified datetime * Update title * Update plugin config table * Update console output * Update last modified datetime * Update script to have more accurate datetime updates in UTC
1 parent 2bfb99e commit c42c1e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+182
-117
lines changed

developing-plugins/grpc-api-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:39
33
layout: default
44
title: gRPC API Reference
55
description: GatewayD exposes a gRPC API that can be used to interact with the GatewayD plugin system. This API can be used by the GatewayD plugins and is available in the GatewayD SDK.

developing-plugins/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:39
33
layout: default
44
title: Developing Plugins
55
nav_order: 4

developing-plugins/plugin-developers-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:39
33
layout: default
44
title: Plugin Developers Guide
55
description: Plugin developers' guide of GatewayD

developing-plugins/sdk-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:39
33
layout: default
44
title: SDK Reference
55
description: The GatewayD plugin SDK provides a number of interfaces, structs and methods to help you build your plugin.

developing-plugins/template-projects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:39
33
layout: default
44
title: Template Projects
55
description: Template projects can be used to quickly get started with developing plugins.

generate_last_modified_data.sh

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
#!/usr/bin/bash
22
# Replace `last_modified_date` timestamp with current time
3-
# https://mademistakes.com/notes/adding-last-modified-timestamps-with-git/#mention-5
3+
# This script is used to update the `last_modified_date` timestamp in the frontmatter of all Markdown files in the current directory and subdirectories.
44

5-
for b in $(find ./ -type d \( -path ./vendor -o -path ./node_modules \) -prune -o -name '*.md'); do
6-
if [ -d "${b}" ]; then
7-
continue
8-
fi
9-
10-
if [ "$b" = "./.vale/write-good/README.md" ] || [ "$b" = "./README.md" ]; then
11-
continue
12-
fi
5+
# Loop through all Markdown files in the current directory and subdirectories
6+
find . -type f -name "*.md" | while read file; do
7+
# Check if the file contains a frontmatter block
8+
if grep -q "^---" "$file"; then
9+
# Get the last modified timestamp of the file
10+
last_modified_timestamp=$(stat -c %Y "$file")
1311

14-
if [ $(cat ${b} | head -n 1 | grep -E '\-\-\-') ]; then
15-
echo "already have meta"
16-
else
17-
cat ${b} | sed '1s/^/---\n---\n/' >tmp
18-
mv tmp ${b}
19-
fi
12+
# Convert the last modified timestamp to UTC datetime in YYYY-MM-DD HH:MM:SS format
13+
last_modified_datetime_utc=$(date -u -d @"$last_modified_timestamp" "+%Y-%m-%d %H:%M:%S")
2014

21-
if grep -q last_modified_date ${b}; then
22-
echo "no change"
23-
else
24-
cat ${b} | sed '1 {/---.*/,/---.*/{0,/---/{s/---/---\nlast_modified_date:/}}}' >tmp
25-
mv tmp ${b}
15+
# Check if last_modified_date exists in the frontmatter, update it if it does
16+
if grep -q "^last_modified_date:" "$file"; then
17+
sed -i "/^last_modified_date:/c\last_modified_date: $last_modified_datetime_utc" "$file"
18+
else
19+
# If last_modified_date does not exist, add it after the first frontmatter delimiter
20+
sed -i "/^---/a last_modified_date: $last_modified_datetime_utc" "$file"
21+
fi
2622
fi
27-
28-
cat ${b} | sed "/---.*/,/---.*/s/^last_modified_date:.*$/last_modified_date: $(git log -1 --pretty="format:%ci" ${b})/" >tmp
29-
mv tmp ${b}
3023
done
31-
32-
rm -rf we work.md

getting-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:38
33
layout: default
44
title: Getting Started
55
nav_order: 1

getting-started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:38
33
layout: default
44
title: Installation
55
description: How to install GatewayD and its plugins on different platforms and how to build it from source.

getting-started/running-gatewayd.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:38
33
layout: default
44
title: Running GatewayD
55
description: How to run GatewayD and test it with psql
@@ -95,20 +95,21 @@ Running GatewayD will produce the following log output, which means that Gateway
9595
5. exposing an HTTP and a gRPC API on ports `18080` and `19090`.
9696

9797
```bash
98-
2023-12-26T16:22:02+03:30 INF configuring client automatic mTLS group=default plugin=gatewayd-plugin-cache
99-
2023-12-26T16:22:03+03:30 INF Starting metrics server via HTTP over Unix domain socket endpoint=/metrics group=default plugin=gatewayd-plugin-cache timestamp=2023-12-26T16:22:03.083+0330 unixDomainSocket=/tmp/gatewayd-plugin-cache.sock
100-
2023-12-26T16:22:03+03:30 INF configuring server automatic mTLS group=default plugin=gatewayd-plugin-cache timestamp=2023-12-26T16:22:03.084+0330
101-
2023-12-26T16:22:03+03:30 INF Registering plugin hooks group=default name=gatewayd-plugin-cache
102-
2023-12-26T16:22:03+03:30 INF Plugin is ready group=default name=gatewayd-plugin-cache
103-
2023-12-26T16:22:03+03:30 INF Started the metrics merger scheduler group=default metricsMergerPeriod=5s startDelay=2023-12-26T16:22:08+03:30
104-
2023-12-26T16:22:03+03:30 INF Starting plugin health check scheduler group=default healthCheckPeriod=5s
105-
2023-12-26T16:22:03+03:30 INF Metrics are exposed address=http://localhost:9090/metrics group=default readHeaderTimeout=10s timeout=10s
106-
2023-12-26T16:22:03+03:30 INF There are clients available in the pool count=10 group=default name=default
107-
2023-12-26T16:22:03+03:30 INF Started the client health check scheduler group=default healthCheckPeriod=1m0s startDelay=2023-12-26T16:23:03+03:30
108-
2023-12-26T16:22:03+03:30 INF GatewayD is listening address=0.0.0.0:15432 group=default
109-
2023-12-26T16:22:03+03:30 INF Started the HTTP API address=localhost:18080 group=default
110-
2023-12-26T16:22:03+03:30 INF Started the gRPC API address=localhost:19090 group=default network=tcp
111-
2023-12-26T16:22:03+03:30 INF GatewayD is running group=default pid=71426
98+
2024-03-02T13:24:51+01:00 INF Policies are loaded group=default policies=["passthrough","terminate","log"]
99+
2024-03-02T13:24:51+01:00 INF configuring client automatic mTLS group=default plugin=gatewayd-plugin-cache
100+
2024-03-02T13:24:52+01:00 INF Starting metrics server via HTTP over Unix domain socket endpoint=/metrics group=default plugin=gatewayd-plugin-cache timestamp=2024-03-02T13:24:52.427+0100 unixDomainSocket=/tmp/gatewayd-plugin-cache.sock
101+
2024-03-02T13:24:52+01:00 INF configuring server automatic mTLS group=default plugin=gatewayd-plugin-cache timestamp=2024-03-02T13:24:52.427+0100
102+
2024-03-02T13:24:52+01:00 INF Registering plugin hooks group=default name=gatewayd-plugin-cache
103+
2024-03-02T13:24:52+01:00 INF Plugin is ready group=default name=gatewayd-plugin-cache
104+
2024-03-02T13:24:52+01:00 INF Started the metrics merger scheduler group=default metricsMergerPeriod=5s startDelay=2024-03-02T13:24:57+01:00
105+
2024-03-02T13:24:52+01:00 INF Starting plugin health check scheduler group=default healthCheckPeriod=5s
106+
2024-03-02T13:24:52+01:00 INF Metrics are exposed address=http://localhost:9090/metrics group=default readHeaderTimeout=10s timeout=10s
107+
2024-03-02T13:24:52+01:00 INF There are clients available in the pool count=10 group=default name=default
108+
2024-03-02T13:24:52+01:00 INF Started the client health check scheduler group=default healthCheckPeriod=1m0s startDelay=2024-03-02T13:25:52+01:00
109+
2024-03-02T13:24:52+01:00 INF GatewayD is listening address=0.0.0.0:15432 group=default
110+
2024-03-02T13:24:52+01:00 INF Started the HTTP API address=localhost:18080 group=default
111+
2024-03-02T13:24:52+01:00 INF Started the gRPC API address=localhost:19090 group=default network=tcp
112+
2024-03-02T13:24:52+01:00 INF GatewayD is running group=default pid=24658
112113
```
113114

114115
{: .note }

getting-started/welcome.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified_date: 2024-02-18 12:58:36 +0100
2+
last_modified_date: 2024-03-02 12:35:38
33
layout: default
44
title: Welcome
55
description: Introduction to GatewayD and its key features

0 commit comments

Comments
 (0)