go-bootcamp

command module
v0.0.0-...-0ca6d7b Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 12 Imported by: 0

README

go-bootcamp

Geekbang Go Basic Bootcamp

v0.0.3

kube

  • Rate limiter middleware

  • Unit tests

  • Use zap logger everywhere

  • Update k8s deploys with conf and etcd

  • Sync -> Async

    • Average response time
      • absolute value
      • trend (%x increase in 1 second)
    • Error rate (X% during some time)
    • Stop async mode
      • After N minutes
      • keep a percentage of sync request (using random number), if the sync request is ok (response time, no error), then gradually increase the sync percentage
    • Preempt send : Select for Update, only one instance can succeed to update the update time, then it continues to send the message, other instances will not query this record because it is now too recent.
  • Gin Refresh & Access Token Middleware

    • Generate Token interface
    • Generate JWT token
    • Session or not
    • (jwt.Handler + login_jwt middleware)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
domain
Domain object
Domain object
repository
Data storage
Data storage
repository/cache
Cache access
Cache access
repository/cache/mocks
Package cachemocks is a generated GoMock package.
Package cachemocks is a generated GoMock package.
repository/cache/rediscache/mocks
Package redismock is a generated GoMock package.
Package redismock is a generated GoMock package.
repository/dao
Database access
Database access
repository/dao/mocks
Package daomocks is a generated GoMock package.
Package daomocks is a generated GoMock package.
repository/mocks
Package repomocks is a generated GoMock package.
Package repomocks is a generated GoMock package.
service
Domain service
Domain service
service/mocks
Package svcmocks is a generated GoMock package.
Package svcmocks is a generated GoMock package.
service/sms/mocks
Package smsmocks is a generated GoMock package.
Package smsmocks is a generated GoMock package.
web
web/jwt/mocks
Package jwtmocks is a generated GoMock package.
Package jwtmocks is a generated GoMock package.
pkg
limiter/mocks
Package limitermocks is a generated GoMock package.
Package limitermocks is a generated GoMock package.
utils
writedb Module

Jump to

Keyboard shortcuts

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