| 16 | ) |
| 17 | |
| 18 | type LogsAPI struct { |
| 19 | AgentFn func(context.Context) (database.WorkspaceAgent, error) |
| 20 | Database database.Store |
| 21 | Log slog.Logger |
| 22 | PublishWorkspaceUpdateFn func(context.Context, uuid.UUID, wspubsub.WorkspaceEventKind) error |
| 23 | PublishWorkspaceAgentLogsUpdateFn func(ctx context.Context, workspaceAgentID uuid.UUID, msg agentsdk.LogsNotifyMessage) |
| 24 | |
| 25 | TimeNowFn func() time.Time // defaults to dbtime.Now() |
| 26 | } |
| 27 | |
| 28 | func (a *LogsAPI) now() time.Time { |
| 29 | if a.TimeNowFn != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected