summaryrefslogtreecommitdiffstats
path: root/state/state.go
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2021-12-13 21:31:59 -0500
committersiddharth <s@ricketyspace.net>2021-12-13 21:31:59 -0500
commit9575ec614a5b0b0a0536e644fb426955ead01f08 (patch)
tree393632d26497032963c495db85fa0d0a2708c041 /state/state.go
parent1472b8e4bcde779735fd7faed06f2131a5f29a60 (diff)
state/state.go: add docs
Diffstat (limited to 'state/state.go')
-rw-r--r--state/state.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/state/state.go b/state/state.go
index c37a74b..7c67bdb 100644
--- a/state/state.go
+++ b/state/state.go
@@ -19,6 +19,8 @@ type EntryResult struct {
Err error // Set on error
}
+// Paraphernalia passed and shared between go routines that process
+// the feeds.
type ProcessState struct {
// Tracks entries that have already been downloaded.
DB *db.FernDB
@@ -28,6 +30,7 @@ type ProcessState struct {
FeedResultChan chan FeedResult
}
+// Creates an instance of ProcessState and returns a pointer to it.
func NewProcessState() *ProcessState {
ps := new(ProcessState)
ps.FeedResultChan = make(chan FeedResult)