Documentation
¶
Index ¶
- type Config
- type ConfigOptionFunc
- func WithBadgerCacheSize(cacheSize int64) ConfigOptionFunc
- func WithCardanoNodeConfig(cardanoNodeConfig *cardano.CardanoNodeConfig) ConfigOptionFunc
- func WithDatabasePath(dataDir string) ConfigOptionFunc
- func WithIntersectPoints(points []ocommon.Point) ConfigOptionFunc
- func WithIntersectTip(intersectTip bool) ConfigOptionFunc
- func WithListeners(listeners ...ListenerConfig) ConfigOptionFunc
- func WithLogger(logger *slog.Logger) ConfigOptionFunc
- func WithMempoolCapacity(capacity int64) ConfigOptionFunc
- func WithNetwork(network string) ConfigOptionFunc
- func WithNetworkMagic(networkMagic uint32) ConfigOptionFunc
- func WithOutboundSourcePort(port uint) ConfigOptionFunc
- func WithPeerSharing(peerSharing bool) ConfigOptionFunc
- func WithPrometheusRegistry(registry prometheus.Registerer) ConfigOptionFunc
- func WithTopologyConfig(topologyConfig *topology.TopologyConfig) ConfigOptionFunc
- func WithTracing(tracing bool) ConfigOptionFunc
- func WithTracingStdout(stdout bool) ConfigOptionFunc
- func WithUtxorpcPort(port uint) ConfigOptionFunc
- func WithUtxorpcTlsCertFilePath(path string) ConfigOptionFunc
- func WithUtxorpcTlsKeyFilePath(path string) ConfigOptionFunc
- type ListenerConfig
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig(opts ...ConfigOptionFunc) Config
NewConfig creates a new dingo config with the specified options
type ConfigOptionFunc ¶
type ConfigOptionFunc func(*Config)
ConfigOptionFunc is a type that represents functions that modify the Connection config
func WithBadgerCacheSize ¶ added in v0.12.0
func WithBadgerCacheSize(cacheSize int64) ConfigOptionFunc
WithBadgerCacheSize sets the maximum cache size (in bytes).This controls memory usage by limiting the size of block and index caches. If not set, the default size defined in internal config will be used.
func WithCardanoNodeConfig ¶
func WithCardanoNodeConfig( cardanoNodeConfig *cardano.CardanoNodeConfig, ) ConfigOptionFunc
WithCardanoNodeConfig specifies the CardanoNodeConfig object to use. This is mostly used for loading genesis config files referenced by the dingo config
func WithDatabasePath ¶
func WithDatabasePath(dataDir string) ConfigOptionFunc
WithDatabasePath specifies the persistent data directory to use. The default is to store everything in memory
func WithIntersectPoints ¶
func WithIntersectPoints(points []ocommon.Point) ConfigOptionFunc
WithIntersectPoints specifies intersect point(s) for the initial chainsync. The default is to start at chain genesis
func WithIntersectTip ¶
func WithIntersectTip(intersectTip bool) ConfigOptionFunc
WithIntersectTip specifies whether to start the initial chainsync at the current tip. The default is to start at chain genesis
func WithListeners ¶
func WithListeners(listeners ...ListenerConfig) ConfigOptionFunc
WithListeners specifies the listener config(s) to use
func WithLogger ¶
func WithLogger(logger *slog.Logger) ConfigOptionFunc
WithLogger specifies the logger to use. This defaults to discarding log output
func WithMempoolCapacity ¶ added in v0.13.0
func WithMempoolCapacity(capacity int64) ConfigOptionFunc
WithMempoolCapacity sets the mempool capacity (in bytes)
func WithNetwork ¶
func WithNetwork(network string) ConfigOptionFunc
WithNetwork specifies the named network to operate on. This will automatically set the appropriate network magic value
func WithNetworkMagic ¶
func WithNetworkMagic(networkMagic uint32) ConfigOptionFunc
WithNetworkMagic specifies the network magic value to use. This will override any named network specified
func WithOutboundSourcePort ¶
func WithOutboundSourcePort(port uint) ConfigOptionFunc
WithOutboundSourcePort specifies the source port to use for outbound connections. This defaults to dynamic source ports
func WithPeerSharing ¶
func WithPeerSharing(peerSharing bool) ConfigOptionFunc
WithPeerSharing specifies whether to enable peer sharing. This is disabled by default
func WithPrometheusRegistry ¶
func WithPrometheusRegistry(registry prometheus.Registerer) ConfigOptionFunc
WithPrometheusRegistry specifies a prometheus.Registerer instance to add metrics to. In most cases, prometheus.DefaultRegistry would be a good choice to get metrics working
func WithTopologyConfig ¶
func WithTopologyConfig( topologyConfig *topology.TopologyConfig, ) ConfigOptionFunc
WithTopologyConfig specifies a topology.TopologyConfig to use for outbound peers
func WithTracing ¶
func WithTracing(tracing bool) ConfigOptionFunc
WithTracing enables tracing. By default, spans are submitted to a HTTP(s) endpoint using OTLP. This can be configured using the OTEL_EXPORTER_OTLP_* env vars documented in the README for go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
func WithTracingStdout ¶
func WithTracingStdout(stdout bool) ConfigOptionFunc
WithTracingStdout enables tracing output to stdout. This also requires tracing to enabled separately. This is mostly useful for debugging
func WithUtxorpcPort ¶ added in v0.2.2
func WithUtxorpcPort(port uint) ConfigOptionFunc
WithUtxorpcPort specifies the port to use for the gRPC API listener. This defaults to port 9090
func WithUtxorpcTlsCertFilePath ¶ added in v0.3.2
func WithUtxorpcTlsCertFilePath(path string) ConfigOptionFunc
WithUtxorpcTlsCertFilePath specifies the path to the TLS certificate for the gRPC API listener. This defaults to empty
func WithUtxorpcTlsKeyFilePath ¶ added in v0.3.2
func WithUtxorpcTlsKeyFilePath(path string) ConfigOptionFunc
WithUtxorpcTlsKeyFilePath specifies the path to the TLS key for the gRPC API listener. This defaults to empty
type ListenerConfig ¶
type ListenerConfig = connmanager.ListenerConfig