gitlab.com/jfprevost/gitlab-runner-notlscheck@v11.11.4+incompatible/common/trace.go (about) 1 package common 2 3 import ( 4 "context" 5 "io" 6 "os" 7 "sync" 8 ) 9 10 type Trace struct { 11 Writer io.Writer 12 CancelFunc context.CancelFunc 13 mutex sync.Mutex 14 } 15 16 func (s *Trace) Write(p []byte) (n int, err error) { 17 s.mutex.Lock() 18 defer s.mutex.Unlock() 19 20 if s.Writer == nil { 21 return 0, os.ErrInvalid 22 } 23 return s.Writer.Write(p) 24 } 25 26 func (s *Trace) SetMasked(values []string) { 27 } 28 29 func (s *Trace) Success() { 30 } 31 32 func (s *Trace) Fail(err error, failureReason JobFailureReason) { 33 } 34 35 func (s *Trace) SetCancelFunc(cancelFunc context.CancelFunc) { 36 s.CancelFunc = cancelFunc 37 } 38 39 func (s *Trace) SetFailuresCollector(fc FailuresCollector) {} 40 41 func (s *Trace) IsStdout() bool { 42 return true 43 }