Documentation
¶
Overview ¶
Package cmd includes relayer commands Copyright © 2020 Jack Zampolin [email protected]
Licensed 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.
Package cmd includes relayer commands Copyright © 2020 Jack Zampolin [email protected]
Licensed 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.
Package cmd includes relayer commands Copyright © 2020 Jack Zampolin [email protected]
Licensed 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.
Package cmd includes relayer commands Copyright © 2020 Jack Zampolin <[email protected]>
Licensed 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
- Variables
- func Execute()
- func GetStrategyWithOptions(cmd *cobra.Command, strategy relayer.Strategy) (relayer.Strategy, error)
- func NewRootCmd() *cobra.Command
- func UpdateClientsFromChains(src, dst *relayer.Chain, thresholdTime time.Duration) (time.Duration, error)
- type Config
- func (c *Config) AddChain(chain *relayer.Chain) (err error)
- func (c *Config) AddPath(name string, path *relayer.Path) (err error)
- func (c *Config) ChainsFromPath(path string) (map[string]*relayer.Chain, string, string, error)
- func (c *Config) DeleteChain(chain string) *Config
- func (c Config) MustYAML() []byte
- func (c *Config) ValidateChannel(chain *relayer.Chain, height int64, pe *relayer.PathEnd) error
- func (c *Config) ValidateClient(chain *relayer.Chain, height int64, pe *relayer.PathEnd) error
- func (c *Config) ValidateConnection(chain *relayer.Chain, height int64, pe *relayer.PathEnd) error
- func (c *Config) ValidatePath(p *relayer.Path) (err error)
- func (c *Config) ValidatePathEnd(pe *relayer.PathEnd) error
- type GlobalConfig
Constants ¶
const ( // ORDERED is exported channel type constant ORDERED = "ORDERED" // UNORDERED is exported channel type constant UNORDERED = "UNORDERED" )
const (
MB = 1048576 // in bytes
)
MB is a megabyte
Variables ¶
var ( // Version defines the application version (defined at compile time) Version = "" // Commit defines the application commit hash (defined at compile time) Commit = "" // SDKCommit defines the CosmosSDK commit hash (defined at compile time) SDKCommit = "" )
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetStrategyWithOptions ¶ added in v0.6.0
func GetStrategyWithOptions(cmd *cobra.Command, strategy relayer.Strategy) (relayer.Strategy, error)
GetStrategyWithOptions sets strategy specific fields.
func NewRootCmd ¶ added in v0.8.0
NewRootCmd returns the root command for relayer.
Types ¶
type Config ¶
type Config struct { Global GlobalConfig `yaml:"global" json:"global"` Chains relayer.Chains `yaml:"chains" json:"chains"` Paths relayer.Paths `yaml:"paths" json:"paths"` }
Config represents the config file for the relayer
func (*Config) ChainsFromPath ¶ added in v0.6.0
ChainsFromPath takes the path name and returns the properly configured chains
func (*Config) DeleteChain ¶
DeleteChain removes a chain from the config
func (*Config) ValidateChannel ¶ added in v0.8.0
ValidateChannel validates channel id in provided pathend
func (*Config) ValidateClient ¶ added in v0.8.0
ValidateClient validates client id in provided pathend
func (*Config) ValidateConnection ¶ added in v0.8.0
ValidateConnection validates connection id in provided pathend
func (*Config) ValidatePath ¶ added in v0.8.0
ValidatePath checks that a path is valid
type GlobalConfig ¶
type GlobalConfig struct { APIListenPort string `yaml:"api-listen-addr" json:"api-listen-addr"` Timeout string `yaml:"timeout" json:"timeout"` LightCacheSize int `yaml:"light-cache-size" json:"light-cache-size"` }
GlobalConfig describes any global relayer settings