github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/pingcap/go-themis/README.md (about)

     1  # go-themis
     2  [![Build Status](https://travis-ci.org/pingcap/go-themis.svg?branch=master)](https://travis-ci.org/pingcap/go-themis)
     3  
     4  go-themis is a Go client for [pingcap/themis](https://github.com/pingcap/themis).
     5  
     6  Themis provides cross-row/cross-table transaction on HBase based on [google's Percolator](http://research.google.com/pubs/pub36726.html).
     7  
     8  go-themis is depends on [pingcap/go-hbase](https://github.com/pingcap/go-hbase).
     9  
    10  Install:
    11  
    12  ```
    13  go get -u github.com/pingcap/go-themis
    14  ```
    15  
    16  Example:
    17  
    18  ```
    19  tx := themis.NewTxn(c, oracles.NewLocalOracle())
    20  put := hbase.NewPut([]byte("Row1"))
    21  put.AddValue([]byte("cf"), []byte("q"), []byte("value"))
    22  
    23  put2 := hbase.NewPut([]byte("Row2"))
    24  put2.AddValue([]byte("cf"), []byte("q"), []byte("value"))
    25  
    26  tx.Put(tblName, put)
    27  tx.Put(tblName, put2)
    28  
    29  tx.Commit()
    30  ```