Skip to content

Commit f7aeb28

Browse files
committed
server: paths updates for server socket
Many of these paths need platform specific values or even handling of named pipes. Signed-off-by: Vincent Batts <[email protected]>
1 parent f606604 commit f7aeb28

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

cmd/crio/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ func main() {
496496
logrus.Fatal(err)
497497
}
498498
}
499-
lis, err := net.Listen("unix", config.Listen)
499+
lis, err := server.Listen("unix", config.Listen)
500500
if err != nil {
501501
logrus.Fatalf("failed to listen: %v", err)
502502
}

server/listen_unix.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// +build !windows
2+
3+
package server
4+
5+
import "net"
6+
7+
// Listen opens the network address for the server. Expects the config.Listen address.
8+
//
9+
// This is a platform specific wrapper.
10+
func Listen(network, address string) (net.Listener, error) {
11+
return net.Listen(network, address)
12+
}

server/listen_windows.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// +build windows
2+
3+
package server
4+
5+
import (
6+
"fmt"
7+
"net"
8+
)
9+
10+
// Listen opens the network address for the server. Expects the config.Listen address.
11+
//
12+
// This is a platform specific wrapper.
13+
func Listen(network, address string) (net.Listener, error) {
14+
return nil, fmt.Errorf("not implemented")
15+
}

0 commit comments

Comments
 (0)