aboutsummaryrefslogtreecommitdiffstats
path: root/vm/proxyapp
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2022-09-26 15:08:30 +0000
committerTaras Madan <tarasmadan@google.com>2022-10-24 20:39:44 +0200
commit914c54c355c0a93e7c8696bb4f5750da2c5c17b6 (patch)
treea207df376f5bf57eedbcfa56cc59755d109f2ae7 /vm/proxyapp
parentff2fe65db3b673b60a5c11df17a3de7f1ec2b96e (diff)
vm/proxyapp: extend RPC API to support logging
Diffstat (limited to 'vm/proxyapp')
-rw-r--r--vm/proxyapp/mocks/ProxyAppInterface.go14
-rw-r--r--vm/proxyapp/proxyrpc/proxyrpc.go12
2 files changed, 26 insertions, 0 deletions
diff --git a/vm/proxyapp/mocks/ProxyAppInterface.go b/vm/proxyapp/mocks/ProxyAppInterface.go
index 38f4f1418..95a86a8da 100644
--- a/vm/proxyapp/mocks/ProxyAppInterface.go
+++ b/vm/proxyapp/mocks/ProxyAppInterface.go
@@ -96,6 +96,20 @@ func (_m *ProxyAppInterface) Forward(in proxyrpc.ForwardParams, out *proxyrpc.Fo
return r0
}
+// PoolLogs provides a mock function with given fields: in, out
+func (_m *ProxyAppInterface) PoolLogs(in proxyrpc.PoolLogsParam, out *proxyrpc.PoolLogsReply) error {
+ ret := _m.Called(in, out)
+
+ var r0 error
+ if rf, ok := ret.Get(0).(func(proxyrpc.PoolLogsParam, *proxyrpc.PoolLogsReply) error); ok {
+ r0 = rf(in, out)
+ } else {
+ r0 = ret.Error(0)
+ }
+
+ return r0
+}
+
// RunReadProgress provides a mock function with given fields: in, out
func (_m *ProxyAppInterface) RunReadProgress(in proxyrpc.RunReadProgressParams, out *proxyrpc.RunReadProgressReply) error {
ret := _m.Called(in, out)
diff --git a/vm/proxyapp/proxyrpc/proxyrpc.go b/vm/proxyapp/proxyrpc/proxyrpc.go
index 9e5cfdd24..d3fd606a4 100644
--- a/vm/proxyapp/proxyrpc/proxyrpc.go
+++ b/vm/proxyapp/proxyrpc/proxyrpc.go
@@ -14,6 +14,7 @@ type ProxyAppInterface interface {
RunStop(in RunStopParams, out *RunStopReply) error
RunReadProgress(in RunReadProgressParams, out *RunReadProgressReply) error
Close(in CloseParams, out *CloseReply) error
+ PoolLogs(in PoolLogsParam, out *PoolLogsReply) error
}
type CreatePoolParams struct {
@@ -97,3 +98,14 @@ type DiagnoseParams struct {
type DiagnoseReply struct {
Diagnosis string
}
+
+type PoolLogsParam struct {
+}
+
+type PoolLogsReply struct {
+ Log string
+ // Verbosity follows pkg/log rules.
+ // Messages with Verbosity 0 are printed by default.
+ // The higher is this value - the lower is importance of the message.
+ Verbosity int
+}