Files
linuxkit/alpine/packages/diagnostics/vsock.go
Nathan LeClaire 1e0dfd4798 Re-write diagnostic server to support cloud/HTTP
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2016-07-19 17:40:15 -07:00

24 lines
406 B
Go

package main
import (
"log"
"syscall"
"github.com/rneugeba/virtsock/go/vsock"
)
type VSockDiagnosticListener struct{}
func (l VSockDiagnosticListener) Listen() {
vsock, err := vsock.Listen(uint(62374))
if err != nil {
if errno, ok := err.(syscall.Errno); !ok || errno != syscall.EAFNOSUPPORT {
log.Printf("Failed to bind to vsock port 62374: %s", err)
}
}
for {
TarRespond(vsock)
}
}