options.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package etcd
  15. import "crypto/tls"
  16. type SEtcdOptions struct {
  17. EtcdEndpoint []string `help:"etcd endpoints in format of addr:port"`
  18. EtcdTimeoutSeconds int `default:"5" help:"etcd dial timeout in seconds"`
  19. EtcdRequestTimeoutSeconds int `default:"2" help:"etcd request timeout in seconds"`
  20. EtcdLeaseExpireSeconds int `default:"5" help:"etcd expire timeout in seconds"`
  21. EtcdNamspace string `help:"etcd namespace"`
  22. EtcdUsername string `help:"etcd username"`
  23. EtcdPassword string `help:"etcd password"`
  24. EtcdEnabldSsl bool `help:"enable SSL/TLS"`
  25. EtcdSslCertfile string `help:"ssl certification file"`
  26. EtcdSslKeyfile string `help:"ssl certification private key file"`
  27. EtcdSslCaCertfile string `help:"ssl ca certification file"`
  28. TLSConfig *tls.Config `help:"tls config"`
  29. }