client.go 397 B

1234567891011121314151617
  1. package client
  2. import "git.wecise.com/wecise/odb-go/odb"
  3. func getClient() (c odb.Client, err error) {
  4. client, err := odb.NewClient(&odb.Config{
  5. // Hosts: []string{"47.92.151.165:11001"},
  6. Hosts: []string{"127.0.0.1:11001"},
  7. Keyspace: "oktest",
  8. // User: "这个客户端是用来测试的",
  9. // Pass: "********",
  10. })
  11. if err != nil {
  12. return nil, err
  13. }
  14. return client, nil
  15. }