Implement serving passphrase from daemon

This commit is contained in:
2025-04-13 17:55:57 -04:00
parent a5108bc6cc
commit dc262c87e8
5 changed files with 35 additions and 15 deletions
+9 -1
View File
@@ -20,7 +20,15 @@ const (
)
// Run should be called to start an RPC server using Windows named pipes
func Run() {
func Start(inputPassphrase string) {
// ensure daemon is not already running
if daemonIsOpen() {
return
}
// store passphrase to be referenced by GetPass method
passphrase = inputPassphrase
// register RCWService with the RPC package
if err := rpc.Register(&RCWService{}); err != nil {
log.Fatalf("Error registering RPC service: %v", err)