config

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.22.0

type Config struct {
	// Host
	Role                 device.Role
	LogLevel             string
	Libp2pMdnsDisabled   bool
	Libp2pBootstrapPeers []peer.AddrInfo
	Libp2pLowWater       int
	Libp2pHighWater      int
	Libp2pGracePeriod    time.Duration
	Libp2pRendezvous     string
	Libp2pInterval       time.Duration
	Libp2pTTL            dscl.Option

	// Highway Config
	HighwayGRPCNetwork  string
	HighwayGRPCEndpoint string
	HighwayHTTPEndpoint string

	// WebAuthn
	WebAuthNRPDisplayName string
	WebAuthNRPID          string
	WebAuthNRPOrigin      string
	WebAuthNRPIcon        string
	WebAuthNDebug         bool

	// Cosmos SDK
	CosmosAccountName        string
	CosmosAddressPrefix      string
	CosmosNodeAddress        string
	CosmosUseFaucet          bool
	CosmosFaucetAddress      string
	CosmosFaucetDenom        string
	CosmosFaucetMinAmount    uint64
	CosmosHomePath           string
	CosmosKeyringBackend     cosmosaccount.KeyringBackend
	CosmosKeyringServiceName string
}

Config is the configuration for the entire Highway node

func DefaultConfig added in v0.22.0

func DefaultConfig() *Config

DefaultConfig returns the default configuration for the Highway node

func (*Config) CosmosOptions added in v0.23.0

func (c *Config) CosmosOptions() []cosmosclient.Option

CosmosOptions returns the cosmos options for the highway node

func (*Config) WebauthnConfig added in v0.22.0

func (c *Config) WebauthnConfig() *webauthn.Config

WebauthnConfig returns the configuration for the WebAuthn module

type LogLevel added in v0.22.0

type LogLevel string

LogLevel is the type for the log level

const (
	// DebugLevel is the debug log level
	DebugLevel LogLevel = "debug"
	// InfoLevel is the info log level
	InfoLevel LogLevel = "info"
	// WarnLevel is the warn log level
	WarnLevel LogLevel = "warn"
	// ErrorLevel is the error log level
	ErrorLevel LogLevel = "error"
	// FatalLevel is the fatal log level
	FatalLevel LogLevel = "fatal"
)

type Option added in v0.22.0

type Option func(*Config)

Option configures your client.

func WithCosmosAccountSettings added in v0.23.0

func WithCosmosAccountSettings(accountName string, addrPrefix string, homeDir string, keyringServiceName string, keyringBackend cosmosaccount.KeyringBackend) Option

func WithCosmosNodeAddress added in v0.23.0

func WithCosmosNodeAddress(addr string) Option

WithCosmosNodeAddress sets the node address of your chain. When this option is not provided `http://localhost:26657` is used as default.

func WithHighwayAPISettings added in v0.23.0

func WithHighwayAPISettings(network string, grpcHost string, grpcPort int, httpPort int) Option

WithHighwayAPISettings sets the host address for the Node Stub Client Host

func WithLibp2pConnOptions added in v0.23.0

func WithLibp2pConnOptions(low int, hi int, grace time.Duration) Option

WithLibp2pConnOptions sets the connection manager options. Defaults are (lowWater: 15, highWater: 40, gracePeriod: 5m)

func WithLibp2pMDNS added in v0.23.0

func WithLibp2pMDNS(isActive bool) Option

WithLibp2pMDNS sets the non-priority of MDNS Discovery

func WithLibp2pRendevouz added in v0.23.0

func WithLibp2pRendevouz(point string, ttl time.Duration, interval time.Duration) Option

WithLibp2pRendevouz sets the interval and timeout for the DHT rendezvous strategy

func WithUseFaucet added in v0.22.0

func WithUseFaucet(faucetAddress, denom string, minAmount uint64) Option

func WithWebAuthnConfig added in v0.23.0

func WithWebAuthnConfig(displayName string, rpId string, rpOrigin string, isDebug bool) Option

WithWebAuthnConfig sets the webauthn server Properties

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL