MCPcopy Create free account
hub / github.com/facebook/time / FetchSettings

Method FetchSettings

calnex/api/api.go:708–721  ·  view source on GitHub ↗

FetchSettings returns the calnex settings

()

Source from the content-addressed store, hash-verified

706}
707
708// FetchSettings returns the calnex settings
709func (a *API) FetchSettings() (*ini.File, error) {
710 url := fmt.Sprintf(getSettingsURL, a.source)
711 resp, err := a.Client.Get(url)
712 if err != nil {
713 return nil, err
714 }
715 defer resp.Body.Close()
716
717 if resp.StatusCode != http.StatusOK {
718 return nil, errors.New(http.StatusText(resp.StatusCode))
719 }
720
721 return ini.Load(resp.Body)
722}
723
724// FetchStatus returns the calnex status

Callers 3

FetchUsedChannelsMethod · 0.95
TestFetchSettingsFunction · 0.95
prepareFunction · 0.80

Calls 2

CloseMethod · 0.65
GetMethod · 0.45

Tested by 1

TestFetchSettingsFunction · 0.76