dingo

package module
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

README

Dingo

Dingo Logo
GitHub Go Report Card Go Reference Discord

Dingo

This is a work in progress and is currently under heavy development

dingo screenshot

Development / Building

This requires Go 1.22 or better is installed. You also need make.

# Build
make
# Run
./dingo

You can also run the code without building a binary, first

go run ./cmd/dingo/

Documentation

Index

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 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 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 int) 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

type ListenerConfig

type ListenerConfig = connmanager.ListenerConfig

type Node

type Node struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*Node, error)

func (*Node) Run

func (n *Node) Run() error

func (*Node) Stop

func (n *Node) Stop() error

Directories

Path Synopsis
cmd
config
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL