client.go holds the Table API client (instance URL setting, basic credential in the api slot). incident.go delivers create/update with a note and polls incident.updated. change.go raises and withdraws change requests idempotently on correlation_id and turns approvals into change.approved and change.rejected events. cmdb.go resolves owner, delegate, support group, environment and data class through cmdb_ci_server, cmdb_ci_appl then cmdb_ci. calendar.go answers active blackouts for the Timing guard. listen.go polls both tables with a chg/inc cursor. Built against a developer instance; tests fake the Table API.
14 lines
508 B
Go
14 lines
508 B
Go
// Command servicenow is the ServiceNow connector: it records incidents and
|
|
// change requests on one instance, hears change approvals and rejections back
|
|
// as events, and answers the CMDB and change-calendar lookups. Each area of
|
|
// ServiceNow lives in its own file: client, incident, change, cmdb, calendar.
|
|
package main
|
|
|
|
import "github.com/samcharles93/archipelago/sdk/connector"
|
|
|
|
func main() {
|
|
connector.Serve(func(cfg connector.Config) (connector.Connector, error) {
|
|
return newServiceNow(cfg)
|
|
})
|
|
}
|