|
libzypp 17.38.7
|
Manages a data source characterized by an authoritative URL and a list of mirror URLs. More...
#include <zypp-core/MirroredOrigin.h>
Classes | |
| class | iter |
| struct | Private |
Public Types | |
| using | endpoint_iterator = iter<MirroredOrigin, OriginEndpoint> |
| using | endpoint_const_iterator = iter<MirroredOrigin const, OriginEndpoint const> |
Public Member Functions | |
| MirroredOrigin () | |
| MirroredOrigin (OriginEndpoint authority, std::vector< OriginEndpoint > mirrors={}) | |
| void | setAuthority (OriginEndpoint newAuthority) |
| const std::vector< OriginEndpoint > & | authorities () const |
| const OriginEndpoint & | authority () const |
| const std::vector< OriginEndpoint > & | mirrors () const |
| bool | isValid () const |
| bool | addAuthority (OriginEndpoint newAuthority) |
| bool | addMirror (OriginEndpoint newMirror) |
| void | setMirrors (std::vector< OriginEndpoint > mirrors) |
| void | clearMirrors () |
| std::string | scheme () const |
| bool | schemeIsDownloading () const |
| endpoint_iterator | begin () |
| endpoint_iterator | end () |
| endpoint_const_iterator | begin () const |
| endpoint_const_iterator | end () const |
| uint | endpointCount () const |
| uint | authorityCount () const |
| const OriginEndpoint & | operator[] (uint index) const |
| OriginEndpoint & | operator[] (uint index) |
| const OriginEndpoint & | at (uint index) const |
| OriginEndpoint & | at (uint index) |
Private Attributes | |
| RWCOW_pointer< Private > | _pimpl |
Manages a data source characterized by an authoritative URL and a list of mirror URLs.
A MirroredOrigin object encapsulates the access information for a data source that has a primary (authoritative) access point and potentially multiple alternative (mirror) access points. This class is designed to be generic and can be used for various types of data sources where redundancy or alternative access points are needed.
The core components managed by MirroredOrigin are:
Beyond just the URLs, this class can be extended or used in conjunction with mechanisms to store configuration settings pertinent to accessing these URLs (e.g., priorities, credentials, retry strategies). This makes it a more comprehensive definition for a data endpoint than a simple URL string.
This class provides a structured way to handle primary and alternative locations for any resource that might be replicated.
Definition at line 170 of file MirroredOrigin.h.
Definition at line 216 of file MirroredOrigin.h.
| using zypp::MirroredOrigin::endpoint_const_iterator = iter<MirroredOrigin const, OriginEndpoint const> |
Definition at line 217 of file MirroredOrigin.h.
| zypp::MirroredOrigin::MirroredOrigin | ( | ) |
Definition at line 155 of file MirroredOrigin.cc.
| zypp::MirroredOrigin::MirroredOrigin | ( | OriginEndpoint | authority, |
| std::vector< OriginEndpoint > | mirrors = {} ) |
Definition at line 159 of file MirroredOrigin.cc.
| void zypp::MirroredOrigin::setAuthority | ( | OriginEndpoint | newAuthority | ) |
Changes the authorities to newAuthority
Definition at line 170 of file MirroredOrigin.cc.
| const std::vector< OriginEndpoint > & zypp::MirroredOrigin::authorities | ( | ) | const |
Definition at line 200 of file MirroredOrigin.cc.
| const OriginEndpoint & zypp::MirroredOrigin::authority | ( | ) | const |
Definition at line 205 of file MirroredOrigin.cc.
| const std::vector< OriginEndpoint > & zypp::MirroredOrigin::mirrors | ( | ) | const |
Definition at line 214 of file MirroredOrigin.cc.
| bool zypp::MirroredOrigin::isValid | ( | ) | const |
Definition at line 219 of file MirroredOrigin.cc.
| bool zypp::MirroredOrigin::addAuthority | ( | OriginEndpoint | newAuthority | ) |
Definition at line 224 of file MirroredOrigin.cc.
| bool zypp::MirroredOrigin::addMirror | ( | OriginEndpoint | newMirror | ) |
Definition at line 252 of file MirroredOrigin.cc.
| void zypp::MirroredOrigin::setMirrors | ( | std::vector< OriginEndpoint > | mirrors | ) |
Definition at line 285 of file MirroredOrigin.cc.
| void zypp::MirroredOrigin::clearMirrors | ( | ) |
Definition at line 292 of file MirroredOrigin.cc.
| std::string zypp::MirroredOrigin::scheme | ( | ) | const |
Definition at line 297 of file MirroredOrigin.cc.
| bool zypp::MirroredOrigin::schemeIsDownloading | ( | ) | const |
Definition at line 304 of file MirroredOrigin.cc.
|
inline |
A iterator over all endpoints, including authority at index 0
Definition at line 265 of file MirroredOrigin.h.
|
inline |
End iterator over all endpoints, including authority at index 0
Definition at line 272 of file MirroredOrigin.h.
|
inline |
Definition at line 276 of file MirroredOrigin.h.
|
inline |
Definition at line 280 of file MirroredOrigin.h.
| uint zypp::MirroredOrigin::endpointCount | ( | ) | const |
Definition at line 311 of file MirroredOrigin.cc.
| uint zypp::MirroredOrigin::authorityCount | ( | ) | const |
Definition at line 316 of file MirroredOrigin.cc.
|
inline |
Index based access to endpoints, index 0 is always the authority
| std::out_of_range | on a out of range index param |
Definition at line 298 of file MirroredOrigin.h.
|
inline |
Definition at line 299 of file MirroredOrigin.h.
| const OriginEndpoint & zypp::MirroredOrigin::at | ( | uint | index | ) | const |
Index based access to endpoints, index 0 is always the authority
Definition at line 321 of file MirroredOrigin.cc.
| OriginEndpoint & zypp::MirroredOrigin::at | ( | uint | index | ) |
Definition at line 333 of file MirroredOrigin.cc.
|
private |
Definition at line 309 of file MirroredOrigin.h.