azure-container-networking/store
John Howard a386846345 Store fixes; Windows compile
Signed-off-by: John Howard <jhoward@microsoft.com>

- First, the store timeout is woefully low. Bumped to 20 seconds from 2 seconds.
  This may fix https://github.com/Azure/azure-container-networking/issues/242#issuecomment-422701838
  IMO, as only test code calls it non-blocked, why even have a block parameter to Lock()?
  IMO also, why a timeout at all? They're always fraught with error and machine timing.

- Presence of a key should be checked using `raw, ok := hvs.data[key]`, not the current nil checked

- ErrKeyNotFound should be returned if the store file does not exist. It shouldn't ignore that error.

- Actually now reports if a timeout occurred correctly, along with non-block lock attempt when already locked.

- Serial pattern abuse in not always closing the lock file.

- Some golang correctness (errors should be lower case)

- go build ./... actually passes on Windows now - various compile errors previously.

- golang pattern conformance `if err:=<test>; err!=nil {....`

- Simplified timeout duration (no need for time.Duration(...))
2018-09-19 15:30:36 -07:00
..
json.go Store fixes; Windows compile 2018-09-19 15:30:36 -07:00
json_test.go Added license notice to all source files 2017-02-12 02:03:39 -08:00
store.go Store fixes; Windows compile 2018-09-19 15:30:36 -07:00