event test

This commit is contained in:
geek 2017-04-28 18:39:11 +09:00
parent 618339b086
commit 47a6698007

View File

@ -3,16 +3,15 @@ package event_sender
import ( import (
"context" "context"
"google.golang.org/grpc" "google.golang.org/grpc"
"loafle.com/overflow/agent_api/observer"
"loafle.com/overflow/agent_api/observer/messages" "loafle.com/overflow/agent_api/observer/messages"
pb "loafle.com/overflow/crawler_go/grpc" pb "loafle.com/overflow/crawler_go/grpc"
q "loafle.com/overflow/queue_go" q "loafle.com/overflow/queue_go"
"log" "log"
"reflect" "reflect"
"loafle.com/overflow/agent_api/observer"
"sync" "sync"
) )
var ( var (
instance *EventSender instance *EventSender
once sync.Once once sync.Once
@ -32,7 +31,6 @@ type Data struct {
FinishedAt uint64 FinishedAt uint64
} }
func GetInstance() *EventSender { func GetInstance() *EventSender {
once.Do(func() { once.Do(func() {
instance = &EventSender{} instance = &EventSender{}