Registry / database / tikv-client-go-v2

tikv-client-go-v2

JSON →
library2.0.7gogounverified

Go client library for TiKV, a distributed key-value store.

go get github.com/tikv/client-go/v2
INSTALL
IMPORT
SIG · TIKV-CLIENT-GO-V2
T
tikv-client-go-v2
databasegov2.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

client
github.com/tikv/client-go/v2

Connects to a TiKV cluster and performs a basic key-value write operation.

package main import ( "context" "fmt" "log" "github.com/tikv/client-go/v2/txnkv" ) func main() { client, err := txnkv.NewClient([]string{"127.0.0.1:2379"}) if err != nil { log.Fatal(err) } defer client.Close() kv := client.GetTxn() err = kv.Set([]byte("key"), []byte("value")) if err != nil { log.Fatal(err) } fmt.Println("Key-value set successfully") }
Debug
Known issues
breakingThe v2 API is significantly different from v1; migration requires code changes.
fix
Refer to the migration guide at https://github.com/tikv/client-go#migration-from-v1-to-v2.
affects: >=2.0.0
Upgrade
Version history
2.0.7latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
22
OpenAI (training)
3
Meta
2
Resources
tikv-client-go-v2 — go get tikv-client-go-v2 · libregistry