devbox/internal/control/server_windows.go
shoemoney 3213149974 refactor: ponytail-audit cuts — dead Windows Publish stub + dedup Daemon iface 🧹
Repo-wide audit (per request) came back lean — no dead exports, no
reinvented stdlib. Two real cuts:
- delete the Windows control.Server.Publish no-op: Publish was removed
  from the real server when /events was trimmed, so nothing calls it.
- move the control.Daemon interface into shared control.go (was duplicated
  across server.go + server_windows.go build-tag split → drift risk).

Kept (disagreed with cutting): blobstore.Store interface is the documented
M9 S3 seam (6 lines, clean contract); c.Bearer() is a tiny test accessor.
2026-06-23 11:13:38 -05:00

23 lines
807 B
Go

//go:build windows
package control
import (
"context"
"errors"
)
// ponytail: Windows gets a stub, not a real control plane. The fleet runs
// darwin/linux; a Windows port should serve the same HTTP/1.1 API over a named
// pipe (`\\.\pipe\devbox-control`) via Microsoft's go-winio — swap the
// net.Listen("unix", …) in server.go for winio.ListenPipe and the client's
// net.Dial for winio.DialPipe. Until a Windows user exists, we don't build it.
// Server is a no-op on Windows.
type Server struct{}
// Serve reports that the control socket isn't supported on Windows yet. The
// daemon warns and continues; sync is unaffected.
func Serve(_ context.Context, _ string, _ Daemon, _ func(string, ...any)) (*Server, error) {
return nil, errors.New("control socket not supported on windows yet")
}