container: ability to set AuthFilePath for Resolver

Add a new field `AuthFilePath` and if it is not the empty string,
it will be forwaded that information to `Client`.
This commit is contained in:
Christian Kellner 2022-07-21 18:18:35 +02:00
parent 2c0594629f
commit c2f3f76d96

View file

@ -17,7 +17,8 @@ type Resolver struct {
ctx context.Context
Arch string
Arch string
AuthFilePath string
}
func NewResolver(arch string) Resolver {
@ -39,6 +40,9 @@ func (r *Resolver) Add(source, name string, TLSVerify *bool) {
client.SetTLSVerify(TLSVerify)
client.SetArchitectureChoice(r.Arch)
if r.AuthFilePath != "" {
client.SetAuthFilePath(r.AuthFilePath)
}
go func() {
spec, err := client.Resolve(r.ctx, name)