Documentation ¶
Index ¶
Constants ¶
View Source
const ( MinPeers = 1 MaxPeers = 250 MinMonikerLength = 4 MaxMonikerLength = 32 MinIntervalSetSessions = 10 * time.Second MaxIntervalSetSessions = 10 * time.Minute MinIntervalUpdateSessions = (2 * time.Hour) / 2 MaxIntervalUpdateSessions = (2 * time.Hour) - (5 * time.Minute) MinIntervalUpdateStatus = (1 * time.Hour) / 2 MaxIntervalUpdateStatus = (1 * time.Hour) - (5 * time.Minute) )
View Source
const ( ConfigFileName = "config.toml" DatabaseFileName = "data.db" IPv4CIDR = "10.8.0.2/24" IPv6CIDR = "fd86:ea04:1115::2/120" KeyringName = "sentinel" )
View Source
const (
FlagForce = "force"
)
Variables ¶
View Source
var ( DefaultHomeDirectory = func() string { home, err := os.UserHomeDir() if err != nil { panic(err) } return filepath.Join(home, ".sentinelnode") }() )
View Source
var ( ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, authvesting.AppModuleBasic{}, authzmodule.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModule{}, crisis.AppModuleBasic{}, distribution.AppModuleBasic{}, evidence.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, genutil.AppModuleBasic{}, gov.NewAppModuleBasic( distributionclient.ProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, paramsclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, ), ibc.AppModuleBasic{}, ibcica.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, mint.AppModuleBasic{}, params.AppModuleBasic{}, slashing.AppModuleBasic{}, staking.AppModuleBasic{}, upgrade.AppModuleBasic{}, custommint.AppModule{}, swap.AppModuleBasic{}, vpn.AppModuleBasic{}, ) )
Functions ¶
func MakeEncodingConfig ¶ added in v0.4.1
func MakeEncodingConfig() hubparams.EncodingConfig
Types ¶
type ChainConfig ¶
type ChainConfig struct { GasAdjustment float64 `json:"gas_adjustment" mapstructure:"gas_adjustment"` GasPrices string `json:"gas_prices" mapstructure:"gas_prices"` Gas uint64 `json:"gas" mapstructure:"gas"` ID string `json:"id" mapstructure:"id"` RPCAddress string `json:"rpc_address" mapstructure:"rpc_address"` SimulateAndExecute bool `json:"simulate_and_execute" mapstructure:"simulate_and_execute"` }
func NewChainConfig ¶
func NewChainConfig() *ChainConfig
func (*ChainConfig) Validate ¶
func (c *ChainConfig) Validate() error
func (*ChainConfig) WithDefaultValues ¶
func (c *ChainConfig) WithDefaultValues() *ChainConfig
type Config ¶
type Config struct { Chain *ChainConfig `json:"chain" mapstructure:"chain"` Handshake *HandshakeConfig `json:"handshake" mapstructure:"handshake"` Keyring *KeyringConfig `json:"keyring" mapstructure:"keyring"` Node *NodeConfig `json:"node" mapstructure:"node"` QOS *QOSConfig `json:"qos" mapstructure:"qos"` }
func (*Config) SaveToPath ¶
func (*Config) WithDefaultValues ¶
type GeoIPLocation ¶
type HandshakeConfig ¶
type HandshakeConfig struct { Enable bool `json:"enable" mapstructure:"enable"` Peers uint64 `json:"peers" mapstructure:"peers"` }
func NewHandshakeConfig ¶
func NewHandshakeConfig() *HandshakeConfig
func (*HandshakeConfig) Validate ¶
func (c *HandshakeConfig) Validate() error
func (*HandshakeConfig) WithDefaultValues ¶
func (c *HandshakeConfig) WithDefaultValues() *HandshakeConfig
type KeyringConfig ¶
type KeyringConfig struct { Backend string `json:"backend" mapstructure:"backend"` From string `json:"from" mapstructure:"from"` }
func NewKeyringConfig ¶
func NewKeyringConfig() *KeyringConfig
func (*KeyringConfig) Validate ¶
func (c *KeyringConfig) Validate() error
func (*KeyringConfig) WithDefaultValues ¶
func (c *KeyringConfig) WithDefaultValues() *KeyringConfig
type NodeConfig ¶
type NodeConfig struct { IntervalSetSessions time.Duration `json:"interval_set_sessions" mapstructure:"interval_set_sessions"` IntervalUpdateSessions time.Duration `json:"interval_update_sessions" mapstructure:"interval_update_sessions"` IntervalUpdateStatus time.Duration `json:"interval_update_status" mapstructure:"interval_update_status"` ListenOn string `json:"listen_on" mapstructure:"listen_on"` Moniker string `json:"moniker" mapstructure:"moniker"` Price string `json:"price" mapstructure:"price"` Provider string `json:"provider" mapstructure:"provider"` RemoteURL string `json:"remote_url" mapstructure:"remote_url"` Type string `json:"type" mapstructure:"type"` }
func NewNodeConfig ¶
func NewNodeConfig() *NodeConfig
func (*NodeConfig) Validate ¶
func (c *NodeConfig) Validate() error
func (*NodeConfig) WithDefaultValues ¶
func (c *NodeConfig) WithDefaultValues() *NodeConfig
type QOSConfig ¶ added in v0.2.1
type QOSConfig struct {
MaxPeers int `json:"max_peers" mapstructure:"max_peers"`
}
func NewQOSConfig ¶ added in v0.2.1
func NewQOSConfig() *QOSConfig
func (*QOSConfig) WithDefaultValues ¶ added in v0.2.1
type Response ¶
type Response struct { Success bool `json:"success"` Error interface{} `json:"error,omitempty"` Result interface{} `json:"result,omitempty"` }
func NewResponse ¶ added in v0.5.0
func NewResponse(err interface{}, res interface{}) *Response
func NewResponseError ¶ added in v0.5.0
func NewResponseResult ¶ added in v0.5.0
func NewResponseResult(v interface{}) *Response
type Session ¶
type Session struct { *gorm.Model ID uint64 `gorm:"primaryKey;uniqueIndex:idx_sessions_id"` Subscription uint64 `gorm:"index:idx_sessions_subscription_for_address"` Key string `gorm:"uniqueIndex:idx_sessions_key"` Address string `gorm:"index:idx_sessions_address;index:idx_sessions_subscription_for_address"` Available int64 Download int64 Upload int64 }
func (*Session) GetAddress ¶ added in v0.2.0
func (s *Session) GetAddress() sdk.AccAddress
Source Files ¶
Click to show internal directories.
Click to hide internal directories.