You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
helo, i'm studing go-plugin. i want to know how to restart plugin procee after killed plugin process or plugin process exit unexpected.
// Request the plugin
raw, err := rpcClient.Dispense("greeter")
if err != nil {
log.Fatal(err)
}
// We should have a Greeter now! This feels like a normal interface
// implementation but is in fact over an RPC connection.
greeter := raw.(shared.Greeter)
fmt.Println(greeter.Greet())
for {
// killed plugin process while ranging
if client.Exited() {
log.Println("plugin exited")
fmt.Println(client.Start()) // here print: 127.0.0.1:10001 <nil> ; but sub process doesn't started
}
time.Sleep(time.Second * 1)
}
The text was updated successfully, but these errors were encountered:
helo, i'm studing go-plugin. i want to know how to restart plugin procee after killed plugin process or plugin process exit unexpected.
The text was updated successfully, but these errors were encountered: