Skip to content

Commit f0fc074

Browse files
committed
feat(discovery): add HTTP polling-based service discovery configuration
- Introduced HTTPConfig struct for HTTP polling-based discovery settings. - Updated Config struct to include HTTPConfig. - Implemented push and deregister functionality to a specified gateway URL. - Enhanced service registration and deregistration logging. - Added support for default tags in OpenAPI schema generation, making fields with default values implicitly optional. - Updated tests to verify behavior of default tags and their precedence over required and optional tags.
1 parent d3b02ba commit f0fc074

Some content is hidden

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

74 files changed

+2614
-566
lines changed

app_impl.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,12 @@ func (a *app) Run() error {
667667

668668
// Create HTTP server
669669
a.httpServer = &http.Server{
670-
Addr: a.config.HTTPAddress,
671-
Handler: a.router,
672-
ReadTimeout: a.config.HTTPTimeout,
673-
WriteTimeout: a.config.HTTPTimeout,
674-
IdleTimeout: a.config.HTTPTimeout * 2,
670+
Addr: a.config.HTTPAddress,
671+
Handler: a.router,
672+
ReadTimeout: a.config.HTTPTimeout,
673+
ReadHeaderTimeout: 10 * time.Second,
674+
WriteTimeout: a.config.HTTPTimeout,
675+
IdleTimeout: a.config.HTTPTimeout * 2,
675676
}
676677

677678
// Print startup banner

cmd/forge/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ require (
8989
github.com/xdg-go/scram v1.1.2 // indirect
9090
github.com/xdg-go/stringprep v1.0.4 // indirect
9191
github.com/xraph/confy v0.1.0 // indirect
92-
github.com/xraph/go-utils v1.0.0 // indirect
92+
github.com/xraph/go-utils v1.1.0 // indirect
9393
github.com/xraph/vessel v1.0.0 // indirect
9494
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
9595
go.mongodb.org/mongo-driver v1.17.4 // indirect

cmd/forge/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6
306306
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
307307
github.com/xraph/confy v0.1.0 h1:dAdI/ShnkU5PEXVsfR86swoWj6XjJ37BdPQpBIUmg9M=
308308
github.com/xraph/confy v0.1.0/go.mod h1:/uhVfKibPR+kn7MI9LkVVekk84NP0sxsKZ9sFQoQ5Kc=
309-
github.com/xraph/go-utils v1.0.0 h1:P1jOvtDlC5xZyGtnIhypFfPUBgpfyrwESY4TK4P2I5g=
310-
github.com/xraph/go-utils v1.0.0/go.mod h1:yp+PD9dXSA7tA9Pxmuveg5E7Ht1iHIVov8yMvanMG7U=
309+
github.com/xraph/go-utils v1.1.0 h1:bPO4C/mwm0I5ZZa3RxbwUqKhy3Vnxvm3s98vmX8CrjY=
310+
github.com/xraph/go-utils v1.1.0/go.mod h1:tZN4SuGy9otCo6dETp7Cvkgyiy0BvaJaZbTBv4Euvo4=
311311
github.com/xraph/vessel v1.0.0 h1:n2q30d0OGPENpFfmOUgEuS99Y+X6b6WTfzdOHiE4Ds0=
312312
github.com/xraph/vessel v1.0.0/go.mod h1:quT3UWDXZF0RLL34H3ijXP9kVnh2pdfnn0f2s3ezChA=
313313
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM=

docs/content/blog/gateway-configuration.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ tags: [gateway, load-balancing, circuit-breaker, production]
88
coverGradient: "from-cyan-500/20 via-blue-500/10 to-transparent"
99
---
1010

11+
import { Callout } from 'fumadocs-ui/components/callout';
12+
13+
<Callout type="warn" title="Deprecated">
14+
The Gateway extension is deprecated. Please use **Bastion** instead, which provides a more robust API gateway with improved performance and scalability.
15+
</Callout>
16+
1117
## Why a Built-In Gateway
1218

1319
Most Go services eventually need a reverse proxy, rate limiter, or circuit breaker in front of their upstream dependencies. Instead of deploying a separate Nginx, Envoy, or Kong instance, Forge ships a gateway extension that runs in-process — same binary, same observability, same configuration system.

docs/content/docs/extensions/ai/index.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ description: Implementation-accurate guide for the Forge AI extension
44
---
55

66
import { Cards, Card } from 'fumadocs-ui/components/card';
7+
import { Callout } from 'fumadocs-ui/components/callout';
8+
9+
<Callout type="warn" title="Deprecated">
10+
The AI extension is deprecated and will be removed in a future release. It has been replaced by a family of specialized extensions:
11+
12+
- **Cortex** — LLM abstraction and agent orchestration
13+
- **Shield** — AI guardrails and content filtering
14+
- **Sentinel** — AI monitoring and observability
15+
- **Weave** — RAG pipelines and workflow orchestration
16+
- **Nexus** — AI model hub and inference management
17+
18+
Please migrate to these extensions for new projects.
19+
</Callout>
720

821
## Overview
922

docs/content/docs/extensions/complete-catalog.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ All extension modules currently available in `extensions/*` in this repository:
77

88
| Extension | Docs | Package |
99
|---|---|---|
10-
| AI | `/docs/extensions/ai` | `github.com/xraph/forge/extensions/ai` |
10+
| AI (Deprecated) | `/docs/extensions/ai` | `github.com/xraph/forge/extensions/ai` — use Cortex, Shield, Sentinel, Weave, Nexus instead |
1111
| Auth | `/docs/extensions/auth` | `github.com/xraph/forge/extensions/auth` |
1212
| Cache | `/docs/extensions/cache` | `github.com/xraph/forge/extensions/cache` |
1313
| Consensus | `/docs/extensions/consensus` | `github.com/xraph/forge/extensions/consensus` |
1414
| Cron | `/docs/extensions/cron` | `github.com/xraph/forge/extensions/cron` |
1515
| Dashboard | `/docs/extensions/dashboard` | `github.com/xraph/forge/extensions/dashboard` |
16-
| Database | `/docs/extensions/database` | `github.com/xraph/forge/extensions/database` |
16+
| Database (Deprecated) | `/docs/extensions/database` | `github.com/xraph/forge/extensions/database` — use Grove instead |
1717
| Discovery | `/docs/extensions/discovery` | `github.com/xraph/forge/extensions/discovery` |
1818
| Events | `/docs/extensions/events` | `github.com/xraph/forge/extensions/events` |
1919
| Features | `/docs/extensions/features` | `github.com/xraph/forge/extensions/features` |
20-
| Gateway | `/docs/extensions/gateway` | `github.com/xraph/forge/extensions/gateway` |
20+
| Gateway (Deprecated) | `/docs/extensions/gateway` | `github.com/xraph/forge/extensions/gateway` — use Bastion instead |
2121
| GraphQL | `/docs/extensions/graphql` | `github.com/xraph/forge/extensions/graphql` |
2222
| gRPC | `/docs/extensions/grpc` | `github.com/xraph/forge/extensions/grpc` |
2323
| HLS | `/docs/extensions/hls` | `github.com/xraph/forge/extensions/hls` |
@@ -28,7 +28,7 @@ All extension modules currently available in `extensions/*` in this repository:
2828
| Queue | `/docs/extensions/queue` | `github.com/xraph/forge/extensions/queue` |
2929
| Search | `/docs/extensions/search` | `github.com/xraph/forge/extensions/search` |
3030
| Security | `/docs/extensions/security` | `github.com/xraph/forge/extensions/security` |
31-
| Storage | `/docs/extensions/storage` | `github.com/xraph/forge/extensions/storage` |
31+
| Storage (Deprecated) | `/docs/extensions/storage` | `github.com/xraph/forge/extensions/storage` — use Trove instead |
3232
| Streaming | `/docs/extensions/streaming` | `github.com/xraph/forge/extensions/streaming` |
3333
| WebRTC | `/docs/extensions/webrtc` | `github.com/xraph/forge/extensions/webrtc` |
3434

docs/content/docs/extensions/database/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ description: Implementation-accurate guide for Forge database extension
44
---
55

66
import { Cards, Card } from 'fumadocs-ui/components/card';
7+
import { Callout } from 'fumadocs-ui/components/callout';
8+
9+
<Callout type="warn" title="Deprecated">
10+
The Database extension is deprecated and will be removed in a future release. Please migrate to **Grove**, which provides an improved database layer with better performance, more drivers, and enhanced query capabilities.
11+
</Callout>
712

813
## Overview
914

docs/content/docs/extensions/gateway/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ description: API gateway with FARP service discovery, multi-protocol proxying, a
44
---
55

66
import { Cards, Card } from 'fumadocs-ui/components/card';
7+
import { Callout } from 'fumadocs-ui/components/callout';
8+
9+
<Callout type="warn" title="Deprecated">
10+
The Gateway extension is deprecated and will be removed in a future release. Please migrate to **Bastion**, which provides a more robust API gateway with improved performance, enhanced security, and better scalability for production workloads.
11+
</Callout>
712

813
## Overview
914

docs/content/docs/extensions/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ All extension packages and import paths in one reference.
2323

2424
<Cards>
2525
<Card title="Data and Storage" href="/docs/extensions/database">
26-
Database, cache, search, and object/file storage.
26+
Grove (database), cache, search, and Trove (object storage). Legacy Database and Storage extensions are deprecated.
2727
</Card>
2828
<Card title="Messaging" href="/docs/extensions/events">
2929
Events, queue workers, Kafka, and MQTT.
@@ -35,12 +35,12 @@ gRPC, GraphQL, oRPC, and MCP transport surfaces.
3535
Streaming, WebRTC, and HLS for real-time systems.
3636
</Card>
3737
<Card title="Platform and Infrastructure" href="/docs/extensions/gateway">
38-
Gateway, discovery, scheduling, operations UI, and consensus.
38+
Bastion (API gateway), discovery, scheduling, operations UI, and consensus. Legacy Gateway extension is deprecated.
3939
</Card>
4040
<Card title="Security and Access" href="/docs/extensions/auth">
4141
Authentication, security controls, and feature flags.
4242
</Card>
4343
<Card title="AI" href="/docs/extensions/ai">
44-
AI SDK integration, agent workflows, and inference/training surfaces.
44+
Cortex, Shield, Sentinel, Weave, and Nexus. Legacy AI extension is deprecated.
4545
</Card>
4646
</Cards>

docs/content/docs/extensions/storage/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ description: Unified object storage with S3, GCS, Azure, and local filesystem ba
44
---
55

66
import { Cards, Card } from 'fumadocs-ui/components/card';
7+
import { Callout } from 'fumadocs-ui/components/callout';
8+
9+
<Callout type="warn" title="Deprecated">
10+
The Storage extension is deprecated and will be removed in a future release. Please migrate to **Trove**, which provides an improved object storage layer with additional backends and enhanced capabilities.
11+
</Callout>
712

813
## Overview
914

0 commit comments

Comments
 (0)