github.com/elopio/cli@v6.21.2-0.20160902224010-ea909d1fdb2f+incompatible/cf/api/apifakes/old_fake_logs_repository_with_timeout.go (about)

     1  package apifakes
     2  
     3  import (
     4  	"errors"
     5  	"time"
     6  
     7  	"github.com/cloudfoundry/loggregatorlib/logmessage"
     8  )
     9  
    10  type OldFakeLogsRepositoryWithTimeout struct{}
    11  
    12  func (fake *OldFakeLogsRepositoryWithTimeout) RecentLogsFor(appGUID string) ([]*logmessage.LogMessage, error) {
    13  	return nil, nil
    14  }
    15  
    16  func (fake *OldFakeLogsRepositoryWithTimeout) TailLogsFor(appGUID string, onConnect func()) (<-chan *logmessage.LogMessage, error) {
    17  	time.Sleep(150 * time.Millisecond)
    18  	return nil, errors.New("Fake http timeout error")
    19  }
    20  
    21  func (fake *OldFakeLogsRepositoryWithTimeout) Close() {}