Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterOptions ¶ added in v1.4.0
type ClusterOptions struct { // Primary members define following URLs to form a cluster. ListenPeerURLs []string `yaml:"listen-peer-urls"` ListenClientURLs []string `yaml:"listen-client-urls"` AdvertiseClientURLs []string `yaml:"advertise-client-urls"` InitialAdvertisePeerURLs []string `yaml:"initial-advertise-peer-urls"` InitialCluster map[string]string `yaml:"initial-cluster"` StateFlag string `yaml:"state-flag"` // Secondary members define URLs to connect to cluster formed by primary members. PrimaryListenPeerURLs []string `yaml:"primary-listen-peer-urls"` MaxCallSendMsgSize int `yaml:"max-call-send-msg-size"` }
ClusterOptions defines the cluster members.
type Options ¶
type Options struct { // Flags from command line only. ShowVersion bool `yaml:"-"` ShowHelp bool `yaml:"-"` ShowConfig bool `yaml:"-"` ConfigFile string `yaml:"-"` ForceNewCluster bool `yaml:"-"` SignalUpgrade bool `yaml:"-"` // meta Name string `yaml:"name" env:"EG_NAME"` Labels map[string]string `yaml:"labels" env:"EG_LABELS"` APIAddr string `yaml:"api-addr"` Debug bool `yaml:"debug"` DisableAccessLog bool `yaml:"disable-access-log"` InitialObjectConfigFiles []string `yaml:"initial-object-config-files"` // cluster options UseStandaloneEtcd bool `yaml:"use-standalone-etcd"` ClusterName string `yaml:"cluster-name"` ClusterRole string `yaml:"cluster-role"` ClusterRequestTimeout string `yaml:"cluster-request-timeout"` Cluster ClusterOptions `yaml:"cluster"` // Deprecated. Use ClusterOptions instead. ClusterListenClientURLs []string `yaml:"cluster-listen-client-urls"` ClusterListenPeerURLs []string `yaml:"cluster-listen-peer-urls"` ClusterAdvertiseClientURLs []string `yaml:"cluster-advertise-client-urls"` ClusterInitialAdvertisePeerURLs []string `yaml:"cluster-initial-advertise-peer-urls"` ClusterJoinURLs []string `yaml:"cluster-join-urls"` // Path. HomeDir string `yaml:"home-dir"` DataDir string `yaml:"data-dir"` WALDir string `yaml:"wal-dir"` LogDir string `yaml:"log-dir"` MemberDir string `yaml:"member-dir"` // Profile. CPUProfileFile string `yaml:"cpu-profile-file"` MemoryProfileFile string `yaml:"memory-profile-file"` // Status StatusUpdateMaxBatchSize int `yaml:"status-update-max-batch-size"` // Prepare the items below in advance. AbsHomeDir string `yaml:"-"` AbsDataDir string `yaml:"-"` AbsWALDir string `yaml:"-"` AbsLogDir string `yaml:"-"` AbsMemberDir string `yaml:"-"` // contains filtered or unexported fields }
Options is the start-up options.
func (*Options) GetFirstAdvertiseClientURL ¶ added in v1.4.0
GetFirstAdvertiseClientURL returns the first advertised client url.
func (*Options) GetPeerURLs ¶ added in v1.4.0
GetPeerURLs returns URLs listed in cluster.initial-cluster for primary (a.k.a writer) and for secondary (a.k.a reader) the ones listed in cluster.primary-listen-peer-url.
func (*Options) InitialClusterToString ¶ added in v1.4.0
InitialClusterToString returns initial clusters string representation.
func (*Options) Parse ¶
Parse parses all arguments, returns normal message without error if --help/--version set.
func (*Options) UseInitialCluster ¶ added in v1.4.0
UseInitialCluster returns true if the cluster.initial-cluster is defined. If it is, the ClusterJoinUrls is ignored.
Click to show internal directories.
Click to hide internal directories.