Documentation ¶
Index ¶
- func DirHasOpenDocuments(txn *memdb.Txn, dirHandle document.DirHandle) (bool, error)
- func IsRecordNotFound(err error) bool
- func IsTimeType(k reflect.Kind) (okay bool)
- func JobsExistForDirHandle(txn *memdb.Txn, dir document.DirHandle) (<-chan struct{}, bool, error)
- func NewBuiltInProvider(name string) tfaddr.Provider
- func NewDefaultProvider(name string) tfaddr.Provider
- func NewLegacyProvider(name string) tfaddr.Provider
- func PreloadSchemaForProviderAddr(ctx context.Context, pAddr tfaddr.Provider, fs fs.ReadDirFS, ...) error
- type AlreadyExistsError
- type ChangeBatch
- type ChangeStore
- type Changes
- type DirHandleFieldIndexer
- type DocumentStore
- func (s *DocumentStore) CloseDocument(dh document.Handle) error
- func (s *DocumentStore) GetDocument(dh document.Handle) (*document.Document, error)
- func (s *DocumentStore) HasOpenDocuments(dirHandle document.DirHandle) (bool, error)
- func (s *DocumentStore) IsDocumentOpen(dh document.Handle) (bool, error)
- func (s *DocumentStore) ListDocumentsInDir(dirHandle document.DirHandle) ([]*document.Document, error)
- func (s *DocumentStore) OpenDocument(dh document.Handle, langId string, version int, text []byte) error
- func (s *DocumentStore) UpdateDocument(dh document.Handle, newText []byte, newVersion int) error
- type InstalledProviders
- type JobIdSliceIndex
- type JobPriorityIndex
- type JobStore
- func (js *JobStore) AwaitNextJob(ctx context.Context, priority job.JobPriority) (context.Context, job.ID, job.Job, error)
- func (js *JobStore) DequeueJobsForDir(dir document.DirHandle) error
- func (js *JobStore) EnqueueJob(ctx context.Context, newJob job.Job) (job.ID, error)
- func (js *JobStore) FinishJob(id job.ID, jobErr error, deferredJobIds ...job.ID) error
- func (js *JobStore) ListAllJobs() (job.IDs, error)
- func (js *JobStore) ListIncompleteJobsForDir(dir document.DirHandle) (job.IDs, error)
- func (js *JobStore) ListQueuedJobs() (job.IDs, error)
- func (js *JobStore) WaitForJobs(ctx context.Context, ids ...job.ID) error
- type LocalSchemaSource
- type NoSchemaError
- type PathAwaiter
- type PathContext
- type PathState
- type PreloadedSchemaSource
- type ProviderIds
- type ProviderSchema
- type ProviderSchemaIterator
- type ProviderSchemaStore
- func (s *ProviderSchemaStore) AddLocalSchema(modPath string, addr tfaddr.Provider, schema *tfschema.ProviderSchema) error
- func (s *ProviderSchemaStore) AddPreloadedSchema(addr tfaddr.Provider, pv *version.Version, schema *tfschema.ProviderSchema) error
- func (s *ProviderSchemaStore) AllSchemasExist(pvm map[tfaddr.Provider]version.Constraints) (bool, error)
- func (s *ProviderSchemaStore) GetProviderID(addr tfaddr.Provider) (string, error)
- func (s *ProviderSchemaStore) ListSchemas() (*ProviderSchemaIterator, error)
- func (s *ProviderSchemaStore) MissingSchemas(pvm map[tfaddr.Provider]version.Constraints) ([]tfaddr.Provider, error)
- func (s *ProviderSchemaStore) ProviderSchema(modPath string, addr tfaddr.Provider, vc version.Constraints) (*tfschema.ProviderSchema, error)
- func (s *ProviderSchemaStore) UpdateProviderVersions(modPath string, pv map[tfaddr.Provider]*version.Version) error
- type RecordNotFoundError
- type RegistryModuleData
- type RegistryModuleStore
- func (s *RegistryModuleStore) Cache(sourceAddr tfaddr.Module, modVer *version.Version, inputs []registry.Input, ...) error
- func (s *RegistryModuleStore) CacheError(sourceAddr tfaddr.Module) error
- func (s *RegistryModuleStore) Exists(sourceAddr tfaddr.Module, constraint version.Constraints) (bool, error)
- func (s *RegistryModuleStore) RegistryModuleMeta(addr tfaddr.Module, cons version.Constraints) (*registry.ModuleData, error)
- type ScheduledJob
- type SchemaSource
- type SliceLengthIndex
- type State
- type StateStore
- type StringerFieldIndexer
- type TimeFieldIndex
- type VersionFieldIndexer
- type WalkerPath
- type WalkerPathStore
- func (wps *WalkerPathStore) AwaitNextDir(ctx context.Context, openDir bool) (*WalkerPath, error)
- func (wps *WalkerPathStore) DequeueDir(dir document.DirHandle) error
- func (wps *WalkerPathStore) EnqueueDir(ctx context.Context, dir document.DirHandle) error
- func (wps *WalkerPathStore) RemoveDir(dir document.DirHandle) error
- func (wps *WalkerPathStore) WaitForDirs(ctx context.Context, dirs []document.DirHandle) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirHasOpenDocuments ¶ added in v0.34.0
func IsRecordNotFound ¶ added in v0.34.0
func IsTimeType ¶ added in v0.28.0
IsTimeType returns whether the passed type is a type of time.Time.
func JobsExistForDirHandle ¶ added in v0.34.0
func NewBuiltInProvider ¶ added in v0.29.0
func NewDefaultProvider ¶ added in v0.29.0
func NewLegacyProvider ¶ added in v0.29.0
Types ¶
type AlreadyExistsError ¶
type AlreadyExistsError struct {
Idx string
}
func (*AlreadyExistsError) Error ¶
func (e *AlreadyExistsError) Error() string
type ChangeBatch ¶ added in v0.34.0
type ChangeBatch struct { DirHandle document.DirHandle FirstChangeTime time.Time IsDirOpen bool Changes Changes }
func (ChangeBatch) Copy ¶ added in v0.34.0
func (mcb ChangeBatch) Copy() ChangeBatch
type ChangeStore ¶ added in v0.34.0
type ChangeStore struct { // TimeProvider provides current time (for mocking time.Now in tests) TimeProvider func() time.Time // contains filtered or unexported fields }
func (*ChangeStore) AwaitNextChangeBatch ¶ added in v0.34.0
func (s *ChangeStore) AwaitNextChangeBatch(ctx context.Context) (ChangeBatch, error)
func (*ChangeStore) QueueChange ¶ added in v0.34.0
func (s *ChangeStore) QueueChange(dir document.DirHandle, changes Changes) error
type DirHandleFieldIndexer ¶ added in v0.26.0
type DirHandleFieldIndexer struct {
Field string
}
func (*DirHandleFieldIndexer) FromArgs ¶ added in v0.26.0
func (s *DirHandleFieldIndexer) FromArgs(args ...interface{}) ([]byte, error)
func (*DirHandleFieldIndexer) FromObject ¶ added in v0.26.0
func (s *DirHandleFieldIndexer) FromObject(obj interface{}) (bool, []byte, error)
func (*DirHandleFieldIndexer) PrefixFromArgs ¶ added in v0.26.0
func (s *DirHandleFieldIndexer) PrefixFromArgs(args ...interface{}) ([]byte, error)
type DocumentStore ¶ added in v0.26.0
type DocumentStore struct { // TimeProvider provides current time (for mocking time.Now in tests) TimeProvider func() time.Time // contains filtered or unexported fields }
func (*DocumentStore) CloseDocument ¶ added in v0.26.0
func (s *DocumentStore) CloseDocument(dh document.Handle) error
func (*DocumentStore) GetDocument ¶ added in v0.26.0
func (*DocumentStore) HasOpenDocuments ¶ added in v0.26.0
func (s *DocumentStore) HasOpenDocuments(dirHandle document.DirHandle) (bool, error)
func (*DocumentStore) IsDocumentOpen ¶ added in v0.26.0
func (s *DocumentStore) IsDocumentOpen(dh document.Handle) (bool, error)
func (*DocumentStore) ListDocumentsInDir ¶ added in v0.26.0
func (*DocumentStore) OpenDocument ¶ added in v0.26.0
func (*DocumentStore) UpdateDocument ¶ added in v0.26.0
type InstalledProviders ¶ added in v0.25.2
func (InstalledProviders) Equals ¶ added in v0.25.2
func (ip InstalledProviders) Equals(p InstalledProviders) bool
type JobIdSliceIndex ¶ added in v0.29.0
type JobIdSliceIndex struct {
Field string
}
func (*JobIdSliceIndex) FromArgs ¶ added in v0.29.0
func (s *JobIdSliceIndex) FromArgs(args ...interface{}) ([]byte, error)
func (*JobIdSliceIndex) FromObject ¶ added in v0.29.0
func (s *JobIdSliceIndex) FromObject(obj interface{}) (bool, [][]byte, error)
func (*JobIdSliceIndex) PrefixFromArgs ¶ added in v0.29.0
func (s *JobIdSliceIndex) PrefixFromArgs(args ...interface{}) ([]byte, error)
type JobPriorityIndex ¶ added in v0.29.0
func (*JobPriorityIndex) FromArgs ¶ added in v0.29.0
func (jpi *JobPriorityIndex) FromArgs(args ...interface{}) ([]byte, error)
func (*JobPriorityIndex) FromObject ¶ added in v0.29.0
func (jpi *JobPriorityIndex) FromObject(obj interface{}) (bool, []byte, error)
type JobStore ¶ added in v0.26.0
type JobStore struct {
// contains filtered or unexported fields
}
func (*JobStore) AwaitNextJob ¶ added in v0.26.0
func (*JobStore) DequeueJobsForDir ¶ added in v0.26.0
func (*JobStore) EnqueueJob ¶ added in v0.26.0
func (*JobStore) ListIncompleteJobsForDir ¶ added in v0.34.0
func (*JobStore) ListQueuedJobs ¶ added in v0.26.0
type LocalSchemaSource ¶
type LocalSchemaSource struct {
ModulePath string
}
func (LocalSchemaSource) String ¶
func (lss LocalSchemaSource) String() string
type NoSchemaError ¶
type NoSchemaError struct{}
func (*NoSchemaError) Error ¶
func (e *NoSchemaError) Error() string
type PathAwaiter ¶ added in v0.27.0
type PathAwaiter struct {
// contains filtered or unexported fields
}
func NewPathAwaiter ¶ added in v0.27.0
func NewPathAwaiter(wps *WalkerPathStore, openDir bool) *PathAwaiter
func (*PathAwaiter) AwaitNextDir ¶ added in v0.27.0
type PathContext ¶ added in v0.31.4
type PathContext struct { }
type PreloadedSchemaSource ¶
type PreloadedSchemaSource struct { }
func (PreloadedSchemaSource) String ¶
func (PreloadedSchemaSource) String() string
type ProviderIds ¶ added in v0.24.0
type ProviderSchema ¶
type ProviderSchema struct { Address tfaddr.Provider Version *version.Version Source SchemaSource Schema *tfschema.ProviderSchema }
func (*ProviderSchema) Copy ¶ added in v0.17.1
func (ps *ProviderSchema) Copy() *ProviderSchema
type ProviderSchemaIterator ¶
type ProviderSchemaIterator struct {
// contains filtered or unexported fields
}
func (*ProviderSchemaIterator) Next ¶
func (psi *ProviderSchemaIterator) Next() *ProviderSchema
type ProviderSchemaStore ¶
type ProviderSchemaStore struct {
// contains filtered or unexported fields
}
func (*ProviderSchemaStore) AddLocalSchema ¶
func (s *ProviderSchemaStore) AddLocalSchema(modPath string, addr tfaddr.Provider, schema *tfschema.ProviderSchema) error
func (*ProviderSchemaStore) AddPreloadedSchema ¶
func (s *ProviderSchemaStore) AddPreloadedSchema(addr tfaddr.Provider, pv *version.Version, schema *tfschema.ProviderSchema) error
func (*ProviderSchemaStore) AllSchemasExist ¶ added in v0.29.0
func (s *ProviderSchemaStore) AllSchemasExist(pvm map[tfaddr.Provider]version.Constraints) (bool, error)
func (*ProviderSchemaStore) GetProviderID ¶ added in v0.34.0
func (s *ProviderSchemaStore) GetProviderID(addr tfaddr.Provider) (string, error)
func (*ProviderSchemaStore) ListSchemas ¶
func (s *ProviderSchemaStore) ListSchemas() (*ProviderSchemaIterator, error)
func (*ProviderSchemaStore) MissingSchemas ¶ added in v0.29.3
func (s *ProviderSchemaStore) MissingSchemas(pvm map[tfaddr.Provider]version.Constraints) ([]tfaddr.Provider, error)
MissingSchemas checks which schemas are missing in order to preload them from the bundled schemas. Since we don't know the version of a schema on disk before loading it, we assume it's good to just load it by address and ignore the version constraints.
func (*ProviderSchemaStore) ProviderSchema ¶
func (s *ProviderSchemaStore) ProviderSchema(modPath string, addr tfaddr.Provider, vc version.Constraints) (*tfschema.ProviderSchema, error)
func (*ProviderSchemaStore) UpdateProviderVersions ¶ added in v0.34.0
func (s *ProviderSchemaStore) UpdateProviderVersions(modPath string, pv map[tfaddr.Provider]*version.Version) error
type RecordNotFoundError ¶ added in v0.34.0
type RecordNotFoundError struct {
Source string
}
func (*RecordNotFoundError) Error ¶ added in v0.34.0
func (e *RecordNotFoundError) Error() string
type RegistryModuleData ¶ added in v0.29.0
type RegistryModuleStore ¶ added in v0.29.0
type RegistryModuleStore struct {
// contains filtered or unexported fields
}
func (*RegistryModuleStore) CacheError ¶ added in v0.31.1
func (s *RegistryModuleStore) CacheError(sourceAddr tfaddr.Module) error
func (*RegistryModuleStore) Exists ¶ added in v0.29.0
func (s *RegistryModuleStore) Exists(sourceAddr tfaddr.Module, constraint version.Constraints) (bool, error)
func (*RegistryModuleStore) RegistryModuleMeta ¶ added in v0.34.0
func (s *RegistryModuleStore) RegistryModuleMeta(addr tfaddr.Module, cons version.Constraints) (*registry.ModuleData, error)
type ScheduledJob ¶ added in v0.26.0
type ScheduledJob struct { job.ID job.Job IsDirOpen bool State State // JobErr contains error when job finishes (State = StateDone) JobErr error // DeferredJobIDs contains IDs of any deferred jobs // set when job finishes (State = StateDone) DeferredJobIDs job.IDs // EnqueueTime tracks time when the job was originally put into the queue EnqueueTime time.Time // TraceSpan represents a tracing span for the entire job lifecycle // (from queuing to finishing execution). TraceSpan trace.Span // DocumentContext contains information from when & where the job was scheduled from DocumentContext lsctx.Document }
func (*ScheduledJob) Copy ¶ added in v0.26.0
func (sj *ScheduledJob) Copy() *ScheduledJob
type SchemaSource ¶
type SchemaSource interface { String() string // contains filtered or unexported methods }
type SliceLengthIndex ¶ added in v0.29.0
type SliceLengthIndex struct {
Field string
}
func (*SliceLengthIndex) FromArgs ¶ added in v0.29.0
func (s *SliceLengthIndex) FromArgs(args ...interface{}) ([]byte, error)
func (*SliceLengthIndex) FromObject ¶ added in v0.29.0
func (s *SliceLengthIndex) FromObject(obj interface{}) (bool, []byte, error)
type StateStore ¶
type StateStore struct { ChangeStore *ChangeStore DocumentStore *DocumentStore JobStore *JobStore ProviderSchemas *ProviderSchemaStore WalkerPaths *WalkerPathStore RegistryModules *RegistryModuleStore // contains filtered or unexported fields }
func NewStateStore ¶
func NewStateStore() (*StateStore, error)
func (*StateStore) SetLogger ¶ added in v0.16.1
func (s *StateStore) SetLogger(logger *log.Logger)
type StringerFieldIndexer ¶
type StringerFieldIndexer struct {
Field string
}
func (*StringerFieldIndexer) FromArgs ¶
func (s *StringerFieldIndexer) FromArgs(args ...interface{}) ([]byte, error)
func (*StringerFieldIndexer) FromObject ¶
func (s *StringerFieldIndexer) FromObject(obj interface{}) (bool, []byte, error)
func (*StringerFieldIndexer) PrefixFromArgs ¶
func (s *StringerFieldIndexer) PrefixFromArgs(args ...interface{}) ([]byte, error)
type TimeFieldIndex ¶ added in v0.28.0
type TimeFieldIndex struct {
Field string
}
TimeFieldIndex is used to extract a time.Time field from an object using reflection and builds an index on that field.
func (*TimeFieldIndex) FromArgs ¶ added in v0.28.0
func (u *TimeFieldIndex) FromArgs(args ...interface{}) ([]byte, error)
func (*TimeFieldIndex) FromObject ¶ added in v0.28.0
func (u *TimeFieldIndex) FromObject(obj interface{}) (bool, []byte, error)
type VersionFieldIndexer ¶
type VersionFieldIndexer struct {
Field string
}
func (*VersionFieldIndexer) FromArgs ¶
func (s *VersionFieldIndexer) FromArgs(args ...interface{}) ([]byte, error)
func (*VersionFieldIndexer) FromObject ¶
func (s *VersionFieldIndexer) FromObject(obj interface{}) (bool, []byte, error)
func (*VersionFieldIndexer) PrefixFromArgs ¶
func (s *VersionFieldIndexer) PrefixFromArgs(args ...interface{}) ([]byte, error)
type WalkerPath ¶ added in v0.27.0
type WalkerPath struct { Dir document.DirHandle IsDirOpen bool State PathState EnqueueContext trace.SpanContext }
func (*WalkerPath) Copy ¶ added in v0.27.0
func (wp *WalkerPath) Copy() *WalkerPath
type WalkerPathStore ¶ added in v0.27.0
type WalkerPathStore struct {
// contains filtered or unexported fields
}
func (*WalkerPathStore) AwaitNextDir ¶ added in v0.27.0
func (wps *WalkerPathStore) AwaitNextDir(ctx context.Context, openDir bool) (*WalkerPath, error)
func (*WalkerPathStore) DequeueDir ¶ added in v0.27.0
func (wps *WalkerPathStore) DequeueDir(dir document.DirHandle) error
func (*WalkerPathStore) EnqueueDir ¶ added in v0.27.0
func (*WalkerPathStore) RemoveDir ¶ added in v0.27.0
func (wps *WalkerPathStore) RemoveDir(dir document.DirHandle) error
func (*WalkerPathStore) WaitForDirs ¶ added in v0.27.0
Source Files ¶
- changes.go
- dir_handle_field_indexer.go
- documents.go
- errors.go
- installed_providers.go
- job_id_slice_index.go
- jobs.go
- jobs_state_string.go
- path_state_string.go
- priority_index.go
- provider_ids.go
- provider_schema.go
- registry_modules.go
- schema_source.go
- slice_length_index.go
- state.go
- stringer_field_indexer.go
- time_field_index.go
- version_field_indexer.go
- walker_paths.go
Click to show internal directories.
Click to hide internal directories.