File tree Expand file tree Collapse file tree 12 files changed +24
-29
lines changed
Expand file tree Collapse file tree 12 files changed +24
-29
lines changed Original file line number Diff line number Diff line change 1919format :
2020 @go fmt
2121 @go get golang.org/x/tools/cmd/goimports
22- @goimports -w $$(find . -name '*.go' | grep -v vendor )
22+ @goimports -w $$(find . -name '*.go' | grep -v 'mock_*' )
2323
2424lint : .makecache .makecache/lint
2525
Original file line number Diff line number Diff line change @@ -68,11 +68,7 @@ type errorList struct {
6868}
6969
7070func (el * errorList ) addError (err error ) {
71- if el .errors == nil {
72- el .errors = []error {err }
73- } else {
74- el .errors = append (el .errors , err )
75- }
71+ el .errors = append (el .errors , err )
7672}
7773
7874// deliverMessage recursively visits the source and all nodes and delivers the message if the node accepts this message type.
Original file line number Diff line number Diff line change @@ -89,9 +89,6 @@ func (c *ContextAware) Subscribe(messageTypes []string) {
8989// AcceptsMessage is used when delivering messages to determine if a Source/Node requests delivery of messages with a given
9090// messageType.
9191func (c * ContextAware ) AcceptsMessage (messageType string ) bool {
92- if c .messageTypes == nil {
93- return false
94- }
9592 for _ , t := range c .messageTypes {
9693 if messageType == t {
9794 return true
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ require (
2121 github.com/tidwall/gjson v1.2.1 // indirect
2222 github.com/tidwall/match v1.0.1 // indirect
2323 github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51 // indirect
24- golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 // indirect
24+ golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056 // indirect
2525 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
2626 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
2727 gopkg.in/yaml.v2 v2.2.5
Original file line number Diff line number Diff line change @@ -175,15 +175,16 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
175175golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc =
176176golang.org/x/sys v0.0.0-20190422165155-953cdadca894 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
177177golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
178- golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 h1:Hynbrlo6LbYI3H1IqXpkVDOcX/3HiPdhVEuyj5a59RM =
179- golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
178+ golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056 h1:dHtDnRWQtSx0Hjq9kvKFpBh9uPPKfQN70NZZmvssGwk =
179+ golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
180180golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg =
181181golang.org/x/text v0.3.0 /go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ =
182182golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ =
183183golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 /go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ =
184184golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52 /go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ =
185185golang.org/x/tools v0.0.0-20190114222345-bf090417da8b /go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ =
186186golang.org/x/tools v0.0.0-20190226205152-f727befe758c /go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY =
187+ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138 h1:H3uGjxCR/6Ds0Mjgyp7LMK81+LvmbvWWEnJhzk1Pi9E =
187188golang.org/x/tools v0.0.0-20190312170243-e65039ee4138 /go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs =
188189google.golang.org/api v0.3.1 /go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk =
189190google.golang.org/appengine v1.1.0 /go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM =
Original file line number Diff line number Diff line change 55 "strconv"
66)
77
8+ // Nodeconfig holds a Nodes configuration
89type Nodeconfig map [string ]string
910
1011// IntConfig validates and fetches the int-typed optional config value specified by 'name', using the 'defaultValue' if
Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ func (a *AsyncFilterNode) Receive(msg fbcontext.Message) error {
388388 return errors .New ("message not supported" )
389389}
390390
391- // IndexRequestBuildlerNode is a Node that converts strings to elasticsearch IndexRequests
391+ // IndexRequestBuilderNode is a Node that converts strings to elasticsearch IndexRequests
392392type IndexRequestBuilderNode struct {
393393 docNum int
394394 fbcontext.ContextAware
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ func (l *Leader) updateLeadership(status leaderelection.Status) {
117117}
118118
119119// connectZk establishes a Zookeeper client connection. The underlying client library does not block on creating the initial
120- // conection , so no error will be returned from zk.Connect if zookeeper is not available.
120+ // connection , so no error will be returned from zk.Connect if zookeeper is not available.
121121func connectZk (zkHosts string ) (* zk.Conn , <- chan zk.Event ) {
122122 zks := strings .Split (zkHosts , "," )
123123
Original file line number Diff line number Diff line change @@ -53,9 +53,9 @@ func (s KafkaMessageSender) Ack(msg Message) error {
5353
5454func (s * KafkaMessageSender ) produceMessage (msg Message , ack bool ) error {
5555 wireMsg := & wireMessage {
56- Message : msg ,
57- Updated : time .Now (),
58- Acknowleged : ack ,
56+ Message : msg ,
57+ Updated : time .Now (),
58+ Acknowledged : ack ,
5959 }
6060
6161 wireMsgBytes , err := json .Marshal (wireMsg )
Original file line number Diff line number Diff line change 66
77// wireMessage is the structure that we send on the Kafka topic
88type wireMessage struct {
9- Message Message `json:"message"`
10- Updated time.Time `json:"updated"`
11- Acknowleged bool `json:"ack"`
9+ Message Message `json:"message"`
10+ Updated time.Time `json:"updated"`
11+ Acknowledged bool `json:"ack"`
1212}
1313
1414// uniqueKey concatenates messagetype with the key so that we don't risk collisions across message producers
You can’t perform that action at this time.
0 commit comments