Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type StoreComponent
- func (s *StoreComponent[T]) CLICommands() serverv2.CLIConfig
- func (g *StoreComponent[T]) Config() any
- func (s *StoreComponent[T]) DeleteSnapshotCmd() *cobra.Command
- func (s *StoreComponent[T]) DumpArchiveCmd() *cobra.Command
- func (s *StoreComponent[T]) ExportSnapshotCmd() *cobra.Command
- func (s *StoreComponent[T]) Init(appI serverv2.AppI[T], cfg map[string]any, logger log.Logger) error
- func (s *StoreComponent[T]) ListSnapshotsCmd() *cobra.Command
- func (s *StoreComponent[T]) LoadArchiveCmd() *cobra.Command
- func (s *StoreComponent[T]) Name() string
- func (s *StoreComponent[T]) PrunesCmd() *cobra.Command
- func (s *StoreComponent[T]) RestoreSnapshotCmd(newApp serverv2.AppCreator[T]) *cobra.Command
- func (s *StoreComponent[T]) Start(ctx context.Context) error
- func (s *StoreComponent[T]) Stop(ctx context.Context) error
Constants ¶
View Source
const ServerName = "store"
View Source
const SnapshotFileName = "_snapshot"
Variables ¶
View Source
var ( FlagAppDBBackend = prefix("app-db-backend") FlagKeepRecent = prefix("keep-recent") FlagInterval = prefix("interval") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AppDBBackend string `mapstructure:"app-db-backend" toml:"app-db-backend" comment:"The type of database for application and snapshots databases."` Options root.Options `mapstructure:"options" toml:"options"` }
func DefaultConfig ¶
func DefaultConfig() *Config
type StoreComponent ¶
type StoreComponent[T transaction.Tx] struct { // contains filtered or unexported fields }
StoreComponent manages store config and contains prune & snapshot commands
func New ¶
func New[T transaction.Tx](appCreator serverv2.AppCreator[T]) *StoreComponent[T]
func (*StoreComponent[T]) CLICommands ¶
func (s *StoreComponent[T]) CLICommands() serverv2.CLIConfig
func (*StoreComponent[T]) Config ¶
func (g *StoreComponent[T]) Config() any
func (*StoreComponent[T]) DeleteSnapshotCmd ¶
func (s *StoreComponent[T]) DeleteSnapshotCmd() *cobra.Command
DeleteSnapshotCmd returns the command to delete a local snapshot
func (*StoreComponent[T]) DumpArchiveCmd ¶
func (s *StoreComponent[T]) DumpArchiveCmd() *cobra.Command
DumpArchiveCmd returns a command to dump the snapshot as portable archive format
func (*StoreComponent[T]) ExportSnapshotCmd ¶
func (s *StoreComponent[T]) ExportSnapshotCmd() *cobra.Command
QueryBlockResultsCmd implements the default command for a BlockResults query.
func (*StoreComponent[T]) ListSnapshotsCmd ¶
func (s *StoreComponent[T]) ListSnapshotsCmd() *cobra.Command
ListSnapshotsCmd returns the command to list local snapshots
func (*StoreComponent[T]) LoadArchiveCmd ¶
func (s *StoreComponent[T]) LoadArchiveCmd() *cobra.Command
LoadArchiveCmd load a portable archive format snapshot into snapshot store
func (*StoreComponent[T]) Name ¶
func (s *StoreComponent[T]) Name() string
func (*StoreComponent[T]) PrunesCmd ¶
func (s *StoreComponent[T]) PrunesCmd() *cobra.Command
QueryBlockResultsCmd implements the default command for a BlockResults query.
func (*StoreComponent[T]) RestoreSnapshotCmd ¶
func (s *StoreComponent[T]) RestoreSnapshotCmd(newApp serverv2.AppCreator[T]) *cobra.Command
RestoreSnapshotCmd returns a command to restore a snapshot
Click to show internal directories.
Click to hide internal directories.