go-zero/core/discov/accountregistry.go

15 lines
540 B
Go
Raw Permalink Normal View History

package discov
import "github.com/zeromicro/go-zero/core/discov/internal"
2021-12-30 17:44:15 +08:00
// RegisterAccount registers the username/password to the given etcd cluster.
func RegisterAccount(endpoints []string, user, pass string) {
internal.AddAccount(endpoints, user, pass)
}
// RegisterTLS registers the CertFile/CertKeyFile/CACertFile to the given etcd.
func RegisterTLS(endpoints []string, certFile, certKeyFile, caFile string,
insecureSkipVerify bool) error {
return internal.AddTLS(endpoints, certFile, certKeyFile, caFile, insecureSkipVerify)
}