MCPcopy Index your code
hub / github.com/cloudfoundry/cli / NewLogCacheRepository

Function NewLogCacheRepository

cf/api/logs/log_cache_repository.go:32–38  ·  view source on GitHub ↗
(
	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),
)

Source from the content-addressed store, hash-verified

30}
31
32func 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
40func (r *logCacheRepository) RecentLogsFor(appGUID string) ([]Loggable, error) {
41 logs, err := r.recentLogsFunc(appGUID, r.client)

Callers 2

NewRepositoryLocatorFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected