zos
zos copied to clipboard
document all of the external services that zos works against
all of them and behavior if any of them is down and track if we have retry mechanism and alternative backends or not
other than documenting, the other way is to let the code speak for itself in easy way. A quick idea
create external services package, lets say the name is extsrv.
// mention the name and URLs there
var Services = map[string]ExtService {
"a" : {"Url: "http://a.com", Retry: true},
"b" : {Url: "http://b.com", Retry: false},
}
// Retry Wrapper
func RetryWrapper(s ExtService, f func(...)) {
if !s.Retry {
f()
}
// Call Retry func here
}
The other way is to simply list the URL in that package, and document there.