accountregistry.go 548 B

1234567891011121314
  1. package discov
  2. import "github.com/wuntsong-org/go-zero-plus/core/discov/internal"
  3. // RegisterAccount registers the username/password to the given etcd cluster.
  4. func RegisterAccount(endpoints []string, user, pass string) {
  5. internal.AddAccount(endpoints, user, pass)
  6. }
  7. // RegisterTLS registers the CertFile/CertKeyFile/CACertFile to the given etcd.
  8. func RegisterTLS(endpoints []string, certFile, certKeyFile, caFile string,
  9. insecureSkipVerify bool) error {
  10. return internal.AddTLS(endpoints, certFile, certKeyFile, caFile, insecureSkipVerify)
  11. }