
Security News
Node.js TSC Declines to Endorse Feature Bounty Program
The Node.js TSC opted not to endorse a feature bounty program, citing concerns about incentives, governance, and project neutrality.
github.com/tikv/client-go/v2
TiKV Go Client provides support for interacting with the TiKV server in the form of a Go library.
There are 2 major versions of the client-go
package.
v2
is the latest stable version. This version was extracted from pingcap/tidb and it includes new TiKV features like Follower Read, 1PC, Async Commit. The development of this version is on the master
branch. The documentation for this version is below.
v1
is the previous stable version and is only maintained for bug fixes. You can read the documentation here.
# valid versions be like @latest, @e5f932ae270887550b0cd221343dbd6b870b6c8f, @v2.0.0, @v2.0.1...
go get github.com/tikv/client-go/v2@COMMIT_HASH_OR_TAG_VERSION
Explanation of related concepts and sample code can be found in the Client-Go Wiki. There are also executable examples in examples directory.
Pull Requests and issues are welcomed. Please check CONTRIBUTING.md.
Note: All the following tests are included in the CI and you can submit a Pull Request directly to hand over the work.
To run unit tests, use following command
go test ./...
To run code linter, make sure golangci-lint
is installed. Then use following command
golangci-lint run
integration_tests
can run against a real TiKV cluster. Here is an example:
./pd-server &
sleep 5
./tikv-server &
sleep 10
cd integration_tests
go test --with-tikv
It is a common task to update client-go and then test it with TiDB.
If you only need to test locally, you can directly use the modified client-go on the same host by replacing:
go mod edit -replace=github.com/tikv/client-go/v2=/path/to/client-go
If you want to push your TiDB code to GitHub for running CI or for code review, you need to change the client-go used by TiDB to your developing branch using the following steps:
go get -d github.com/GITHUB_USERNAME/client-go/v2@DEV_BRANCH
# Output:
# go get: github.com/GITHUB_USERNAME/client-go/v2@none updating to
# github.com/GITHUB_USERNAME/client-go/v2@v2.0.0-XXXXXXXXXXXXXX-XXXXXXXXXXXX: parsing go.mod:
# module declares its path as: github.com/tikv/client-go/v2
# but was required as: github.com/GITHUB_USERNAME/client-go/v2
go mod edit -replace=github.com/tikv/client-go/v2=github.com/GITHUB_USERNAME/client-go/v2@v2.0.0-XXXXXXXXXXXXXX-XXXXXXXXXXXX
go mod download github.com/tikv/client-go/v2
client-go
is used by the following projects:
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Node.js TSC opted not to endorse a feature bounty program, citing concerns about incentives, governance, and project neutrality.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.