https://github.com/breeze0806/go
my own go lib
https://github.com/breeze0806/go
postgres timeout
Last synced: 9 months ago
JSON representation
my own go lib
- Host: GitHub
- URL: https://github.com/breeze0806/go
- Owner: Breeze0806
- License: mit
- Created: 2020-12-21T05:38:34.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T07:05:53.000Z (over 1 year ago)
- Last Synced: 2025-04-07T19:05:41.015Z (10 months ago)
- Topics: postgres, timeout
- Language: Go
- Homepage:
- Size: 38.1 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go
my go lib
## database/pqto
`database/pqto` is an extension package of [pq](github.com/lib/pq) (a pure Go postgres driver for Go's database/sql package).It introduces read and write timeouts in database soruce connection string as follows:
```
postgres://192.168.15.130:5432/postgres?sslmode=disable&connect_timeout=2&read_timeout=2s&write_timeout=2s
```
* read_timeout: It uses a format similar to Go's Duration to describe the read timeout.
* write_timeout: It uses a format similar to Go's Duration to describe the writetimeout.
## encoding
`encoding` provides a fast JSON parsing solution that is different from the one in the standard library.
## gmsm
`gmsm` provides encryption methods compliant with national cryptographic standards.
## log
`log` provides a simple logging wrapper.
## time2
`time2 provides`Go's Duration json format
## timeout
`timeout` provided a connection with read and write timeouts.