Documentation ¶
Index ¶
- Constants
- func PrepareBaseConfig(ctx context.Context, ...) (*commonConfig.BaseConfig, error)
- func PrepareVault(ctx context.Context, baseCfgSrv baseConfigService) (*commonVault.Service, error)
- type InternalApiConfig
- type MangerConfig
- func (c *MangerConfig) GetApplicationName() string
- func (c *MangerConfig) GetApplicationPID() int
- func (c *MangerConfig) GetBindPort() string
- func (c *MangerConfig) GetBuildDate() time.Time
- func (c *MangerConfig) GetBuildDateTS() int64
- func (c *MangerConfig) GetBuildNumber() uint64
- func (c *MangerConfig) GetCommitID() string
- func (c *MangerConfig) GetDefaultWalletSessionDelay() time.Duration
- func (c *MangerConfig) GetDefaultWalletUnloadInterval() time.Duration
- func (c *MangerConfig) GetEnvironmentName() string
- func (c *MangerConfig) GetEventChannelBufferSize() int
- func (c *MangerConfig) GetEventChannelName() string
- func (c *MangerConfig) GetEventChannelWorkersCount() int
- func (c *MangerConfig) GetHostName() string
- func (c *MangerConfig) GetInstanceIdentifier() uuid.UUID
- func (c *MangerConfig) GetReleaseTag() string
- func (c *MangerConfig) GetShortCommitID() string
- func (c *MangerConfig) GetStageName() string
- func (c *MangerConfig) GetVaultAppEncryptionKey() string
- func (c *MangerConfig) GetVaultCommonTransit() string
- func (c *MangerConfig) IsDebug() bool
- func (c *MangerConfig) IsDev() bool
- func (c *MangerConfig) IsLocal() bool
- func (c *MangerConfig) IsProd() bool
- func (c *MangerConfig) IsStage() bool
- func (c *MangerConfig) IsTest() bool
- func (c *MangerConfig) Prepare() error
- func (c *MangerConfig) PrepareWith(cfgSvcList ...interface{}) error
- func (c *MangerConfig) SetApplicationName(appName string)
- type ProcessionEnvironmentConfig
- type VaultWrappedConfig
Constants ¶
View Source
const ApplicationManagerNameTpl = "bc-wallet-%s-hdwallet-controller"
View Source
const ProcessingNetworkEnvName = "PROCESSING_NETWORK"
Variables ¶
This section is empty.
Functions ¶
func PrepareBaseConfig ¶
func PrepareBaseConfig(ctx context.Context, releaseTag, commitID, shortCommitID, buildNumber, buildDateTS, applicationName string, ) (*commonConfig.BaseConfig, error)
func PrepareVault ¶
func PrepareVault(ctx context.Context, baseCfgSrv baseConfigService) (*commonVault.Service, error)
Types ¶
type InternalApiConfig ¶
type InternalApiConfig struct { InternalApiSocketPath string `envconfig:"BC_WALLET_COMMON_HDWALLET_INTERNAL_API_SOCKET_PATH" default:"/tmp/hdwallet_unix.sock"` // contains filtered or unexported fields }
func (*InternalApiConfig) Prepare ¶
func (c *InternalApiConfig) Prepare() error
func (*InternalApiConfig) PrepareWith ¶
func (c *InternalApiConfig) PrepareWith(dependentCfgList ...interface{}) error
type MangerConfig ¶
type MangerConfig struct { // ------------------- // External common configs // ------------------- *commonConfig.BaseConfig *commonLogger.LoggerConfig *commonHealthcheck.HealthcheckHTTPConfig *VaultWrappedConfig *commonPostgres.PostgresConfig *commonNats.NatsConfig *commonRedis.RedisConfig *hdwallet.HdWalletClientConfig *ProcessionEnvironmentConfig // ------------------- // Internal configs // ------------------- EventChannelWorkersCount int `envconfig:"EVENT_CHANNEL_WORKERS_COUNT" default:"4"` EventChannelBufferSize int `envconfig:"EVENT_CHANNEL_BUFFER_SIZE" default:"12"` DefaultWalletSessionDelay time.Duration `envconfig:"DEFAULT_WALLET_SESSION_DELAY" default:"2s"` DefaultUnloadInterval time.Duration `envconfig:"DEFAULT_WALLET_UNLOAD_INTERVAL" default:"24s"` // VaultCommonTransitKey - common vault transit key for whole processing cluster VaultCommonTransitKey string `envconfig:"VAULT_COMMON_TRANSIT_KEY" default:"-"` // VaultApplicationEncryptionKey - vault encryption key for hd-wallet-controller and hd-wallet-api application VaultApplicationEncryptionKey string `envconfig:"VAULT_APP_ENCRYPTION_KEY" default:"-"` // GRPCBindRaw port string, default "8080" GRPCBindRaw string `envconfig:"API_GRPC_PORT" default:"8080"` // ---------------------------- // Calculated config parameters GRPCBind string InstanceUUID uuid.UUID EventChannelName string // contains filtered or unexported fields }
MangerConfig for application
func Prepare ¶
func Prepare(ctx context.Context, releaseTag, commitID, shortCommitID, buildNumber, buildDateTS string, ) (*MangerConfig, *commonVault.Service, error)
func (*MangerConfig) GetApplicationName ¶
func (c *MangerConfig) GetApplicationName() string
func (*MangerConfig) GetApplicationPID ¶
func (c *MangerConfig) GetApplicationPID() int
func (*MangerConfig) GetBindPort ¶
func (c *MangerConfig) GetBindPort() string
func (*MangerConfig) GetBuildDate ¶
func (c *MangerConfig) GetBuildDate() time.Time
func (*MangerConfig) GetBuildDateTS ¶
func (c *MangerConfig) GetBuildDateTS() int64
func (*MangerConfig) GetBuildNumber ¶
func (c *MangerConfig) GetBuildNumber() uint64
func (*MangerConfig) GetCommitID ¶
func (c *MangerConfig) GetCommitID() string
func (*MangerConfig) GetDefaultWalletSessionDelay ¶
func (c *MangerConfig) GetDefaultWalletSessionDelay() time.Duration
func (*MangerConfig) GetDefaultWalletUnloadInterval ¶
func (c *MangerConfig) GetDefaultWalletUnloadInterval() time.Duration
func (*MangerConfig) GetEnvironmentName ¶
func (c *MangerConfig) GetEnvironmentName() string
func (*MangerConfig) GetEventChannelBufferSize ¶
func (c *MangerConfig) GetEventChannelBufferSize() int
func (*MangerConfig) GetEventChannelName ¶
func (c *MangerConfig) GetEventChannelName() string
func (*MangerConfig) GetEventChannelWorkersCount ¶
func (c *MangerConfig) GetEventChannelWorkersCount() int
func (*MangerConfig) GetHostName ¶
func (c *MangerConfig) GetHostName() string
func (*MangerConfig) GetInstanceIdentifier ¶
func (c *MangerConfig) GetInstanceIdentifier() uuid.UUID
func (*MangerConfig) GetReleaseTag ¶
func (c *MangerConfig) GetReleaseTag() string
func (*MangerConfig) GetShortCommitID ¶
func (c *MangerConfig) GetShortCommitID() string
func (*MangerConfig) GetStageName ¶
func (c *MangerConfig) GetStageName() string
func (*MangerConfig) GetVaultAppEncryptionKey ¶
func (c *MangerConfig) GetVaultAppEncryptionKey() string
func (*MangerConfig) GetVaultCommonTransit ¶
func (c *MangerConfig) GetVaultCommonTransit() string
func (*MangerConfig) IsDebug ¶
func (c *MangerConfig) IsDebug() bool
func (*MangerConfig) IsDev ¶
func (c *MangerConfig) IsDev() bool
func (*MangerConfig) IsLocal ¶
func (c *MangerConfig) IsLocal() bool
func (*MangerConfig) IsProd ¶
func (c *MangerConfig) IsProd() bool
func (*MangerConfig) IsStage ¶
func (c *MangerConfig) IsStage() bool
func (*MangerConfig) IsTest ¶
func (c *MangerConfig) IsTest() bool
func (*MangerConfig) Prepare ¶
func (c *MangerConfig) Prepare() error
Prepare variables to static configuration
func (*MangerConfig) PrepareWith ¶
func (c *MangerConfig) PrepareWith(cfgSvcList ...interface{}) error
func (*MangerConfig) SetApplicationName ¶
func (c *MangerConfig) SetApplicationName(appName string)
type ProcessionEnvironmentConfig ¶
type ProcessionEnvironmentConfig struct { ProcessingProvider string `envconfig:"PROCESSING_PROVIDER" default:"cryptobundle"` ProcessingNetwork string `envconfig:"PROCESSING_NETWORK" default:"tron"` // contains filtered or unexported fields }
func (*ProcessionEnvironmentConfig) GetNetworkName ¶
func (c *ProcessionEnvironmentConfig) GetNetworkName() string
GetNetworkName is for getting event filter by processing network
func (*ProcessionEnvironmentConfig) GetProviderName ¶
func (c *ProcessionEnvironmentConfig) GetProviderName() string
GetProviderName is for getting event filter by processing provider
type VaultWrappedConfig ¶
type VaultWrappedConfig struct { *commonVault.BaseConfig *commonVaultTokenClient.AuthConfig }
Click to show internal directories.
Click to hide internal directories.