Documentation
¶
Index ¶
- Constants
- func EvmAddressHookFunc() mapstructure.DecodeHookFuncType
- type Database
- type Discovery
- type File
- type Maintainer
- type Module
- type Node
- type OpenTelemetryConfig
- type OpenTelemetryMetricsConfig
- type OpenTelemetryTracesConfig
- type Parameters
- type Redis
- type RedisTLS
- type Server
- type Stream
- type Telemetry
Constants ¶
View Source
const ( EnvPrefix = "NODE" Environment = "environment" EnvironmentDevelopment = "development" EnvironmentProduction = "production" EnvironmentPyroscopeEndpoint = EnvPrefix + "_PYROSCOPE_ENDPOINT" )
Variables ¶
This section is empty.
Functions ¶
func EvmAddressHookFunc ¶
func EvmAddressHookFunc() mapstructure.DecodeHookFuncType
Types ¶
type Discovery ¶
type Discovery struct {
Maintainer *Maintainer `mapstructure:"maintainer"`
Server *Server `mapstructure:"server"`
}
type File ¶
type File struct {
Environment string `mapstructure:"environment" validate:"required" default:"development"`
Discovery *Discovery `mapstructure:"discovery" validate:"required"`
Node *Node `mapstructure:"component" validate:"required"`
Database *Database `mapstructure:"database" validate:"required"`
Stream *Stream `mapstructure:"stream" validate:"required"`
Redis *Redis `mapstructure:"redis" validate:"required"`
Observability *Telemetry `mapstructure:"observability" validate:"required"`
}
type Maintainer ¶
type Module ¶
type Module struct {
Network network.Network `mapstructure:"network" validate:"required"`
Endpoint string `mapstructure:"endpoint" validate:"required"`
IPFSGateways []string `mapstructure:"ipfs_gateways"`
Worker worker.Worker `mapstructure:"worker"`
Parameters *Parameters `mapstructure:"parameters"`
}
type OpenTelemetryConfig ¶
type OpenTelemetryConfig struct {
Metrics *OpenTelemetryMetricsConfig `mapstructure:"metrics" validate:"required"`
Traces *OpenTelemetryTracesConfig `mapstructure:"traces" validate:"required"`
}
type Parameters ¶ added in v0.4.13
func (*Parameters) Decode ¶ added in v0.4.13
func (p *Parameters) Decode(v interface{}) error
func (*Parameters) String ¶ added in v0.4.13
func (p *Parameters) String() string
type Redis ¶ added in v0.3.11
type Redis struct {
Enable *bool `mapstructure:"enable" validate:"required" default:"false"`
Endpoints []string `mapstructure:"endpoints" default:"['localhost:6379']" validate:"required"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
DisableCache bool `mapstructure:"disable_cache" default:"true"`
TLS RedisTLS `mapstructure:"tls"`
}
type Stream ¶
type Stream struct {
Enable *bool `mapstructure:"enable" validate:"required" default:"false"`
Driver stream.Driver `mapstructure:"driver" validate:"required" default:"kafka"`
Topic string `mapstructure:"topic" validate:"required" default:"rss3.node.activities"`
URI string `mapstructure:"uri" validate:"required" default:"localhost:9092"`
}
type Telemetry ¶
type Telemetry struct {
OpenTelemetry *OpenTelemetryConfig `mapstructure:"opentelemetry" validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.