github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/pkg/progress/report.go (about) 1 // Copyright 2021 The TrueBlocks Authors. All rights reserved. 2 // Use of this source code is governed by a license that can 3 // be found in the LICENSE file. 4 5 package progress 6 7 type Event uint 8 9 const ( 10 BeforeStart Event = iota 11 Start 12 Update 13 Finished 14 Error 15 AllDone 16 Cancelled 17 ) 18 19 type ProgressMsg struct { 20 Event Event 21 Message string 22 Error error 23 Payload interface{} 24 } 25 26 func MakeChan() chan *ProgressMsg { 27 return make(chan *ProgressMsg, 100) 28 }