kod-mono

command module
v0.0.0-...-dcc7ea8 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README

Kod-Mono

Build and Test codecov

Kod Mono is a programming template for writing kod applications.

Features

  • Mono Repo Based on Kod
  • Support gRPC & HTTP & GraphQL
  • Clean Architecture
  • Domain Driven Design
  • Unit Test & Integration Test & E2E Test
  • Observability with OpenTelemetry & Uptrace

Domain Driven Design

domain driven design

CallGraph (Auto Generated)

call graph

Run

Dependency
docker-compose -f "deployment/docker-compose.yml" up -d --build
Server
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:14318"
export OTEL_EXPORTER_OTLP_HEADERS="uptrace-dsn=http://project2_secret_token@localhost:14318?grpc=14317"
export OTEL_EXPORTER_OTLP_COMPRESSION=gzip
export OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=BASE2_EXPONENTIAL_BUCKET_HISTOGRAM
export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=DELTA

KOD_CONFIG=./config/server/dev.toml go run ./cmd/server

Try It

curl http://localhost:9527/uniqueId?name=bob -v
*   Trying 127.0.0.1:9527...
* Connected to localhost (127.0.0.1) port 9527 (#0)
> GET /uniqueId?name=bob HTTP/1.1
> Host: localhost:9527
> User-Agent: curl/8.1.2
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Date: Fri, 31 May 2024 07:06:11 GMT
< Content-Length: 30
< 
* Connection #0 to host localhost left intact
{"Uuid":"1796438007688056832"}%

Observability - Uptrace

Visiting Uptrace

Overview

overview

Traces & Logs

traces

Metrics

metrics

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
swagger
Package swagger Code generated by swaggo/swag.
Package swagger Code generated by swaggo/swag.
cmd
internal
adaptor/server
Package server is a generated GoMock package.
Package server is a generated GoMock package.
app/example
Package example is a generated GoMock package.
Package example is a generated GoMock package.
domain/snowflake
Package snowflake is a generated GoMock package.
Package snowflake is a generated GoMock package.
infra/grpc
Package grpc is a generated GoMock package.
Package grpc is a generated GoMock package.
infra/redis
Package redis is a generated GoMock package.
Package redis is a generated GoMock package.

Jump to

Keyboard shortcuts

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