Documentation ¶
Overview ¶
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
Constants ¶
const ( // ModeSingle run as a single server ModeSingle = "single" // ModeCluster run as a cluster peer ModeCluster = "cluster" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Mode string `yaml:"mode"` Node string `yaml:"node"` Cluster string `yaml:"cluster"` DataDir string `yaml:"dataDir"` Listener Listener `yaml:"listener"` Join Join `yaml:"join"` Task Task `yaml:"task"` Registry Registry `yaml:"registry"` TLSConfigs []*TLSConfig `yaml:"tlsConfigs"` }
Config is the configuration that can be set for Syncer. Some of these configurations are exposed as command-line flags.
func LoadConfig ¶
LoadConfig loads configuration from file
func (*Config) GetTLSConfig ¶
type Join ¶
type Join struct { Enabled bool `yaml:"enabled"` Address string `yaml:"address"` RetryMax int `yaml:"retryMax"` RetryInterval string `yaml:"retryInterval"` }
Join Configuration for Syncer join the network
type Listener ¶
type Listener struct { BindAddr string `yaml:"bindAddr"` AdvertiseAddr string `yaml:"advertiseAddr"` RPCAddr string `yaml:"rpcAddr"` PeerAddr string `yaml:"peerAddr"` TLSMount Mount `yaml:"tlsMount"` }
Listener Configuration for Syncer listener
type Registry ¶
type Registry struct { // Address is the service registry address. Address string `json:"address"` Plugin string `yaml:"plugin"` TLSMount Mount `yaml:"tlsMount"` }
Registry configuration
type TLSConfig ¶
type TLSConfig struct { Name string `yaml:"name"` VerifyPeer bool `yaml:"verifyPeer"` MinVersion string `yaml:"minVersion"` Passphrase string `yaml:"passphrase"` CAFile string `yaml:"caFile"` CertFile string `yaml:"certFile"` KeyFile string `yaml:"keyFile"` Ciphers []string `yaml:"ciphers"` }
TLSConfig tls configuration