Release - v1.34.0
🚀 Features
1. NATS-KV Store Support
GoFr now supports NATS-KV Store as a datastore. The supported methods include:
type KVStore interface {
Get(ctx context.Context, key string) (string, error)
Set(ctx context.Context, key, value string) error
Delete(ctx context.Context, key string) error
HealthCheck(ctx context.Context) (any, error)
}To integrate NATSKV Store as a datastore, add the following configuration:
app.AddKVStore(nats.New(nats.Configs{
Server: "nats://localhost:4222",
Bucket: "persons",
}))Refer to the documentation for more details.
2. ArangoDB Migrations
Added migration support for ArangoDB, allowing users to perform schema changes seamlessly. The following methods are now available in migration:
// CreateDB creates a new database in ArangoDB.
CreateDB(ctx context.Context, database string) error
// DropDB deletes an existing database in ArangoDB.
DropDB(ctx context.Context, database string) error
// CreateCollection creates a new collection in a database.
CreateCollection(ctx context.Context, database, collection string, isEdge bool) error
// DropCollection deletes an existing collection from a database.
DropCollection(ctx context.Context, database, collection string) error
// CreateGraph creates a new graph in a database.
//
// Parameters:
// - ctx: Request context for tracing and cancellation.
// - database: Name of the database where the graph will be created.
// - graph: Name of the graph to be created.
// - edgeDefinitions: Pointer to EdgeDefinition struct containing edge definitions.
//
// Returns an error if edgeDefinitions is not of type *EdgeDefinition or is nil.
CreateGraph(ctx context.Context, database, graph string, edgeDefinitions any) error
// DropGraph deletes an existing graph from a database.
DropGraph(ctx context.Context, database, graph string) error🛠 Fixes & Improvements
1. Automatic PubSub Reconnection
Fixed automatic retries and reconnection in PubSub. It now reconnects immediately upon connection availability.
2. Added go.work
Simplifies dependency handling and development with better multi-module management.
3. Telemetry for Active GoFr Servers
GoFr now includes telemetry to track the number of running GoFr servers, helping us understand adoption and usage trends.
To disable telemetry, set:
GOFR_TELEMETRY=false