aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/rpcserver/runner.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-07-01 18:28:45 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-07-04 12:34:14 +0000
commitecfab6a2e698b37bff1bf0b2996ff7954cf78303 (patch)
treebf6c9152ea479b8df13bbd84b3b91c4eeaf00754 /pkg/rpcserver/runner.go
parent891bf15f3ceb3f69eaf590882ba3f245811c1698 (diff)
pkg/rpcserver: capitalize external interface methods
Make it explicit which methods of Runner refer to its implementation and which are supposed to be invoked by its users.
Diffstat (limited to 'pkg/rpcserver/runner.go')
-rw-r--r--pkg/rpcserver/runner.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/rpcserver/runner.go b/pkg/rpcserver/runner.go
index 3886e5ffc..ea45aa89a 100644
--- a/pkg/rpcserver/runner.go
+++ b/pkg/rpcserver/runner.go
@@ -77,7 +77,7 @@ type handshakeResult struct {
Canonicalizer *cover.CanonicalizerInstance
}
-func (runner *Runner) handshake(conn *flatrpc.Conn, cfg *handshakeConfig) error {
+func (runner *Runner) Handshake(conn *flatrpc.Conn, cfg *handshakeConfig) error {
connectReply := &flatrpc.ConnectReply{
Debug: runner.debug,
Cover: runner.cover,
@@ -118,7 +118,7 @@ func (runner *Runner) handshake(conn *flatrpc.Conn, cfg *handshakeConfig) error
return nil
}
-func (runner *Runner) connectionLoop() error {
+func (runner *Runner) ConnectionLoop() error {
runner.mu.Lock()
stopped := runner.stopped
if !stopped {
@@ -390,7 +390,7 @@ func (runner *Runner) convertCallInfo(call *flatrpc.CallInfo) {
}
}
-func (runner *Runner) sendSignalUpdate(plus []uint64) error {
+func (runner *Runner) SendSignalUpdate(plus []uint64) error {
msg := &flatrpc.HostMessage{
Msg: &flatrpc.HostMessages{
Type: flatrpc.HostMessagesRawSignalUpdate,
@@ -402,7 +402,7 @@ func (runner *Runner) sendSignalUpdate(plus []uint64) error {
return flatrpc.Send(runner.conn, msg)
}
-func (runner *Runner) sendCorpusTriaged() error {
+func (runner *Runner) SendCorpusTriaged() error {
msg := &flatrpc.HostMessage{
Msg: &flatrpc.HostMessages{
Type: flatrpc.HostMessagesRawCorpusTriaged,
@@ -412,7 +412,7 @@ func (runner *Runner) sendCorpusTriaged() error {
return flatrpc.Send(runner.conn, msg)
}
-func (runner *Runner) stop() {
+func (runner *Runner) Stop() {
runner.mu.Lock()
runner.stopped = true
conn := runner.conn
@@ -422,7 +422,7 @@ func (runner *Runner) stop() {
}
}
-func (runner *Runner) shutdown(crashed bool) []ExecRecord {
+func (runner *Runner) Shutdown(crashed bool) []ExecRecord {
runner.mu.Lock()
runner.stopped = true
finished := runner.finished
@@ -442,13 +442,13 @@ func (runner *Runner) shutdown(crashed bool) []ExecRecord {
return runner.lastExec.Collect()
}
-func (runner *Runner) getMachineInfo() []byte {
+func (runner *Runner) MachineInfo() []byte {
runner.mu.Lock()
defer runner.mu.Unlock()
return runner.machineInfo
}
-func (runner *Runner) queryStatus() []byte {
+func (runner *Runner) QueryStatus() []byte {
resc := make(chan []byte, 1)
timeout := time.After(time.Minute)
select {
@@ -464,7 +464,7 @@ func (runner *Runner) queryStatus() []byte {
}
}
-func (runner *Runner) alive() bool {
+func (runner *Runner) Alive() bool {
runner.mu.Lock()
defer runner.mu.Unlock()
return runner.conn != nil && !runner.stopped