Commit graph

77 commits

Author SHA1 Message Date
Augusto Dwenger
54737d7ffd Change cpu to hold the time conig in a struct
Whith this change the test can now run without having to wait
for the sleep of 500 MillSec. for the CPU load reading.
2020-05-30 21:41:48 +02:00
Augusto Dwenger
0984ee437d Implement Execute interface 2020-05-30 20:14:49 +02:00
Augusto Dwenger
72f8dc672a Add interface to execute commands 2020-05-30 20:14:08 +02:00
Augusto Dwenger
3b589f25fa Rename package proc to commands 2020-05-30 17:50:20 +02:00
Augusto Dwenger
381ee43bb7 Add struct to hold the cpu data for the json return 2020-05-30 17:46:56 +02:00
Augusto Dwenger
8b6232d1ee Add test for the Error func of the BaseError 2020-05-30 15:55:40 +02:00
Augusto Dwenger
8f0ed42302 Rename types.go to baseError.go 2020-05-30 15:54:16 +02:00
Augusto Dwenger
dcb46a2a08 Add double point in the Error fun from BaseError 2020-05-30 15:45:41 +02:00
Augusto Dwenger
f1bf829c85 Fix spelling 2020-05-30 15:02:46 +02:00
Augusto Dwenger
ee6efb439a Merge branch 'feature/cpu' of github.com:hamburghammer/gstat into feature/cpu 2020-05-30 12:43:12 +02:00
Augusto Dwenger
4600dfc18a Rework the TotalCPU function
Not it isn't build to run in a goroutine trought a channel. It
directly useses the cpu implementation from gopsutil and wrappes
the error in to a BaseError.
2020-05-30 12:38:43 +02:00
Augusto Dwenger
dc1d000ed0 Implement the error interface
There was an error due to a pointer to the BaseError that
blocked the implementation of the Error interface.
2020-05-30 12:34:38 +02:00
Augusto Dwenger
4f0a8a3e34 Change testing to run as integration test
They use a static file to read the cpu infos.
2020-05-30 13:44:37 +02:00
Augusto Dwenger
ce92f41882 Add CPU reader 2020-05-29 14:38:27 +02:00
Augusto Dwenger
f2754bb570 Update project path for cstat from nhh 2020-05-29 14:35:43 +02:00
Augusto Dwenger
fe1fd389ab Implement empty args and url validation
For this validation a new function was created to check the equality
of tow Arguments structs.
2020-05-29 14:24:00 +02:00
Augusto Dwenger
64cd3b25c5 Remove Equal and fmt logging 2020-05-29 13:44:48 +02:00
Augusto Dwenger
107ee865bb Add Error function test 2020-05-29 13:43:16 +02:00
Augusto Dwenger
5f22258a63 Move validationError to own file 2020-05-28 22:17:38 +02:00
Augusto Dwenger
224b1bd915 Merge branch 'feature/flag-parsing' of github.com:/hamburghammer/gstat into feature/flag-parsing 2020-05-15 21:34:14 +02:00
Augusto Dwenger
d9e0e349b9 WIP: Implement test for the args 2020-05-09 19:33:21 +02:00
Augusto Dwenger
408a715254 WIP: Implement test for the args 2020-05-09 16:45:19 +02:00
Augusto Dwenger
5caebea005 Add CPU reader 2020-05-09 14:42:23 +02:00
Augusto Dwenger
e22273150f Add comments to the public methods/functions 2020-05-03 20:45:46 +02:00
Augusto Dwenger
52e6ff3d02 Add flag parsing 2020-05-03 16:24:05 +02:00
Augusto Dwenger
2fe0685ecf Add error type and arg type 2020-05-01 16:15:50 +02:00
Augusto Dwenger
dc04d95d02 Initial commit 2020-05-01 14:50:37 +02:00