Skip to content

The high-performance API framework for Go

Write your handlers. Everything else is already done.

0
req/sec
0
latency
0
per request

See it in action

From go get to a fully observable, documented API.

~/my-api — main.go

What you get for free #

Three lines replace thirty.

Others
// Typical setup: wire each SDK separately
import (
    "go.opentelemetry.io/otel"
    "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
    "go.opentelemetry.io/otel/sdk/resource"
    "go.opentelemetry.io/otel/sdk/trace"
    "github.com/prometheus/client_golang/prometheus"
    "log/slog"
    "os"
)
func setupObservability(ctx context.Context) {
    res, _ := resource.New(ctx,
        resource.WithAttributes(
            semconv.ServiceName("my-api"),
        ),
    )
    exp, _ := otlptracegrpc.New(ctx,
        otlptracegrpc.WithEndpoint("localhost:4317"),
    )
    tp := trace.NewTracerProvider(
        trace.WithBatcher(exp),
        trace.WithResource(res),
    )
    otel.SetTracerProvider(tp)
    reg := prometheus.NewRegistry()
    reg.MustRegister(collectors.NewGoCollector())
    logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
    slog.SetDefault(logger)
    // Then wrap every handler with middleware...
}
Rivaas
// Rivaas: one block, all three pillars
app.WithObservability(
    app.WithMetrics(),
    app.WithTracing(
        tracing.WithOTLP("localhost:4317")),
    app.WithLogging(
        logging.WithJSONHandler()),
)

Full OpenTelemetry stack — metrics, traces, and structured logs — configured in one block.

Proven Performance #

Fast routing with zero allocations.

Independent benchmarks comparing rivaas/router against popular Go frameworks. All values are nanoseconds per operation (ns/op)—lower is better.

Use what you need #

Full framework or standalone packages. Same functional options, no lock-in.

standalone.go
// Use the full framework...
import "rivaas.dev/app"

// ...or just the packages you need
import "rivaas.dev/router"
import "rivaas.dev/binding"
import "rivaas.dev/validation"

// Every package has its own go.mod — no lock-in
// Same functional options everywhere

r, _ := router.New()
r.Use(cors.New(), compression.New(), recovery.New())

r.GET("/users/:id", getUser).WhereInt("id")
r.POST("/users", createUser)

r.Serve(":8080")
🌿

Wild Rhubarb of the Mountains

Named after a wild rhubarb plant that grows high in Iran's mountains, at 1,500–3,000 meters. It survives where little else can — yet has fed people for centuries.

🛡️
Resilient
Production-ready
Lightweight
Zero allocations
🔧
Adaptive
Local to cloud
📦
Self-sufficient
Integrated observability

Ready to build?

$ go get rivaas.dev/app