MCPcopy Index your code
hub / github.com/coder/coder / NewUpdatesProvider

Function NewUpdatesProvider

coderd/workspaceupdates.go:147–163  ·  view source on GitHub ↗
(
	logger slog.Logger,
	ps pubsub.Pubsub,
	db UpdatesQuerier,
	auth rbac.Authorizer,
)

Source from the content-addressed store, hash-verified

145var _ tailnet.WorkspaceUpdatesProvider = (*updatesProvider)(nil)
146
147func NewUpdatesProvider(
148 logger slog.Logger,
149 ps pubsub.Pubsub,
150 db UpdatesQuerier,
151 auth rbac.Authorizer,
152) tailnet.WorkspaceUpdatesProvider {
153 ctx, cancel := context.WithCancel(context.Background())
154 out := &updatesProvider{
155 auth: auth,
156 db: db,
157 ps: ps,
158 logger: logger,
159 ctx: ctx,
160 cancelFn: cancel,
161 }
162 return out
163}
164
165func (u *updatesProvider) Close() error {
166 u.cancelFn()

Callers 2

TestWorkspaceUpdatesFunction · 0.92
NewFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestWorkspaceUpdatesFunction · 0.74