Skip to content

Commit 80db4ae

Browse files
committed
SCFF-21 changed the name of the library to sumoCFFirehose
1 parent 00dbf32 commit 80db4ae

8 files changed

Lines changed: 23 additions & 22 deletions

File tree

eventRouting/eventRouting_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
. "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching/cachingfakes"
55
. "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/eventRouting"
66
. "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/logging/loggingfakes"
7-
. "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumoLog4go/sumoLog4gofakes" //**
7+
. "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumoCFFirehose/sumoLog4gofakes" //**
88
. "github.com/cloudfoundry/sonde-go/events"
99
. "github.com/onsi/ginkgo"
1010
. "github.com/onsi/gomega"

eventRouting/eventrouting.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
fevents "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/events"
1313
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/extrafields"
1414
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/logging"
15-
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumoLog4go" //**
15+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumoCFFirehose" //**
1616
"github.com/Sirupsen/logrus"
1717
"github.com/cloudfoundry/sonde-go/events"
1818
)
@@ -22,12 +22,12 @@ type EventRouting struct {
2222
selectedEvents map[string]bool
2323
selectedEventsCount map[string]uint64
2424
mutex *sync.Mutex
25-
sLAppender sumoLog4go.SumoLog4go //**
25+
sLAppender sumoCFFirehose.SumoCFFirehose //**
2626
log logging.Logging
2727
ExtraFields map[string]string
2828
}
2929

30-
func NewEventRouting(caching caching.Caching, logging logging.Logging, sLAppender sumoLog4go.SumoLog4go) *EventRouting {
30+
func NewEventRouting(caching caching.Caching, logging logging.Logging, sLAppender sumoCFFirehose.SumoCFFirehose) *EventRouting {
3131
return &EventRouting{
3232
CachingClient: caching,
3333
selectedEvents: make(map[string]bool),

events/events.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package events
22

33
import (
44
"fmt"
5-
"github.com/Sirupsen/logrus"
5+
66
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching"
77
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/utils"
8+
"github.com/Sirupsen/logrus"
89
"github.com/cloudfoundry/sonde-go/events"
910
)
1011

firehoseclient/firehoseclient.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ package firehoseclient
22

33
import (
44
"crypto/tls"
5+
"time"
6+
57
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/eventRouting"
68
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/logging"
79
"github.com/cloudfoundry-community/go-cfclient"
810
"github.com/cloudfoundry/noaa/consumer"
911
"github.com/cloudfoundry/sonde-go/events"
1012
"github.com/gorilla/websocket"
11-
"time"
1213
)
1314

1415
type FirehoseNozzle struct {

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/eventRouting"
1010
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/firehoseclient"
1111
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/logging"
12-
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumoLog4go"
12+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumoCFFirehose"
1313
"github.com/cloudfoundry-community/go-cfclient"
1414
"github.com/pkg/profile"
1515
"gopkg.in/alecthomas/kingpin.v2"
@@ -48,7 +48,7 @@ func main() {
4848
//Setup Logging <-- this loggingClient has to be removed when sumoLog4go Library is working
4949
loggingClient := logging.NewLogging(syslogServer, syslogProtocol, *logFormatterType, *debug)
5050
//Setup Loggin with sumoLog4go library
51-
loggingClientSumo := sumoLog4go.NewSumoLogicAppender("http://httpbin.org/post", 1000)
51+
loggingClientSumo := sumoCFFirehose.NewSumoLogicAppender("http://httpbin.org/post", 1000)
5252

5353
logging.LogStd(fmt.Sprintf("Starting firehose-to-sumo %s ", version), true)
5454

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package sumoLog4go
1+
package sumoCFFirehose
22

3-
type SumoLog4go interface {
3+
type SumoCFFirehose interface {
44
Connect() bool
55
AppendLogs(map[string]interface{})
66
}

sumoLog4go/sumoLog4gofakes/fake_SumoLog4go.go renamed to sumoCFFirehose/sumoLog4gofakes/fake_SumoLog4go.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package sumoLog4gofakes
44
import (
55
"sync"
66

7-
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumolog4go"
7+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumoCFFirehose"
88
)
99

1010
type FakeSumoLog4go struct {
@@ -14,11 +14,10 @@ type FakeSumoLog4go struct {
1414
connectReturns struct {
1515
result1 bool
1616
}
17-
AppendLogsStub func(map[string]interface{}, string)
17+
AppendLogsStub func(map[string]interface{})
1818
AppendLogsMutex sync.RWMutex
1919
AppendLogsArgsForCall []struct {
2020
arg1 map[string]interface{}
21-
arg2 string
2221
}
2322
invocations map[string][][]interface{}
2423
invocationsMutex sync.RWMutex
@@ -49,16 +48,16 @@ func (fake *FakeSumoLog4go) ConnectReturns(result1 bool) {
4948
}{result1}
5049
}
5150

52-
func (fake *FakeSumoLog4go) AppendLogs(arg1 map[string]interface{}, arg2 string) {
51+
func (fake *FakeSumoLog4go) AppendLogs(arg1 map[string]interface{}) {
5352
fake.AppendLogsMutex.Lock()
5453
fake.AppendLogsArgsForCall = append(fake.AppendLogsArgsForCall, struct {
5554
arg1 map[string]interface{}
56-
arg2 string
57-
}{arg1, arg2})
58-
fake.recordInvocation("ShipEvents", []interface{}{arg1, arg2})
55+
//arg2 string
56+
}{arg1 /*, arg2*/})
57+
fake.recordInvocation("ShipEvents", []interface{}{arg1 /*, arg2*/})
5958
fake.AppendLogsMutex.Unlock()
6059
if fake.AppendLogsStub != nil {
61-
fake.AppendLogsStub(arg1, arg2)
60+
fake.AppendLogsStub(arg1 /*, arg2*/)
6261
}
6362
}
6463

@@ -68,10 +67,10 @@ func (fake *FakeSumoLog4go) ShipEventsCallCount() int {
6867
return len(fake.AppendLogsArgsForCall)
6968
}
7069

71-
func (fake *FakeSumoLog4go) ShipEventsArgsForCall(i int) (map[string]interface{}, string) {
70+
func (fake *FakeSumoLog4go) ShipEventsArgsForCall(i int) map[string]interface{} {
7271
fake.AppendLogsMutex.RLock()
7372
defer fake.AppendLogsMutex.RUnlock()
74-
return fake.AppendLogsArgsForCall[i].arg1, fake.AppendLogsArgsForCall[i].arg2
73+
return fake.AppendLogsArgsForCall[i].arg1
7574
}
7675

7776
func (fake *FakeSumoLog4go) Invocations() map[string][][]interface{} {
@@ -96,4 +95,4 @@ func (fake *FakeSumoLog4go) recordInvocation(key string, args []interface{}) {
9695
fake.invocations[key] = append(fake.invocations[key], args)
9796
}
9897

99-
var _ sumoLog4go.SumoLog4go = new(FakeSumoLog4go)
98+
var _ sumoCFFirehose.SumoCFFirehose = new(FakeSumoLog4go)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package sumoLog4go
1+
package sumoCFFirehose
22

33
import (
44
"bytes"

0 commit comments

Comments
 (0)