Documentation ¶
Index ¶
- func TestPluginSync(t *testing.T, plugin *Plugin, spec specs.Source, opts ...TestPluginOption)
- type GetTables
- type Metrics
- func (s *Metrics) Equal(other *Metrics) bool
- func (s *Metrics) TotalErrors() uint64
- func (s *Metrics) TotalErrorsAtomic() uint64
- func (s *Metrics) TotalPanics() uint64
- func (s *Metrics) TotalPanicsAtomic() uint64
- func (s *Metrics) TotalResources() uint64
- func (s *Metrics) TotalResourcesAtomic() uint64
- type NewExecutionClientFunc
- type Option
- type Options
- type Plugin
- func (p *Plugin) Close(ctx context.Context) error
- func (p *Plugin) GeneratePluginDocs(dir, format string) error
- func (p *Plugin) GetDynamicTables() schema.Tables
- func (p *Plugin) HasDynamicTables() bool
- func (p *Plugin) Init(ctx context.Context, spec specs.Source) error
- func (p *Plugin) Metrics() *Metrics
- func (p *Plugin) Name() string
- func (p *Plugin) SetLogger(logger zerolog.Logger)
- func (p *Plugin) Sync(ctx context.Context, res chan<- *schema.Resource) error
- func (p *Plugin) Tables() schema.Tables
- func (p *Plugin) TablesForSpec(spec specs.Source) (schema.Tables, error)
- func (p *Plugin) Version() string
- type TableClientMetrics
- type TestPluginOption
- type UnmanagedClient
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestPluginSync ¶
Types ¶
type Metrics ¶
type Metrics struct {
TableClient map[string]map[string]*TableClientMetrics
}
func (*Metrics) TotalErrors ¶
func (*Metrics) TotalErrorsAtomic ¶ added in v1.14.0
func (*Metrics) TotalPanics ¶
func (*Metrics) TotalPanicsAtomic ¶ added in v1.14.0
func (*Metrics) TotalResources ¶
func (*Metrics) TotalResourcesAtomic ¶ added in v1.14.0
type NewExecutionClientFunc ¶
type Option ¶ added in v1.24.0
type Option func(*Plugin)
func WithDynamicTableOption ¶ added in v1.28.0
WithDynamicTableOption allows the plugin to return list of tables after call to New
func WithNoInternalColumns ¶ added in v1.37.0
func WithNoInternalColumns() Option
WithNoInternalColumns won't add internal columns (_cq_id, _cq_parent_cq_id) to the plugin tables
func WithUnmanaged ¶ added in v1.37.0
func WithUnmanaged() Option
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin is the base structure required to pass to sdk.serve We take a declarative approach to API here similar to Cobra
func NewPlugin ¶
func NewPlugin(name string, version string, tables []*schema.Table, newExecutionClient NewExecutionClientFunc, options ...Option) *Plugin
NewPlugin returns a new plugin with a given name, version, tables, newExecutionClient and additional options.
func (*Plugin) GeneratePluginDocs ¶
GeneratePluginDocs creates table documentation for the source plugin based on its list of tables
func (*Plugin) GetDynamicTables ¶ added in v1.28.0
func (*Plugin) HasDynamicTables ¶ added in v1.28.0
func (*Plugin) TablesForSpec ¶
TablesForSpec returns all tables supported by this source plugin that match the given spec. It validates the tables part of the spec and will return an error if it is found to be invalid. This is deprecated method
type TableClientMetrics ¶
type TableClientMetrics struct { Resources uint64 Errors uint64 Panics uint64 StartTime time.Time EndTime time.Time }
func (*TableClientMetrics) Equal ¶
func (s *TableClientMetrics) Equal(other *TableClientMetrics) bool
type TestPluginOption ¶
type TestPluginOption func(*testPluginOptions)
func WithTestPluginAdditionalValidators ¶ added in v1.35.0
func WithTestPluginAdditionalValidators(v Validator) TestPluginOption
func WithTestPluginNoParallel ¶
func WithTestPluginNoParallel() TestPluginOption