NewProvider returns a new certificate provider plugin that is configured to watch the PEM files specified in the passed in options.
(o Options)
| 98 | // NewProvider returns a new certificate provider plugin that is configured to |
| 99 | // watch the PEM files specified in the passed in options. |
| 100 | func NewProvider(o Options) (certprovider.Provider, error) { |
| 101 | if err := o.validate(); err != nil { |
| 102 | return nil, err |
| 103 | } |
| 104 | return newProvider(o), nil |
| 105 | } |
| 106 | |
| 107 | // newProvider is used to create a new certificate provider plugin after |
| 108 | // validating the options, and hence does not return an error. |