Documentation ¶
Index ¶
- Constants
- func GetAllCollectors() []api.ServiceCollector
- func GetCollector(id string) (api.ServiceCollector, bool)
- func RegisterCollector(collector api.ServiceCollector)
- func UnregisterCollector(collector api.ServiceCollector)
- type EmptyCollector
- type HTTPCollector
- type JMXCollector
- type XMLCollector
- type XPathNode
- type XPathQuerier
- type XPathQuery
Constants ¶
const ( // XMLHandlerClass represents the Java class-name of the default XML collection handler XMLHandlerClass = "org.opennms.protocols.xml.collector.DefaultXmlCollectionHandler" // JSONHandlerClass represents the Java class-name of the default JSON collection handler JSONHandlerClass = "org.opennms.protocols.json.collector.DefaultJsonCollectionHandler" // HTTPHandlerClass represents the Java class-name of the default HTML/CSS collection handler HTTPHandlerClass = "org.opennms.protocols.json.collector.HttpCollectionHandler" )
Variables ¶
This section is empty.
Functions ¶
func GetAllCollectors ¶
func GetAllCollectors() []api.ServiceCollector
GetAllCollectors gets all the registered collector modules
func GetCollector ¶
func GetCollector(id string) (api.ServiceCollector, bool)
GetCollector gets the collector implementation for a given ID
func RegisterCollector ¶
func RegisterCollector(collector api.ServiceCollector)
RegisterCollector registers a new collector implementation
func UnregisterCollector ¶
func UnregisterCollector(collector api.ServiceCollector)
UnregisterCollector unregister an existing collector implementation
Types ¶
type EmptyCollector ¶
type EmptyCollector struct { }
EmptyCollector represents a collector implementation
func (*EmptyCollector) Collect ¶
func (collector *EmptyCollector) Collect(request *api.CollectorRequestDTO) *api.CollectorResponseDTO
Collect execute the XXX collector request and return the collection response
func (*EmptyCollector) GetID ¶
func (collector *EmptyCollector) GetID() string
GetID gets the collector ID (simple class name from its Java counterpart)
type HTTPCollector ¶
type HTTPCollector struct { }
HTTPCollector represents a collector implementation
func (*HTTPCollector) AddResourceAttributes ¶
func (collector *HTTPCollector) AddResourceAttributes(builder *api.CollectionSetBuilder, cres *api.CollectionResourceDTO, uri api.HTTPUri, html string) error
AddResourceAttributes adds attributes to resource based on HTML and URI configuration
func (*HTTPCollector) Collect ¶
func (collector *HTTPCollector) Collect(request *api.CollectorRequestDTO) *api.CollectorResponseDTO
Collect execute the collector request and return the collection response
func (*HTTPCollector) GetID ¶
func (collector *HTTPCollector) GetID() string
GetID gets the collector ID (simple class name from its Java counterpart)
type JMXCollector ¶ added in v0.1.5
type JMXCollector struct { }
JMXCollector represents a collector implementation
func (*JMXCollector) Collect ¶ added in v0.1.5
func (collector *JMXCollector) Collect(request *api.CollectorRequestDTO) *api.CollectorResponseDTO
Collect execute the JMX collector request and return the collection response. Currently returns mock data for the JMX-Minion service.
func (*JMXCollector) GetID ¶ added in v0.1.5
func (collector *JMXCollector) GetID() string
GetID gets the collector ID (simple class name from its Java counterpart)
type XMLCollector ¶
type XMLCollector struct { }
XMLCollector represents a collector implementation
func (*XMLCollector) Collect ¶
func (collector *XMLCollector) Collect(request *api.CollectorRequestDTO) *api.CollectorResponseDTO
Collect execute the collector request and return the collection response
func (*XMLCollector) GetID ¶
func (collector *XMLCollector) GetID() string
GetID gets the collector ID (simple class name from its Java counterpart)
type XPathNode ¶
type XPathNode struct {
// contains filtered or unexported fields
}
XPathNode represents a node
func (*XPathNode) GetContent ¶
GetContent gets the content of a given node
type XPathQuerier ¶
type XPathQuerier interface { Parse(reader io.Reader) (*XPathNode, error) Query(parent *XPathNode, xpath string) (*XPathNode, error) QueryAll(parent *XPathNode, xpath string) ([]*XPathNode, error) }
XPathQuerier an interface that represents an XPath queries
func NewQuerier ¶
func NewQuerier(handlerClass string, req *api.XMLRequest) (XPathQuerier, error)
NewQuerier returns new querier interface for a given kind
type XPathQuery ¶
type XPathQuery struct {
// contains filtered or unexported fields
}
XPathQuery represents a query
func (*XPathQuery) Parse ¶
func (q *XPathQuery) Parse(reader io.Reader) (*XPathNode, error)
Parse parses the content from a reader and return the root node