Add native Windows support (#91)
- Native Windows daemon using TCP loopback endpoints - Direct-mode fallback for CLI/daemon compatibility - Comment operations over RPC - PowerShell installer script - Go 1.24 requirement - Cross-OS testing documented Co-authored-by: danshapiro <danshapiro@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-c6230265-055f-4af1-9712-4481061886db Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
//go:build !windows
|
||||
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
func listenRPC(socketPath string) (net.Listener, error) {
|
||||
return net.Listen("unix", socketPath)
|
||||
}
|
||||
|
||||
func dialRPC(socketPath string, timeout time.Duration) (net.Conn, error) {
|
||||
return net.DialTimeout("unix", socketPath, timeout)
|
||||
}
|
||||
|
||||
func endpointExists(socketPath string) bool {
|
||||
_, err := os.Stat(socketPath)
|
||||
return err == nil
|
||||
}
|
||||
Reference in New Issue
Block a user