20 lines
622 B
Go
20 lines
622 B
Go
// Command plugin is the happyDomain plugin entrypoint for the XMPP checker.
|
|
//
|
|
// It is built as a Go plugin (`go build -buildmode=plugin`) and loaded at
|
|
// runtime by happyDomain.
|
|
package main
|
|
|
|
import (
|
|
sdk "git.happydns.org/checker-sdk-go/checker"
|
|
xmpp "git.happydns.org/checker-xmpp/checker"
|
|
)
|
|
|
|
var Version = "custom-build"
|
|
|
|
// NewCheckerPlugin is the symbol resolved by happyDomain when loading the
|
|
// .so file.
|
|
func NewCheckerPlugin() (*sdk.CheckerDefinition, sdk.ObservationProvider, error) {
|
|
xmpp.Version = Version
|
|
prvd := xmpp.Provider()
|
|
return prvd.(sdk.CheckerDefinitionProvider).Definition(), prvd, nil
|
|
}
|