mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 23:14:37 +00:00
Begin writing debora
This commit is contained in:
+1
-10
@@ -16,6 +16,7 @@ import (
|
||||
|
||||
acm "github.com/tendermint/tendermint/account"
|
||||
"github.com/tendermint/tendermint/binary"
|
||||
. "github.com/tendermint/tendermint/cmd/barak/types"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
pcm "github.com/tendermint/tendermint/process"
|
||||
"github.com/tendermint/tendermint/rpc"
|
||||
@@ -169,9 +170,6 @@ type CommandRunProcess struct {
|
||||
|
||||
func (_ CommandRunProcess) TypeByte() byte { return typeByteRunProcess }
|
||||
|
||||
type ResponseRunProcess struct {
|
||||
}
|
||||
|
||||
func RunProcess(wait bool, label string, execPath string, args []string, input string) (*ResponseRunProcess, error) {
|
||||
barak.mtx.Lock()
|
||||
|
||||
@@ -204,9 +202,6 @@ type CommandStopProcess struct {
|
||||
|
||||
func (_ CommandStopProcess) TypeByte() byte { return typeByteStopProcess }
|
||||
|
||||
type ResponseStopProcess struct {
|
||||
}
|
||||
|
||||
func StopProcess(label string, kill bool) (*ResponseStopProcess, error) {
|
||||
barak.mtx.Lock()
|
||||
proc := barak.processes[label]
|
||||
@@ -226,10 +221,6 @@ type CommandListProcesses struct{}
|
||||
|
||||
func (_ CommandListProcesses) TypeByte() byte { return typeByteListProcesses }
|
||||
|
||||
type ResponseListProcesses struct {
|
||||
Processes []*pcm.Process
|
||||
}
|
||||
|
||||
func ListProcesses() (*ResponseListProcesses, error) {
|
||||
var procs = []*pcm.Process{}
|
||||
barak.mtx.Lock()
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
pcm "github.com/tendermint/tendermint/process"
|
||||
)
|
||||
|
||||
type ResponseRunProcess struct {
|
||||
}
|
||||
|
||||
type ResponseStopProcess struct {
|
||||
}
|
||||
|
||||
type ResponseListProcesses struct {
|
||||
Processes []*pcm.Process
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/tendermint/tendermint/logger"
|
||||
)
|
||||
|
||||
var log = logger.New("module", "main")
|
||||
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
btypes "github.com/tendermint/tendermint/cmd/barak/types"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
"github.com/tendermint/tendermint/rpc"
|
||||
// ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
)
|
||||
|
||||
func main() {
|
||||
response := []btypes.ResponseListProcesses{}
|
||||
response2, err := rpc.Call("http://127.0.0.1:8082", "list_processes", Arr(), &response)
|
||||
fmt.Printf("%v\n", response)
|
||||
fmt.Printf("%v (error: %v)\n", response2, err)
|
||||
}
|
||||
Reference in New Issue
Block a user