github.com/rakutentech/cli@v6.12.5-0.20151006231303-24468b65536e+incompatible/cf/api/fakes/fake_old_logs_repository_with_timeout.go (about) 1 package fakes 2 3 import ( 4 "errors" 5 "time" 6 7 "github.com/cloudfoundry/loggregatorlib/logmessage" 8 ) 9 10 type FakeOldLogsRepositoryWithTimeout struct { 11 } 12 13 func (fake *FakeOldLogsRepositoryWithTimeout) RecentLogsFor(appGuid string) ([]*logmessage.LogMessage, error) { 14 return nil, nil 15 } 16 17 func (fake *FakeOldLogsRepositoryWithTimeout) TailLogsFor(appGuid string, onConnect func(), onMessage func(*logmessage.LogMessage)) error { 18 time.Sleep(150 * time.Millisecond) 19 return errors.New("Fake http timeout error") 20 } 21 22 func (fake *FakeOldLogsRepositoryWithTimeout) Close() { 23 } 24 25 // var _ api.OldLogsRepository = new(FakeOldLogsRepositoryWithTimeout)