( client sharedaction.LogCacheClient, recentLogsFunc func(appGUID string, client sharedaction.LogCacheClient) ([]sharedaction.LogMessage, error), getStreamingLogsFunc func(appGUID string, client sharedaction.LogCacheClient) (<-chan sharedaction.LogMessage, <-chan error, context.CancelFunc), )
| 30 | } |
| 31 | |
| 32 | func NewLogCacheRepository( |
| 33 | client sharedaction.LogCacheClient, |
| 34 | recentLogsFunc func(appGUID string, client sharedaction.LogCacheClient) ([]sharedaction.LogMessage, error), |
| 35 | getStreamingLogsFunc func(appGUID string, client sharedaction.LogCacheClient) (<-chan sharedaction.LogMessage, <-chan error, context.CancelFunc), |
| 36 | ) *logCacheRepository { |
| 37 | return &logCacheRepository{client: client, recentLogsFunc: recentLogsFunc, getStreamingLogsFunc: getStreamingLogsFunc, cancelFunc: func() {}} |
| 38 | } |
| 39 | |
| 40 | func (r *logCacheRepository) RecentLogsFor(appGUID string) ([]Loggable, error) { |
| 41 | logs, err := r.recentLogsFunc(appGUID, r.client) |
no outgoing calls
no test coverage detected