MCPcopy Create free account
hub / github.com/coder/coder / LogsAPI

Struct LogsAPI

coderd/agentapi/logs.go:18–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16)
17
18type 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
28func (a *LogsAPI) now() time.Time {
29 if a.TimeNowFn != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected