Documentation
¶
Overview ¶
Package gserver contains a Component type satisfying the Cosmos SDK server component interface.
Index ¶
- type Component
- func (c *Component) CLICommands() serverv2.CLIConfig
- func (c *Component) Init(app serverv2.AppI[transaction.Tx], cfg map[string]any, log cosmoslog.Logger) error
- func (c *Component) Name() string
- func (c *Component) Start(ctx context.Context) error
- func (c *Component) StartCmdFlags() *pflag.FlagSet
- func (c *Component) Stop(_ context.Context) error
- func (c *Component) WriteCustomConfigAt(configPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is a server component to be injected into the Cosmos SDK server module.
func NewComponent ¶
func NewComponent( rootCtx context.Context, log *slog.Logger, txc transaction.Codec[transaction.Tx], codec codec.Codec, ) (*Component, error)
NewComponent returns a new server component ready to be supplied to the Cosmos SDK server module.
It accepts a *slog.Logger directly to avoid dealing with SDK loggers.
func (*Component) CLICommands ¶
func (*Component) Init ¶
func (c *Component) Init(app serverv2.AppI[transaction.Tx], cfg map[string]any, log cosmoslog.Logger) error
Init is called early in the SDK server component lifecycle, before Start.
func (*Component) StartCmdFlags ¶
StartCmdFlags satisfies the optional serverv2.HasStartFlags interface, which adds the returned flagset to the flags for "$app start".
The configured values are then available in the config map passed to *Component.Init; the flag names are top level keys in the config map, with values corresponding to the command line flag values.
func (*Component) WriteCustomConfigAt ¶
WriteCustomConfigAt satisfies an undocumented interface, and here we emulate what Comet does in order to get past some error expecting this file to exist.
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
gp2papi
Package gp2papi manages the handlers for nodes that choose to serve public gcosmos (Gordian-Cosmos, not plain Cosmos) APIs over libp2p.
|
Package gp2papi manages the handlers for nodes that choose to serve public gcosmos (Gordian-Cosmos, not plain Cosmos) APIs over libp2p. |
gsbd
Package gsbd (short for "Gordian Server Block Data") provides utilities for hosting and retrieving block data out of band from the consensus engine.
|
Package gsbd (short for "Gordian Server Block Data") provides utilities for hosting and retrieving block data out of band from the consensus engine. |