Documentation
¶
Index ¶
- func TestPluginSync(t *testing.T, plugin *Plugin, spec specs.Source, opts ...TestPluginOption)
- 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 Plugin
- func (p *Plugin) GeneratePluginDocs(dir, format string) 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, spec specs.Source, 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
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 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) *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) 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.
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 WithTestPluginNoParallel ¶
func WithTestPluginNoParallel() TestPluginOption
Click to show internal directories.
Click to hide internal directories.