kucing
is an indonesian word for cat
an attempt to recreate kochengs with better understanding in concurrency;
in short -- an 'attempt on learning' go-concurrency and channels.
per kochengs, is still;
Will generate cat image, based from thiscatdoesnotexist
or more actually kind of will GET cat image from thiscatdoesnotexist
three modules,
download
compare
cache
and a helpers
,
- will try as many goroutine as needed for
download
andcompare
, both communicating through channels,download
will be a simple GET operation, passing the retrieved data to channels towardcompare
compare
will get the first data inside channels, take the parts of data as[]byte
, use it asstring
and then check it tocache
map[string]bool
=>{"SomeKindOfKeyHereFromData": true}
- if exist then return
- if nonexist (returning
false
) then save tocache
astrue
cache
will be in-memory cache, holding parts of[]byte
from the retrieved img, using it asstring
key inmap[string]bool
type
for logging;
- spin another routine for printing logs from
helpers
!! !! if everything works, make a cli
on top of it !! !!
note: these variables are being used as is for now, the part where we can change it when running this app has not yet been implemented.
key | value | desc |
---|---|---|
workersAmt |
int | amount of workers being used here. more workers = more cpu used |
jobsAmt |
int | amount of jobs being ordered to the workers . |
severityLevelPrint |
int | not yet implemented, will only print equal or more than inputted. Debug is 0, Info is 2, Fatal is 3 |
fileCodeLength |
int | filename will be kucing[xxxx].jpg , this will decide how long xxxx will be |
fileCodeSeed |
string | characters written here will be used as the base for fileCode in xxxx |