-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathgraceful_windows.go
More file actions
54 lines (42 loc) · 893 Bytes
/
Copy pathgraceful_windows.go
File metadata and controls
54 lines (42 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// +build windows
package graceful
import (
"net/http"
"time"
)
// address defines addr as well as its network type
type address struct {
addr string // ip:port, unix path
network string // tcp, unix
}
type option struct {
watchInterval time.Duration
stopTimeout time.Duration
}
type Server struct {
opt *option
addrs []address
handlers []http.Handler
}
func NewServer(opts ...option) *Server {
panic("platform windows unsupported")
return nil
}
func (s *Server) Register(addr string, handler http.Handler) {
}
func (s *Server) RegisterUnix(addr string, handler http.Handler) {
}
func (s *Server) Run() error {
panic("platform windows unsupported")
return nil
}
func IsMaster() bool {
return true
}
func IsWorker() bool {
return false
}
func ListenAndServe(addr string, handler http.Handler) error {
panic("platform windows unsupported")
return nil
}