LoadAll returns the parsed route definitions found in the file.
()
| 102 | |
| 103 | // LoadAll returns the parsed route definitions found in the file. |
| 104 | func (client *remoteEskipFile) LoadAll() ([]*eskip.Route, error) { |
| 105 | var err error = nil |
| 106 | |
| 107 | if client.preloaded { |
| 108 | client.preloaded = false |
| 109 | } else { |
| 110 | err = client.DownloadRemoteFile() |
| 111 | } |
| 112 | |
| 113 | if err != nil { |
| 114 | log.Errorf("LoadAll from remote %s failed. Continue using the last loaded routes", client.remotePath) |
| 115 | return nil, err |
| 116 | } |
| 117 | |
| 118 | if client.verbose { |
| 119 | log.Infof("New routes file %s was downloaded", client.remotePath) |
| 120 | } |
| 121 | |
| 122 | return client.eskipFileClient.LoadAll() |
| 123 | } |
| 124 | |
| 125 | // LoadUpdate returns differential updates when a remote file has changed. |
| 126 | func (client *remoteEskipFile) LoadUpdate() ([]*eskip.Route, []string, error) { |
nothing calls this directly
no test coverage detected