Add high-level function for calling the daemon if it is open

This commit is contained in:
2025-05-04 19:38:45 -04:00
parent 0479447f14
commit 9314852f06
6 changed files with 36 additions and 39 deletions
+3 -8
View File
@@ -19,15 +19,10 @@ const (
PROCESS_QUERY_LIMITED_INFORMATION = 0x1000
)
// Run should be called to start an RPC server using Windows named pipes
func Start(inputPassphrase string) {
// ensure daemon is not already running
if daemonIsOpen() {
return
}
// Start should be called to serve the given passphrase through an RPC daemon.
func Start(passphrase string) {
// store passphrase to be referenced by GetPass method
passphrase = inputPassphrase
globalPassphrase = passphrase
// register RCWService with the RPC package
if err := rpc.Register(&RCWService{}); err != nil {