core: Un-export the LoadSchemas function
The public interface for loading schemas is Context.Schemas, which can take into account the context's records of which plugin versions and checksums we're expecting. loadSchemas is an implementation detail of that, representing the part we run only after we've verified all of the plugins.
This commit is contained in:
parent
16e8bf028a
commit
feb219a9c4
|
@ -221,7 +221,7 @@ func (c *Context) Schemas(config *configs.Config, state *states.State) (*Schemas
|
|||
}
|
||||
}
|
||||
|
||||
ret, err := LoadSchemas(config, state, c.components)
|
||||
ret, err := loadSchemas(config, state, c.components)
|
||||
if err != nil {
|
||||
diags = diags.Append(tfdiags.Sourceless(
|
||||
tfdiags.Error,
|
||||
|
|
|
@ -64,7 +64,7 @@ func (ss *Schemas) ProvisionerConfig(name string) *configschema.Block {
|
|||
return ss.Provisioners[name]
|
||||
}
|
||||
|
||||
// LoadSchemas searches the given configuration, state and plan (any of which
|
||||
// loadSchemas searches the given configuration, state and plan (any of which
|
||||
// may be nil) for constructs that have an associated schema, requests the
|
||||
// necessary schemas from the given component factory (which must _not_ be nil),
|
||||
// and returns a single object representing all of the necessary schemas.
|
||||
|
@ -74,7 +74,7 @@ func (ss *Schemas) ProvisionerConfig(name string) *configschema.Block {
|
|||
// either misbehavior on the part of one of the providers or of the provider
|
||||
// protocol itself. When returned with errors, the returned schemas object is
|
||||
// still valid but may be incomplete.
|
||||
func LoadSchemas(config *configs.Config, state *states.State, components contextComponentFactory) (*Schemas, error) {
|
||||
func loadSchemas(config *configs.Config, state *states.State, components contextComponentFactory) (*Schemas, error) {
|
||||
schemas := &Schemas{
|
||||
Providers: map[addrs.Provider]*ProviderSchema{},
|
||||
Provisioners: map[string]*configschema.Block{},
|
||||
|
|
Loading…
Reference in New Issue