Documentation ¶
Index ¶
- Constants
- func EvmAddressHookFunc() mapstructure.DecodeHookFuncType
- type Component
- type Database
- type Discovery
- type Endpoint
- type File
- type Maintainer
- type Module
- 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 Endpoint ¶ added in v0.4.20
type Endpoint struct { URL string `mapstructure:"url"` HTTPHeaders map[string]string `mapstructure:"http_headers"` HTTP2Disabled bool `mapstructure:"http2_disabled"` }
func (Endpoint) BuildEthereumOptions ¶ added in v0.4.20
BuildEthereumOptions builds the custom options to be supplied to an ethereum client.
type File ¶
type File struct { Environment string `mapstructure:"environment" validate:"required" default:"development"` Type string `mapstructure:"type" validate:"required,oneof=alpha beta" default:"beta"` Endpoints map[string]Endpoint `mapstructure:"endpoints"` Discovery *Discovery `mapstructure:"discovery" validate:"required"` Component *Component `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"` }
func (*File) LoadModulesEndpoint ¶ added in v0.4.20
LoadModulesEndpoint loads the endpoint url and headers for each module. If the endpoint id is not found in the endpoints list, it will use the endpoint id as the url.
type Maintainer ¶
type Module ¶
type Module struct { ID string `mapstructure:"id"` Network network.Network `mapstructure:"network" validate:"required"` EndpointID string `mapstructure:"endpoint" validate:"required"` IPFSGateways []string `mapstructure:"ipfs_gateways"` Worker worker.Worker `mapstructure:"worker"` Parameters *Parameters `mapstructure:"parameters"` Endpoint Endpoint `mapstructure:"-"` }
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 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.