github.com/elopio/cli@v6.21.2-0.20160902224010-ea909d1fdb2f+incompatible/cf/api/logs/logsfakes/fake_logs_repository_with_timeout.go (about) 1 package logsfakes 2 3 import ( 4 "errors" 5 "time" 6 7 "code.cloudfoundry.org/cli/cf/api/logs" 8 ) 9 10 type FakeLogsRepositoryWithTimeout struct{} 11 12 func (fake *FakeLogsRepositoryWithTimeout) RecentLogsFor(appGuid string) ([]logs.Loggable, error) { 13 return nil, nil 14 } 15 16 func (fake *FakeLogsRepositoryWithTimeout) TailLogsFor(appGuid string, onConnect func(), logChan chan<- logs.Loggable, errChan chan<- error) { 17 time.Sleep(150 * time.Millisecond) 18 errChan <- errors.New("Fake http timeout error") 19 } 20 21 func (fake *FakeLogsRepositoryWithTimeout) Close() {} 22 23 func (fake *FakeLogsRepositoryWithTimeout) FlushMessages(c chan<- logs.Loggable) {}