Debian Codegraph @

tasklog/simple_task.go

raw symbols SCIP
1 package tasklogscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/
2
3 import (
4 "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/"
5 "syncscip-go gomod github.com/golang/go/src go1.25.0 sync/"
6 "timescip-go gomod github.com/golang/go/src go1.25.0 time/"
7 )
8
9 // SimpleTask is in an implementation of tasklog.Task which prints out messages
10 // verbatim.
11 type SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask# struct {
12 // ch is used to transmit task updates.
13 chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#ch. chan *Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#
14
15 // wg is used to wait between closing the channel, and acknowledging
16 // that the close-related operations have been completed by the
17 // tasklog.Logger.
18 wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#wg. *syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.WaitGroupscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#
19 }
20
21 // NewSimpleTask returns a new *SimpleTask instance.
22 func NewSimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/NewSimpleTask().() *SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask# {
23 return &SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#{
24 chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#ch.: make(chan *Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#),
25 wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#wg.: new(syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.WaitGroupscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#),
26 }
27 }
28
29 // Log logs a string with no formatting verbs.
30 func (s *SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#) Logscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#Log().(str string) {
31 s.Logfscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#Logf().("%s", str)
32 }
33
34 // Logf logs some formatted string, which is interpreted according to the rules
35 // defined in package "fmt".
36 func (s *SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#) Logfscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#Logf().(str string, vals ...interface{}) {
37 s.chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#ch. <- &Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#{
38 Sscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#S.: fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().(str, vals...),
39 Atscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#At.: timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().(),
40 }
41 }
42
43 // Complete notes that the task is completed by closing the Updates channel and
44 // yields the logger to the next Task. Complete blocks until the *tasklog.Logger
45 // has acknowledged completion of this task.
46 func (s *SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#) Completescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#Complete().() {
47 s.wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#wg..Addscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Add().(1)
48 close(s.chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#ch.)
49 s.wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#wg..Waitscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Wait().()
50 }
51
52 // OnComplete implements an interface which receives a call to this method when
53 // the *tasklog.Logger has finished processing this task, but before it has
54 // accepted new tasks.
55 func (s *SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#) OnCompletescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#OnComplete().() {
56 s.wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#wg..Donescip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Done().()
57 }
58
59 // Updates implements Task.Updates and returns a channel of updates which is
60 // closed when Complete() is called.
61 func (s *SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#) Updatesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#Updates().() <-chan *Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update# {
62 return s.chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#ch.
63 }
64
65 // Throttled implements Task.Throttled and returns false, indicating that this
66 // task is not throttled.
67 func (s *SimpleTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#) Throttledscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/SimpleTask#Throttled().() bool { return false }