Documentation
¶
Index ¶
- Constants
- Variables
- func ConstructModule(tp node.Type, cfg *Config, options ...fx.Option) fx.Option
- func Flags() *flag.FlagSet
- func ParseFlags(cmd *cobra.Command, cfg *Config) error
- func WithConnection(conn *grpc.ClientConn) fx.Option
- func WithHeaderConstructFn(construct header.ConstructFn) fx.Option
- type AdditionalCoreConns
- type Config
- type EndpointConfig
Constants ¶
View Source
const (
DefaultPort = "9090"
)
Variables ¶
View Source
var MetricsEnabled bool
Functions ¶
func ConstructModule ¶
ConstructModule collects all the components and services related to managing the relationship with the Core node.
func ParseFlags ¶
ParseFlags parses Core flags from the given cmd and saves them to the passed config.
func WithConnection ¶ added in v0.21.5
func WithConnection(conn *grpc.ClientConn) fx.Option
WithConnection sets a custom client for core process
func WithHeaderConstructFn ¶
func WithHeaderConstructFn(construct header.ConstructFn) fx.Option
WithHeaderConstructFn sets custom func that creates extended header
Types ¶
type AdditionalCoreConns ¶ added in v0.25.3
type AdditionalCoreConns []*grpc.ClientConn
type Config ¶
type Config struct {
EndpointConfig
// AdditionalCoreEndpoints is a list of additional Celestia-Core endpoints to be used for
// transaction submission. Must be provided as `host:port` pairs.
AdditionalCoreEndpoints []EndpointConfig
}
Config combines all configuration fields for managing the relationship with a Core node.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns default configuration for managing the node's connection to a Celestia-Core endpoint.
func (*Config) IsEndpointConfigured ¶ added in v0.11.0
IsEndpointConfigured returns whether a core endpoint has been set on the config (true if set).
type EndpointConfig ¶ added in v0.25.3
type EndpointConfig struct {
IP string
Port string
// TLSEnabled specifies whether the connection is secure.
// Must be set to true if XTokenPath is provided.
TLSEnabled bool
// XTokenPath specifies the path to the directory that contains a JSON file with the X-Token for gRPC authentication.
// The JSON file can be named either "xtoken.json" or "x-token.json".
// The JSON file must contain a key "x-token" (preferred) or "xtoken" with the authentication token.
// If left empty, the client will not include the X-Token in its requests.
XTokenPath string
}
Click to show internal directories.
Click to hide internal directories.