pagerduty-incidents

所属分类:Python编程
开发工具:Java
文件大小:0KB
下载次数:0
上传日期:2022-04-20 21:19:54
上 传 者sh-1993
说明:  用于以编程方式触发和解决PagerDuty事件的Java实用程序。
(Java utility for programmatically triggering and resolving PagerDuty incidents.)

文件列表:
.buildscript/ (0, 2020-12-15)
.buildscript/deploy_snapshot.sh (1019, 2020-12-15)
.buildscript/settings.xml (221, 2020-12-15)
.travis.yml (616, 2020-12-15)
CHANGELOG.md (593, 2020-12-15)
CONTRIBUTING.md (722, 2020-12-15)
LICENSE.txt (11358, 2020-12-15)
checkstyle.xml (4207, 2020-12-15)
deploy_javadoc.sh (817, 2020-12-15)
pom.xml (3585, 2020-12-15)
src/ (0, 2020-12-15)
src/main/ (0, 2020-12-15)
src/main/java/ (0, 2020-12-15)
src/main/java/com/ (0, 2020-12-15)
src/main/java/com/squareup/ (0, 2020-12-15)
src/main/java/com/squareup/pagerduty/ (0, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/ (0, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/Event.java (1559, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/EventService.java (973, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/FakePagerDuty.java (2771, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/NotifyResult.java (1561, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/PagerDuty.java (2438, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/Resolution.java (2637, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/Trigger.java (4031, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/Util.java (1330, 2020-12-15)
src/main/java/com/squareup/pagerduty/incidents/package-info.java (1845, 2020-12-15)
src/test/ (0, 2020-12-15)
src/test/java/ (0, 2020-12-15)
src/test/java/com/ (0, 2020-12-15)
src/test/java/com/squareup/ (0, 2020-12-15)
src/test/java/com/squareup/pagerduty/ (0, 2020-12-15)
src/test/java/com/squareup/pagerduty/incidents/ (0, 2020-12-15)
src/test/java/com/squareup/pagerduty/incidents/EventAssert.java (2681, 2020-12-15)
src/test/java/com/squareup/pagerduty/incidents/EventTest.java (1761, 2020-12-15)
src/test/java/com/squareup/pagerduty/incidents/FakePagerDutyTest.java (3649, 2020-12-15)
src/test/java/com/squareup/pagerduty/incidents/NotifyResultTest.java (1831, 2020-12-15)
src/test/java/com/squareup/pagerduty/incidents/PagerDutyIT.java (1755, 2020-12-15)
src/test/java/com/squareup/pagerduty/incidents/PagerDutyTest.java (3504, 2020-12-15)
... ...

PagerDuty Incidents for Java ============================= Utility for programmatically triggering and resolving PagerDuty incidents. Usage ----- Create an instance with your service's API key: ```java PagerDuty pagerDuty = PagerDuty.create("API key"); ``` Triggering an incident requires only a description of the problem: ```java Trigger trigger = new Trigger.Builder("Sync responded with code: " + code).build(); NotifyResult result = pagerDuty.notify(trigger); ``` The returned `NotifyResult` object will contain a generated incident key. You can also specify a custom incident key as well as additional name-value details: ```java Trigger trigger = new Trigger.Builder("Sync responded with code: " + code) .withIncidentKey("feed-sync-12") .addDetails("Foo", "Bar") .addDetails(ImmutableMap.of("Ping", "Pong", "Kit", "Kat")) .build(); pagerDuty.notify(trigger); ``` Resolving an incident requires its key: ```java Resolution resolution = new Resolution.Builder("feed-sync-12").build(); pagerDuty.notify(resolution); ``` A description and additional name-value details can also be specified on resolutions: ```java Resolution resolution = new Resolution.Builder("feed-sync-12") .withDescription("Sync healthy with code: " + code) .addDetails("Foo", "Bar") .addDetails(ImmutableMap.of("Ping", "Pong", "Kit", "Kat")) .build() pagerDuty.notify(resolution); ``` A `FakePagerDuty` class is provided for testing purposes which behaves similarly to a real PagerDuty backend. Download -------- Download [the latest .jar][dl] or depend via Maven: ```xml com.squareup.pagerduty pagerduty-incidents 2.0.0 ``` or Gradle: ```groovy compile 'com.squareup.pagerduty:pagerduty-incidents:2.0.0' ``` Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. License ------- Copyright 2014 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. [dl]: https://search.maven.org/remote_content?g=com.squareup.pagerduty&a=pagerduty-incidents&v=LATEST [snap]: https://oss.sonatype.org/content/repositories/snapshots/

近期下载者

相关文件


收藏者