Documentation
¶
Index ¶
- Constants
- func CalculateWorkerCount(config *File) int
- func EvmAddressHookFunc() mapstructure.DecodeHookFuncType
- func HasOneWorker(config *File) error
- func IsRSSOrAIComponentOnly(config *File) bool
- type Component
- type Database
- type Discovery
- type Endpoint
- type File
- type Module
- type OpenTelemetryConfig
- type OpenTelemetryMetricsConfig
- type OpenTelemetryTracesConfig
- type Operator
- 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 CalculateWorkerCount ¶
CalculateWorkerCount returns the number of workers deployed
func EvmAddressHookFunc ¶
func EvmAddressHookFunc() mapstructure.DecodeHookFuncType
func HasOneWorker ¶
HasOneWorker Check if there is at least one worker deployed
func IsRSSOrAIComponentOnly ¶
IsRSSOrAIComponentOnly Check if the configuration contains an RSS or AI component only
Types ¶
type Endpoint ¶
type Endpoint struct { URL string `mapstructure:"url"` HTTPHeaders map[string]string `mapstructure:"http_headers"` HTTP2Disabled bool `mapstructure:"http2_disabled"` }
func (Endpoint) BuildEthereumOptions ¶
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"` 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"` Redis *Redis `mapstructure:"redis"` Observability *Telemetry `mapstructure:"observability"` }
func (*File) LoadModulesEndpoint ¶
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 Module ¶
type Module struct { ID string `mapstructure:"id"` Network network.Network `mapstructure:"network"` EndpointID string `mapstructure:"endpoint"` 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 ¶
func (*Parameters) Decode ¶
func (p *Parameters) Decode(v interface{}) error
func (*Parameters) String ¶
func (p *Parameters) String() string
type Telemetry ¶
type Telemetry struct {
OpenTelemetry *OpenTelemetryConfig `mapstructure:"opentelemetry" validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.