Plugin support for SetOption, Query, and Commit

This commit is contained in:
Jae Kwon
2016-03-24 14:10:17 -07:00
parent 964a4cfd50
commit 601a654b7d
5 changed files with 124 additions and 40 deletions
+9 -1
View File
@@ -8,7 +8,15 @@ import (
// Gas is a pointer to remainig gas. Decrement as you go,
// if any gas is left the user is
type Plugin interface {
CallTx(ctx CallContext, txBytes []byte) tmsp.Result
SetOption(key string, value string) (log string)
CallTx(ctx CallContext, txBytes []byte) (res tmsp.Result)
Query(query []byte) (res tmsp.Result)
Commit() (res tmsp.Result)
}
type NamedPlugin struct {
Name string
Plugin
}
type CallContext struct {