Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeMetricKey ¶
SanitizeMetricKey sanitize metric keys to be Mackerel friendly
Types ¶
type Generator ¶
type Generator interface { Generate(context.Context) (Values, error) GetGraphDefs(context.Context) ([]*mackerel.GraphDefsParam, error) }
Generator interface generates metrics
func NewInterfaceGenerator ¶
func NewInterfaceGenerator() Generator
NewInterfaceGenerator creates interface generator
func NewMockGenerator ¶
func NewMockGenerator(values Values, errValues error, graphDefs []*mackerel.GraphDefsParam, errGraphDefs error) Generator
NewMockGenerator creates a new mock metric generator
func NewPluginGenerator ¶
func NewPluginGenerator(p *config.MetricPlugin) Generator
NewPluginGenerator creates a new plugin generator
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager in metric manager
func NewManager ¶
NewManager creates metric manager instanace
func (*Manager) CollectAndPostGraphDefs ¶
CollectAndPostGraphDefs sends graph definitions
type MockGenerator ¶
type MockGenerator struct {
// contains filtered or unexported fields
}
MockGenerator represents a mock metric generator
func (*MockGenerator) Generate ¶
func (g *MockGenerator) Generate(context.Context) (Values, error)
Generate generates metric values
func (*MockGenerator) GetGraphDefs ¶
func (g *MockGenerator) GetGraphDefs(context.Context) ([]*mackerel.GraphDefsParam, error)
GetGraphDefs gets graph definitions
Source Files ¶
Click to show internal directories.
Click to hide internal directories.