zos icon indicating copy to clipboard operation
zos copied to clipboard

document all of the external services that zos works against

Open xmonader opened this issue 1 year ago • 1 comments

all of them and behavior if any of them is down and track if we have retry mechanism and alternative backends or not

xmonader avatar Nov 11 '24 10:11 xmonader

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.

iwanbk avatar Nov 11 '24 11:11 iwanbk