Age | Commit message (Collapse) | Author |
|
And ensure every user obtains HashFunction from corresponding IExecutionApi
|
|
Although references give an additional information about ownership, they introduce additional design difficulties.
|
|
|
|
Despite the fact that HashFunction is a small type, it still makes sense to store it by reference to reflect the ownership. StorageConfig becomes the main holder.
Reference holders store HashFunction by const ref and aren't allowed to change it. However, they are free to return HashFunction by value since this doesn't benefit readability anyhow.
|
|
This will allow for ApiBundle to be used together with the TestApi
implementation of IExecutionApi in tests.
Also rename CreateRemote method to MakeRemote in order to remove
any semantical confusion.
|
|
|
|
The CreateRemote method is also updated to receive all
remote-related information as arguments, such that it does not have
to rely on the ApiBundle internal fields which will eventually be
removed.
|
|
|
|
|
|
Also store a const ref for usage in setting up a fresh ApiBundle
during target serve.
|
|
...and store it as a const ref for subsequent use wherever the apis
are already passed.
|
|
|
|
|
|
Use a builder pattern for creation and validation, in a manner that
allows also other authentication methods to be added in the future
besides the current TLS/SSL.
The main Auth instances are built early and then passed by not_null
const pointers, to avoid passing temporaries, replacing the previous
Auth::TLS instances passed by simple nullable const pointers. Where
needed, these passed Auth instances are also stored, by const ref.
Tests also build Auth instances as needed, either with the default
'no certification' or from the test environment arguments.
|
|
|
|
...instead of std::optional<gsl::not_null<RepositoryConfig const*>>.
|
|
...and use it in ApiBundle.
|
|
|
|
...to properly fallback to local api if needed.
|