Documentation ¶
Index ¶
- Constants
- Variables
- type Module
- func (m *Module) AutoMigrate() error
- func (m *Module) ClearCtx()
- func (m *Module) ExtractEventStatements(ctx context.Context, block *tmctypes.ResultBlock, txHash common.Hash, ...) (map[string][]interface{}, error)
- func (m *Module) GetCtx(key string) interface{}
- func (m *Module) HandleEvent(ctx context.Context, block *tmctypes.ResultBlock, txHash common.Hash, ...) error
- func (m *Module) Name() string
- func (m *Module) PrepareTables() error
- func (m *Module) SetCtx(key string, val interface{})
Constants ¶
View Source
const (
SPExitRelatedEventsModuleName = "sp_exit_events"
)
Variables ¶
View Source
var ( EventMigrationBucket = proto.MessageName(&storagetypes.EventMigrationBucket{}) EventCompleteMigrationBucket = proto.MessageName(&storagetypes.EventCompleteMigrationBucket{}) EventCancelMigrationBucket = proto.MessageName(&storagetypes.EventCancelMigrationBucket{}) EventRejectMigrateBucket = proto.MessageName(&storagetypes.EventRejectMigrateBucket{}) EventSwapOut = proto.MessageName(&vgtypes.EventSwapOut{}) EventCompleteSwapOut = proto.MessageName(&vgtypes.EventCompleteSwapOut{}) EventCancelSwapOut = proto.MessageName(&vgtypes.EventCancelSwapOut{}) EventSpExit = proto.MessageName(&vgtypes.EventStorageProviderExit{}) EventCompleteSpExit = proto.MessageName(&vgtypes.EventCompleteStorageProviderExit{}) )
View Source
var SpExitEvents = map[string]bool{ EventMigrationBucket: true, EventCompleteMigrationBucket: true, EventCancelMigrationBucket: true, EventSwapOut: true, EventCompleteSwapOut: true, EventCancelSwapOut: true, EventSpExit: true, EventCompleteSpExit: true, EventRejectMigrateBucket: true, }
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) AutoMigrate ¶
func (*Module) ClearCtx ¶ added in v1.2.0
func (m *Module) ClearCtx()
ClearCtx resets the module's context to a new, empty context. This effectively removes all key-value pairs previously stored in the context. This can be used for cleanup or reinitialization purposes.
func (*Module) ExtractEventStatements ¶
func (*Module) GetCtx ¶ added in v1.2.0
GetCtx retrieves the value associated with a given key from the module's context. If the key exists in the context, it returns the value; otherwise, it returns nil. This is commonly used to access data that was previously stored with Set.
func (*Module) HandleEvent ¶
func (*Module) PrepareTables ¶
Click to show internal directories.
Click to hide internal directories.