Closed zhuliquan closed 2 years ago
support krb5 and level log
package main import ( github.com/go-zookeeper/zk log "github.com/sirupsen/logrus" ) func main() { log.SetLevel(log.DebugLevel) zkConn, _, err := zk.Connect([]string{"localhost"}, time.Second*10, zk.WithSASL( &zk.SASLConfig{ SASLType: zk.KERBEROS, KRBConfig: &zk.KRBConfig{ KeytabPath: "./test.keytab", KrbCfgPath: "./test.config", Realm: "test.com", Username: "test", ServiceName: "zookeeper", }, }, )) if err != nil { panic(err) } if res, _, err := zkConn.Get("/test/test_krb5"); err != nil { t.Logf("get %s from zookeeper", res) } else { panic(err) } }
support krb5 and level log
usage