README

#PLEASE NOTE: These are not example plugins

The contents of plugin/ are used as part of our testing framework. If you are looking for examples of how to write a plugin for Snap, review the Plugin Authoring documentation.

Curious what plugins are under development? See the plugin-wishlist label in our issue backlog.

Expand ▾ Collapse ▴

Documentation

Index

Constants

View Source
const (
	// Name of plugin
	Name = "mock"
	// Version of plugin
	Version = 2
	// Type of plugin
	Type = plugin.CollectorPluginType
)

Variables

This section is empty.

Functions

func Meta

func Meta() *plugin.PluginMeta

    Meta returns meta data for testing

    Types

    type Mock

    type Mock struct {
    }

      Mock collector implementation used for testing

      func (*Mock) CollectMetrics

      func (f *Mock) CollectMetrics(mts []plugin.MetricType) ([]plugin.MetricType, error)

        CollectMetrics collects metrics for testing

        func (*Mock) GetConfigPolicy

        func (f *Mock) GetConfigPolicy() (*cpolicy.ConfigPolicy, error)

          GetConfigPolicy returns a ConfigPolicy for testing

          func (*Mock) GetMetricTypes

          func (f *Mock) GetMetricTypes(cfg plugin.ConfigType) ([]plugin.MetricType, error)

            GetMetricTypes returns metric types for testing

            Source Files