mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-23 09:41:38 +00:00
initial commit
This commit is contained in:
31
types/application.go
Normal file
31
types/application.go
Normal file
@ -0,0 +1,31 @@
|
||||
package types
|
||||
|
||||
type Application interface {
|
||||
|
||||
// Echo a message
|
||||
Echo(message string) (RetCode, string)
|
||||
|
||||
// Append a tx, which may or may not get committed
|
||||
AppendTx(tx []byte) RetCode
|
||||
|
||||
// Return the application Merkle root hash
|
||||
GetHash() ([]byte, RetCode)
|
||||
|
||||
// Set commit checkpoint
|
||||
Commit() RetCode
|
||||
|
||||
// Rollback to the latest commit
|
||||
Rollback() RetCode
|
||||
|
||||
// Set events reporting mode
|
||||
SetEventsMode(mode EventsMode) RetCode
|
||||
|
||||
// Add event listener
|
||||
AddListener(key string) RetCode
|
||||
|
||||
// Remove event listener
|
||||
RemListener(key string) RetCode
|
||||
|
||||
// Get all events
|
||||
GetEvents() []Event
|
||||
}
|
Reference in New Issue
Block a user