examples/

directory
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT

Directories

Path Synopsis
Package main demonstrates policy-driven JWT issuance, encrypted token binding, generic Redis sessions, revocation, key rotation, and HTTP authentication middleware.
Package main demonstrates policy-driven JWT issuance, encrypted token binding, generic Redis sessions, revocation, key rotation, and HTTP authentication middleware.
Package main demonstrates memory and Redis caching, JSON helpers, and distributed locks.
Package main demonstrates memory and Redis caching, JSON helpers, and distributed locks.
Package main demonstrates loading typed configuration from YAML files and environment variables.
Package main demonstrates loading typed configuration from YAML files and environment variables.
Package main demonstrates local and distributed scheduled jobs.
Package main demonstrates local and distributed scheduled jobs.
Package main demonstrates GORM repositories, pagination, transactions, joins, and SQL migrations.
Package main demonstrates GORM repositories, pagination, transactions, joins, and SQL migrations.
Package main runs self-cleaning MongoDB examples: client groups, CRUD, indexed pagination, streaming, cross-database transactions with an outbox, scope guards, change streams, capability/diagnostic checks, driver options, transaction monitoring, and graceful draining.
Package main runs self-cleaning MongoDB examples: client groups, CRUD, indexed pagination, streaming, cross-database transactions with an outbox, scope guards, change streams, capability/diagnostic checks, driver options, transaction monitoring, and graceful draining.
Package main demonstrates EventBus tasks and events in a single process.
Package main demonstrates EventBus tasks and events in a single process.
admin command
Package main provides an EventBus operations example for statistics and dead-letter queue administration.
Package main provides an EventBus operations example for statistics and dead-letter queue administration.
benchmark command
Package main benchmarks EventBus throughput, latency, retries, and concurrency across supported transports.
Package main benchmarks EventBus throughput, latency, retries, and concurrency across supported transports.
internal/demo
Package demo contains shared configuration, runtime wiring, handlers, and observability helpers for EventBus examples.
Package demo contains shared configuration, runtime wiring, handlers, and observability helpers for EventBus examples.
observability command
Package main demonstrates EventBus metrics and tracing with OpenTelemetry.
Package main demonstrates EventBus metrics and tracing with OpenTelemetry.
producer command
Package main demonstrates publishing EventBus tasks and events from a standalone producer.
Package main demonstrates publishing EventBus tasks and events from a standalone producer.
subscriber command
Package main demonstrates consuming EventBus broadcast events in a standalone subscriber.
Package main demonstrates consuming EventBus broadcast events in a standalone subscriber.
worker command
Package main demonstrates processing EventBus tasks in a standalone worker.
Package main demonstrates processing EventBus tasks in a standalone worker.
Package main demonstrates supervised APIs, workers, dependencies, health checks, telemetry, and graceful shutdown with foundation.App.
Package main demonstrates supervised APIs, workers, dependencies, health checks, telemetry, and graceful shutdown with foundation.App.
Package main demonstrates serving a gqlgen GraphQL API with net/http, Fiber, Gin, and Echo adapters.
Package main demonstrates serving a gqlgen GraphQL API with net/http, Fiber, Gin, and Echo adapters.
graph
Package graph contains the generated GraphQL executable schema and its resolver implementations.
Package graph contains the generated GraphQL executable schema and its resolver implementations.
graph/model
Package model contains generated data types for the GraphQL example schema.
Package model contains generated data types for the GraphQL example schema.
service
Package service provides the in-memory data and batch-loading functions used by the GraphQL example.
Package service provides the in-memory data and batch-loading functions used by the GraphQL example.
grpc
cmd/certgen command
Command certgen creates development-only TLS/mTLS certificates for localhost.
Command certgen creates development-only TLS/mTLS certificates for localhost.
cmd/client command
Command client exercises unary, streaming, error, deadline and health scenarios.
Command client exercises unary, streaming, error, deadline and health scenarios.
cmd/foundation command
Command foundation runs the gRPC example with foundation-owned signals/lifecycle.
Command foundation runs the gRPC example with foundation-owned signals/lifecycle.
cmd/server command
Command server runs the authenticated gRPC demonstration server.
Command server runs the authenticated gRPC demonstration server.
internal/demo
Package demo contains the wiring shared by the standalone server and client.
Package demo contains the wiring shared by the standalone server and client.
internal/devcert
Package devcert creates short-lived localhost certificates for this example.
Package devcert creates short-lived localhost certificates for this example.
proto
Package proto contains generated protobuf messages and services for the gRPC echo example.
Package proto contains generated protobuf messages and services for the gRPC echo example.
Package main demonstrates readiness and liveness endpoints with framework-specific health handlers.
Package main demonstrates readiness and liveness endpoints with framework-specific health handlers.
Package main demonstrates HTTP retries and circuit breaking with the resilient HTTP client.
Package main demonstrates HTTP retries and circuit breaking with the resilient HTTP client.
Package main demonstrates basic usage of the github.com/thanhbvha/go-common/kafka package.
Package main demonstrates basic usage of the github.com/thanhbvha/go-common/kafka package.
Package main demonstrates synchronous, asynchronous, contextual, and child structured loggers.
Package main demonstrates synchronous, asynchronous, contextual, and child structured loggers.
Package main demonstrates NATS messaging, JetStream, consumer groups, key-value storage, and JSON helpers.
Package main demonstrates NATS messaging, JetStream, consumer groups, key-value storage, and JSON helpers.
Package main demonstrates Redis-backed rate limiting through HTTP framework middleware.
Package main demonstrates Redis-backed rate limiting through HTTP framework middleware.
Package main demonstrates framework-independent panic capture and structured recovery reports.
Package main demonstrates framework-independent panic capture and structured recovery reports.
Package main demonstrates Redis clients in standalone, cluster, and Sentinel modes.
Package main demonstrates Redis clients in standalone, cluster, and Sentinel modes.
Package main demonstrates OpenTelemetry tracing and metrics instrumentation.
Package main demonstrates OpenTelemetry tracing and metrics instrumentation.
Package main demonstrates cryptography, strings, context values, slice transformations, and graceful shutdown utilities.
Package main demonstrates cryptography, strings, context values, slice transformations, and graceful shutdown utilities.
Package main demonstrates a validated HTTP API with standardized responses and middleware.
Package main demonstrates a validated HTTP API with standardized responses and middleware.
Package main demonstrates an authenticated WebSocket server with rooms, sharding, clustering, and graceful shutdown.
Package main demonstrates an authenticated WebSocket server with rooms, sharding, clustering, and graceful shutdown.
client command
Package main provides an interactive and scripted client for the WebSocket server example.
Package main provides an interactive and scripted client for the WebSocket server example.
cluster command
The cluster example separates gateways, business workers and realtime routers.
The cluster example separates gateways, business workers and realtime routers.
internal/exampleconfig
Package exampleconfig loads shared YAML, dotenv, environment, and command-line configuration for WebSocket examples.
Package exampleconfig loads shared YAML, dotenv, environment, and command-line configuration for WebSocket examples.
loadtest command
Package main provides a configurable load generator for the WebSocket server example.
Package main provides a configurable load generator for the WebSocket server example.
Package main demonstrates structured errors, wrapping, joining, stack traces, and attached fields.
Package main demonstrates structured errors, wrapping, joining, stack traces, and attached fields.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL