Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: service/taskqueue/taskqueue.go

Issue 1494223002: Add API to allow you to get the non-transactional datastore or taskqueue. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix doc and naming Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « service/taskqueue/context.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package taskqueue 5 package taskqueue
6 6
7 import ( 7 import (
8 "github.com/luci/luci-go/common/errors" 8 "github.com/luci/luci-go/common/errors"
9 "golang.org/x/net/context"
10 ) 9 )
11 10
12 type taskqueueImpl struct{ RawInterface } 11 type taskqueueImpl struct{ RawInterface }
13 12
14 func (t *taskqueueImpl) NewTask(path string) *Task { 13 func (t *taskqueueImpl) NewTask(path string) *Task {
15 return &Task{Path: path} 14 return &Task{Path: path}
16 } 15 }
17 16
18 func (t *taskqueueImpl) Add(task *Task, queueName string) error { 17 func (t *taskqueueImpl) Add(task *Task, queueName string) error {
19 return errors.SingleError(t.AddMulti([]*Task{task}, queueName)) 18 return errors.SingleError(t.AddMulti([]*Task{task}, queueName))
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 72
74 func (t *taskqueueImpl) Raw() RawInterface { 73 func (t *taskqueueImpl) Raw() RawInterface {
75 return t.RawInterface 74 return t.RawInterface
76 } 75 }
77 76
78 func (t *taskqueueImpl) Testable() Testable { 77 func (t *taskqueueImpl) Testable() Testable {
79 return t.RawInterface.Testable() 78 return t.RawInterface.Testable()
80 } 79 }
81 80
82 var _ Interface = (*taskqueueImpl)(nil) 81 var _ Interface = (*taskqueueImpl)(nil)
83
84 // Get gets the Interface implementation from context.
85 func Get(c context.Context) Interface {
86 return &taskqueueImpl{GetRaw(c)}
87 }
OLDNEW
« no previous file with comments | « service/taskqueue/context.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698