(ctx context.Context, engine storage.Engine, path *storage.URI)
| 246 | } |
| 247 | |
| 248 | func Open(ctx context.Context, engine storage.Engine, path *storage.URI) (*Queue, error) { |
| 249 | q := New(engine, path) |
| 250 | if _, err := q.ReadHead(ctx); err != nil { |
| 251 | return nil, fmt.Errorf("%s: no such journal", path) |
| 252 | } |
| 253 | return q, nil |
| 254 | } |