-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
events.go
48 lines (39 loc) · 866 Bytes
/
events.go
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
package staticgen
import (
"time"
)
// Event is an event.
type Event interface {
event()
}
// EventStartingServer .
type EventStartingServer struct {
Command string
URL string
}
// EventStartedServer .
type EventStartedServer struct {
Command string
URL string
}
// EventStoppingServer .
type EventStoppingServer struct{}
// EventStartCrawl .
type EventStartCrawl struct{}
// EventStopCrawl .
type EventStopCrawl struct{}
// EventVisitedResource .
type EventVisitedResource struct {
Target
Duration time.Duration
StatusCode int
Filename string
Error error
}
// event implementation.
func (e EventStartingServer) event() {}
func (e EventStartedServer) event() {}
func (e EventStoppingServer) event() {}
func (e EventStartCrawl) event() {}
func (e EventStopCrawl) event() {}
func (e EventVisitedResource) event() {}