@@ -25,7 +25,7 @@ all: gen deps fmt test
gen:
-@echo "-> $@"
-@echo "=== Generate strategies"
- $(foreach file, $(wildcard ./strategy/*.go), CGO_ENABLED=1 go build -ldflags=$(LDFLAGS) -buildmode=plugin -gcflags=$(GCFLAGS) -o $(file).so $(file);)
+ $(foreach file, $(filter-out $(wildcard ./strategy/*_test.go), $(wildcard ./strategy/*.go)), CGO_ENABLED=1 go build -ldflags=$(LDFLAGS) -buildmode=plugin -gcflags=$(GCFLAGS) -o $(file).so $(file);)
.PHONY: deps
deps:
@@ -0,0 +1,19 @@
+package sentio
+
+import "time"
+type Clock interface {
+ Now() time.Time
+ After(d time.Duration) <-chan time.Time
+}
+type ClockUTC struct {
+func (t ClockUTC) Now() time.Time {
+ return time.Now().In(time.UTC)
+func (t ClockUTC) After(d time.Duration) <-chan time.Time {
+ return time.After(d)
@@ -0,0 +1,15 @@
+package main
+type ClockFixed struct {
+ fix time.Time
+func (t ClockFixed) Now() time.Time {
+ return t.fix.In(time.UTC)
+func (t ClockFixed) After(d time.Duration) <-chan time.Time {
@@ -1,3 +1,3 @@
package sentio
-var VERSION = "0.0.0-dev"
+var Version = "0.0.0-dev"