MCPcopy Index your code
hub / github.com/riverqueue/river / Queue

Function Queue

rivershared/testfactory/test_factory.go:165–186  ·  view source on GitHub ↗
(ctx context.Context, tb testing.TB, exec riverdriver.Executor, opts *QueueOpts)

Source from the content-addressed store, hash-verified

163}
164
165func Queue(ctx context.Context, tb testing.TB, exec riverdriver.Executor, opts *QueueOpts) *rivertype.Queue {
166 tb.Helper()
167
168 if opts == nil {
169 opts = &QueueOpts{}
170 }
171
172 metadata := opts.Metadata
173 if len(opts.Metadata) == 0 {
174 metadata = []byte("{}")
175 }
176
177 queue, err := exec.QueueCreateOrSetUpdatedAt(ctx, &riverdriver.QueueCreateOrSetUpdatedAtParams{
178 Metadata: metadata,
179 Name: ptrutil.ValOrDefaultFunc(opts.Name, func() string { return fmt.Sprintf("queue_%05d", nextSeq()) }),
180 PausedAt: opts.PausedAt,
181 Schema: opts.Schema,
182 UpdatedAt: opts.UpdatedAt,
183 })
184 require.NoError(tb, err)
185 return queue
186}

Callers 13

Test_Client_CommonFunction · 0.92
Test_Client_MaintenanceFunction · 0.92
Test_Client_QueueGetFunction · 0.92
Test_Client_QueueGetTxFunction · 0.92
Test_Client_QueueListFunction · 0.92
Test_Client_QueueListTxFunction · 0.92
Test_Client_QueueUpdateFunction · 0.92
testProducerFunction · 0.92
ExerciseClientFunction · 0.92
exerciseMigrationFunction · 0.92
exerciseQueueFunction · 0.92

Calls 4

ValOrDefaultFuncFunction · 0.92
nextSeqFunction · 0.85
HelperMethod · 0.65

Tested by 11

Test_Client_CommonFunction · 0.74
Test_Client_MaintenanceFunction · 0.74
Test_Client_QueueGetFunction · 0.74
Test_Client_QueueGetTxFunction · 0.74
Test_Client_QueueListFunction · 0.74
Test_Client_QueueListTxFunction · 0.74
Test_Client_QueueUpdateFunction · 0.74
testProducerFunction · 0.74
ExerciseClientFunction · 0.74
TestQueueCleanerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…