Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 572 Bytes

README.md

File metadata and controls

27 lines (18 loc) · 572 Bytes

pegasus-go-client

This is the official go client for xiaomi/pegasus.

Requirement

Go1.8+

Example

    import (
        "context"
        
    	"github.com/XiaoMi/pegasus-go-client/pegasus"
    )
    
    cfg := Config{
        MetaServers: []string{"0.0.0.0:34601", "0.0.0.0:34602", "0.0.0.0:34603"},
    }
    
    client := NewClient(cfg)
    defer client.Close()
    
    tb, err := client.OpenTable(context.Background(), "temp")
    err = tb.Set(context.Background(), []byte("h1"), []byte("s1"), []byte("v1"))