github.com/jasonkeene/cli@v6.14.1-0.20160816203908-ca5715166dfb+incompatible/cf/api/logs/logsfakes/fake_logs_repository_with_timeout.go (about) 1 package logsfakes 2 3 import ( 4 "errors" 5 "time" 6 7 "github.com/cloudfoundry/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) {}