mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-24 17:04:42 +01:00
⚠ Migrate TwinProduction/gatus to TwiN/gatus
This commit is contained in:
parent
422eaa6d37
commit
6c45f5b99c
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1 +1 @@
|
||||
github: [TwinProduction]
|
||||
github: [TwiN]
|
||||
|
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 TwinProduction
|
||||
Copyright (c) 2021 TwiN
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
16
README.md
16
README.md
@ -1,12 +1,12 @@
|
||||
![Gatus](.github/assets/logo-with-name.png)
|
||||
|
||||
![build](https://github.com/TwinProduction/gatus/workflows/build/badge.svg?branch=master)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/TwinProduction/gatus?)](https://goreportcard.com/report/github.com/TwinProduction/gatus)
|
||||
[![codecov](https://codecov.io/gh/TwinProduction/gatus/branch/master/graph/badge.svg)](https://codecov.io/gh/TwinProduction/gatus)
|
||||
[![Go version](https://img.shields.io/github/go-mod/go-version/TwinProduction/gatus.svg)](https://github.com/TwinProduction/gatus)
|
||||
![build](https://github.com/TwiN/gatus/workflows/build/badge.svg?branch=master)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/TwiN/gatus?)](https://goreportcard.com/report/github.com/TwiN/gatus)
|
||||
[![codecov](https://codecov.io/gh/TwiN/gatus/branch/master/graph/badge.svg)](https://codecov.io/gh/TwiN/gatus)
|
||||
[![Go version](https://img.shields.io/github/go-mod/go-version/TwiN/gatus.svg)](https://github.com/TwiN/gatus)
|
||||
[![Docker pulls](https://img.shields.io/docker/pulls/twinproduction/gatus.svg)](https://cloud.docker.com/repository/docker/twinproduction/gatus)
|
||||
[![Join Discord server](https://img.shields.io/discord/442432928614449155.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/TDfjeHmXDQ)
|
||||
[![Follow TwinProduction](https://img.shields.io/github/followers/TwinProduction?label=Follow&style=social)](https://github.com/TwinProduction)
|
||||
[![Follow TwiN](https://img.shields.io/github/followers/TwiN?label=Follow&style=social)](https://github.com/TwiN)
|
||||
|
||||
Gatus is a health dashboard that gives you the ability to monitor your services using HTTP, ICMP, TCP, and even DNS
|
||||
queries as well as evaluate the result of said queries by using a list of conditions on values like the status code,
|
||||
@ -842,7 +842,7 @@ and [helmfile example](https://github.com/avakarev/gatus-chart#helmfileyaml-exam
|
||||
|
||||
|
||||
### Terraform
|
||||
Gatus can be deployed on Terraform by using the following module: [terraform-kubernetes-gatus](https://github.com/TwinProduction/terraform-kubernetes-gatus).
|
||||
Gatus can be deployed on Terraform by using the following module: [terraform-kubernetes-gatus](https://github.com/TwiN/terraform-kubernetes-gatus).
|
||||
|
||||
|
||||
|
||||
@ -1064,7 +1064,7 @@ to make.
|
||||
**If you are not using a file storage**, updating the configuration while Gatus is running is effectively
|
||||
the same as restarting the application.
|
||||
|
||||
**NOTE:** Updates may not be detected if the config file is bound instead of the config folder. See [#151](https://github.com/TwinProduction/gatus/issues/151).
|
||||
**NOTE:** Updates may not be detected if the config file is bound instead of the config folder. See [#151](https://github.com/TwiN/gatus/issues/151).
|
||||
|
||||
|
||||
### Service groups
|
||||
@ -1200,7 +1200,7 @@ No such header is required to query the API.
|
||||
|
||||
|
||||
## Sponsors
|
||||
You can find the full list of sponsors [here](https://github.com/sponsors/TwinProduction).
|
||||
You can find the full list of sponsors [here](https://github.com/sponsors/TwiN).
|
||||
|
||||
[<img src="https://github.com/math280h.png" width="50" />](https://github.com/math280h)
|
||||
[<img src="https://github.com/pyroscope-io.png" width="50" />](https://github.com/pyroscope-io)
|
||||
|
@ -1,17 +1,17 @@
|
||||
package alerting
|
||||
|
||||
import (
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/discord"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/slack"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/teams"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/discord"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/mattermost"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/messagebird"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/slack"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/teams"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/telegram"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/twilio"
|
||||
)
|
||||
|
||||
// Config is the configuration for alerting providers
|
||||
|
@ -9,9 +9,9 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/client"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/client"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// AlertProvider is the configuration necessary for sending an alert using a custom HTTP request
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// AlertProvider is the configuration necessary for sending an alert using Discord
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/client"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/client"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// AlertProvider is the configuration necessary for sending an alert using Mattermost
|
||||
@ -61,7 +61,7 @@ func (provider *AlertProvider) ToCustomAlertProvider(service *core.Service, aler
|
||||
Body: fmt.Sprintf(`{
|
||||
"text": "",
|
||||
"username": "gatus",
|
||||
"icon_url": "https://raw.githubusercontent.com/TwinProduction/gatus/master/static/logo.png",
|
||||
"icon_url": "https://raw.githubusercontent.com/TwiN/gatus/master/static/logo.png",
|
||||
"attachments": [
|
||||
{
|
||||
"title": ":rescue_worker_helmet: Gatus",
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestMessagebirdAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -1,17 +1,17 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/discord"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/slack"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/teams"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/discord"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/mattermost"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/messagebird"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/slack"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/teams"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/telegram"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/twilio"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// AlertProvider is the interface that each providers should implement
|
||||
|
@ -3,7 +3,7 @@ package provider
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
)
|
||||
|
||||
func TestParseWithDefaultAlert(t *testing.T) {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// AlertProvider is the configuration necessary for sending an alert using Slack
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// AlertProvider is the configuration necessary for sending an alert using Teams
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// AlertProvider is the configuration necessary for sending an alert using Telegram
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// AlertProvider is the configuration necessary for sending an alert using Twilio
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestTwilioAlertProvider_IsValid(t *testing.T) {
|
||||
|
@ -86,7 +86,7 @@ func Ping(address string, config *Config) (bool, time.Duration) {
|
||||
pinger.Count = 1
|
||||
pinger.Timeout = config.Timeout
|
||||
// Set the pinger's privileged mode to true for every GOOS except darwin
|
||||
// See https://github.com/TwinProduction/gatus/issues/132
|
||||
// See https://github.com/TwiN/gatus/issues/132
|
||||
//
|
||||
// Note that for this to work on Linux, Gatus must run with sudo privileges.
|
||||
// See https://github.com/go-ping/ping#linux
|
||||
|
@ -7,15 +7,15 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider"
|
||||
"github.com/TwinProduction/gatus/v3/config/maintenance"
|
||||
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||
"github.com/TwinProduction/gatus/v3/config/web"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/security"
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/alerting"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider"
|
||||
"github.com/TwiN/gatus/v3/config/maintenance"
|
||||
"github.com/TwiN/gatus/v3/config/ui"
|
||||
"github.com/TwiN/gatus/v3/config/web"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/security"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
@ -5,21 +5,21 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/discord"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/slack"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/teams"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio"
|
||||
"github.com/TwinProduction/gatus/v3/client"
|
||||
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||
"github.com/TwinProduction/gatus/v3/config/web"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/discord"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/mattermost"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/messagebird"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/slack"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/teams"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/telegram"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/twilio"
|
||||
"github.com/TwiN/gatus/v3/client"
|
||||
"github.com/TwiN/gatus/v3/config/ui"
|
||||
"github.com/TwiN/gatus/v3/config/web"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestLoadFileThatDoesNotExist(t *testing.T) {
|
||||
|
@ -8,10 +8,10 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||
"github.com/TwinProduction/gatus/v3/config/web"
|
||||
"github.com/TwinProduction/gatus/v3/controller/handler"
|
||||
"github.com/TwinProduction/gatus/v3/security"
|
||||
"github.com/TwiN/gatus/v3/config/ui"
|
||||
"github.com/TwiN/gatus/v3/config/web"
|
||||
"github.com/TwiN/gatus/v3/controller/handler"
|
||||
"github.com/TwiN/gatus/v3/security"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config"
|
||||
"github.com/TwinProduction/gatus/v3/config/web"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/config"
|
||||
"github.com/TwiN/gatus/v3/config/web"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestHandle(t *testing.T) {
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||
"github.com/TwiN/gatus/v3/config"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/watchdog"
|
||||
)
|
||||
|
||||
func TestUptimeBadge(t *testing.T) {
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||
"github.com/TwiN/gatus/v3/config"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/watchdog"
|
||||
)
|
||||
|
||||
func TestResponseTimeChart(t *testing.T) {
|
||||
|
@ -3,9 +3,9 @@ package handler
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||
"github.com/TwinProduction/gatus/v3/security"
|
||||
"github.com/TwinProduction/health"
|
||||
"github.com/TwiN/gatus/v3/config/ui"
|
||||
"github.com/TwiN/gatus/v3/security"
|
||||
"github.com/TwiN/health"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
@ -10,10 +10,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwinProduction/gocache"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gocache"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||
"github.com/TwiN/gatus/v3/config"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/watchdog"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||
"github.com/TwiN/gatus/v3/config/ui"
|
||||
)
|
||||
|
||||
func SinglePageApplication(staticFolder string, ui *ui.Config) http.HandlerFunc {
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||
"github.com/TwiN/gatus/v3/config"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/watchdog"
|
||||
)
|
||||
|
||||
func TestSinglePageApplication(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/jsonpath"
|
||||
"github.com/TwinProduction/gatus/v3/pattern"
|
||||
"github.com/TwiN/gatus/v3/jsonpath"
|
||||
"github.com/TwiN/gatus/v3/pattern"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3,7 +3,7 @@ package core
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/pattern"
|
||||
"github.com/TwiN/gatus/v3/pattern"
|
||||
)
|
||||
|
||||
func TestIntegrationQuery(t *testing.T) {
|
||||
|
@ -12,10 +12,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/client"
|
||||
"github.com/TwinProduction/gatus/v3/core/ui"
|
||||
"github.com/TwinProduction/gatus/v3/util"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/client"
|
||||
"github.com/TwiN/gatus/v3/core/ui"
|
||||
"github.com/TwiN/gatus/v3/util"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/client"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/client"
|
||||
)
|
||||
|
||||
func TestService_IsEnabled(t *testing.T) {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
# Support
|
||||
If you need help with this integration, please create an issue at https://github.com/TwinProduction/gatus/issues
|
||||
If you need help with this integration, please create an issue at https://github.com/TwiN/gatus/issues
|
||||
|
||||
|
||||
# Integration Walkthrough
|
||||
@ -26,7 +26,7 @@ If you need help with this integration, please create an issue at https://github
|
||||
3. Enter an **Integration Name** in the format `gatus-service-name` (e.g. `Gatus-Shopping-Cart`) and select **Gatus** from the Integration Type menu.
|
||||
4. Click the **Add Integration** button to save your new integration. You will be redirected to the Integrations tab for your service.
|
||||
5. An **Integration Key** will be generated on this screen. Keep this key saved in a safe place, as it will be used when you configure the integration with **Gatus** in the next section.
|
||||
![PagerDuty Integration Key](https://raw.githubusercontent.com/TwinProduction/gatus/master/.github/assets/pagerduty-integration-key.png)
|
||||
![PagerDuty Integration Key](https://raw.githubusercontent.com/TwiN/gatus/master/.github/assets/pagerduty-integration-key.png)
|
||||
|
||||
|
||||
## In Gatus
|
||||
|
6
go.mod
6
go.mod
@ -1,10 +1,10 @@
|
||||
module github.com/TwinProduction/gatus/v3
|
||||
module github.com/TwiN/gatus/v3
|
||||
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/TwinProduction/gocache v1.2.3
|
||||
github.com/TwinProduction/health v1.0.0
|
||||
github.com/TwiN/gocache v1.2.4
|
||||
github.com/TwiN/health v1.0.1
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/go-ping/ping v0.0.0-20210911151512-381826476871
|
||||
|
8
go.sum
8
go.sum
@ -33,10 +33,10 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/TwinProduction/gocache v1.2.3 h1:4wFNih4CemUX+A99Gk/EsaU0SXSNZV42Ve77v7/7ToY=
|
||||
github.com/TwinProduction/gocache v1.2.3/go.mod h1:Yj2daITit8TTBgiOpc26XCDSbg9xcFskUilHj9u3Mh8=
|
||||
github.com/TwinProduction/health v1.0.0 h1:TVyYTAORQQZ8LaptX8jCHZRCGCAO6e+oJx19BUIzQYY=
|
||||
github.com/TwinProduction/health v1.0.0/go.mod h1:ys4mYKUeEfYrWmkm60xLtPjTuLIEDQNBZaTZvenLG1c=
|
||||
github.com/TwiN/gocache v1.2.4 h1:AfJ1YRcxtQ/zZEN61URDwk/dwFG7LSRenU5qIm9dQzo=
|
||||
github.com/TwiN/gocache v1.2.4/go.mod h1:BjabsQQy6z5uHDorHa4LJVPEzFeitLIDbCtdv3gc1gA=
|
||||
github.com/TwiN/health v1.0.1 h1:Q8lE6mTMPG4A5nHXq5Xa+NY4Y8LkQdRBWh1ReUkuc6Y=
|
||||
github.com/TwiN/health v1.0.1/go.mod h1:Bt+lEvSi6C/9NWb7OoGmUmgtS4dfPeMM9EINnURv5dE=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
|
8
main.go
8
main.go
@ -7,10 +7,10 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/config"
|
||||
"github.com/TwinProduction/gatus/v3/controller"
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||
"github.com/TwiN/gatus/v3/config"
|
||||
"github.com/TwiN/gatus/v3/controller"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/watchdog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"strconv"
|
||||
"sync"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
)
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/storage/store"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/memory"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||
"github.com/TwiN/gatus/v3/storage/store"
|
||||
"github.com/TwiN/gatus/v3/storage/store/memory"
|
||||
"github.com/TwiN/gatus/v3/storage/store/sql"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||
"github.com/TwiN/gatus/v3/storage/store/sql"
|
||||
)
|
||||
|
||||
func TestGet(t *testing.T) {
|
||||
|
@ -6,11 +6,11 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwinProduction/gatus/v3/util"
|
||||
"github.com/TwinProduction/gocache"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/util"
|
||||
"github.com/TwiN/gocache"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -3,7 +3,7 @@ package memory
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func BenchmarkProcessUptimeAfterResult(b *testing.B) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestProcessUptimeAfterResult(t *testing.T) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package memory
|
||||
|
||||
import (
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
)
|
||||
|
||||
// ShallowCopyServiceStatus returns a shallow copy of a ServiceStatus with only the results
|
||||
|
@ -3,9 +3,9 @@ package memory
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
)
|
||||
|
||||
func BenchmarkShallowCopyServiceStatus(b *testing.B) {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
)
|
||||
|
||||
func TestAddResult(t *testing.T) {
|
||||
|
@ -8,10 +8,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwinProduction/gatus/v3/util"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/util"
|
||||
_ "github.com/lib/pq"
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -3,10 +3,10 @@ package store
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/memory"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/storage/store/memory"
|
||||
"github.com/TwiN/gatus/v3/storage/store/sql"
|
||||
)
|
||||
|
||||
// Store is the interface that each stores should implement
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/memory"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/storage/store/memory"
|
||||
"github.com/TwiN/gatus/v3/storage/store/sql"
|
||||
)
|
||||
|
||||
func BenchmarkStore_GetAllServiceStatuses(b *testing.B) {
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/memory"
|
||||
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
||||
"github.com/TwiN/gatus/v3/storage/store/memory"
|
||||
"github.com/TwiN/gatus/v3/storage/store/sql"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 TwinProduction
|
||||
Copyright (c) 2021 TwiN
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
@ -1,11 +1,11 @@
|
||||
# gocache
|
||||
|
||||
![build](https://github.com/TwinProduction/gocache/workflows/build/badge.svg?branch=master)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/TwinProduction/gocache)](https://goreportcard.com/report/github.com/TwinProduction/gocache)
|
||||
[![codecov](https://codecov.io/gh/TwinProduction/gocache/branch/master/graph/badge.svg)](https://codecov.io/gh/TwinProduction/gocache)
|
||||
[![Go version](https://img.shields.io/github/go-mod/go-version/TwinProduction/gocache.svg)](https://github.com/TwinProduction/gocache)
|
||||
[![Go Reference](https://pkg.go.dev/badge/github.com/TwinProduction/gocache.svg)](https://pkg.go.dev/github.com/TwinProduction/gocache)
|
||||
[![Follow TwinProduction](https://img.shields.io/github/followers/TwinProduction?label=Follow&style=social)](https://github.com/TwinProduction)
|
||||
![build](https://github.com/TwiN/gocache/workflows/build/badge.svg?branch=master)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/TwiN/gocache)](https://goreportcard.com/report/github.com/TwiN/gocache)
|
||||
[![codecov](https://codecov.io/gh/TwiN/gocache/branch/master/graph/badge.svg)](https://codecov.io/gh/TwiN/gocache)
|
||||
[![Go version](https://img.shields.io/github/go-mod/go-version/TwiN/gocache.svg)](https://github.com/TwiN/gocache)
|
||||
[![Go Reference](https://pkg.go.dev/badge/github.com/TwiN/gocache.svg)](https://pkg.go.dev/github.com/TwiN/gocache)
|
||||
[![Follow TwiN](https://img.shields.io/github/followers/TwiN?label=Follow&style=social)](https://github.com/TwiN)
|
||||
|
||||
gocache is an easy-to-use, high-performance, lightweight and thread-safe (goroutine-safe) in-memory key-value cache
|
||||
with support for LRU and FIFO eviction policies as well as expiration, bulk operations and even persistence to file.
|
||||
@ -58,7 +58,7 @@ It may also serve as a good reference to use in order to implement gocache in yo
|
||||
|
||||
## Usage
|
||||
```
|
||||
go get -u github.com/TwinProduction/gocache
|
||||
go get -u github.com/TwiN/gocache
|
||||
```
|
||||
|
||||
If you're interested in using gocache as a server rather than an embedded library, see [Server](#server)
|
||||
@ -101,7 +101,7 @@ cache.StartJanitor()
|
||||
| SaveToFile | Stores the content of the cache to a file so that it can be read using `ReadFromFile`. See [persistence](#persistence).
|
||||
| ReadFromFile | Populates the cache using a file created using `SaveToFile`. See [persistence](#persistence).
|
||||
|
||||
For further documentation, please refer to [Go Reference](https://pkg.go.dev/github.com/TwinProduction/gocache)
|
||||
For further documentation, please refer to [Go Reference](https://pkg.go.dev/github.com/TwiN/gocache)
|
||||
|
||||
|
||||
### Examples
|
||||
@ -134,7 +134,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gocache"
|
||||
"github.com/TwiN/gocache"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -323,8 +323,8 @@ For the sake of convenience, a ready-to-go cache server is available through the
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/TwinProduction/gocache"
|
||||
gocacheserver "github.com/TwinProduction/gocache/server"
|
||||
"github.com/TwiN/gocache"
|
||||
gocacheserver "github.com/TwiN/gocache/server"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -490,7 +490,7 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/TwinProduction/gocache"
|
||||
"github.com/TwiN/gocache"
|
||||
)
|
||||
|
||||
const CacheFile = "gocache.data"
|
@ -31,9 +31,9 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
ErrKeyDoesNotExist = errors.New("key does not exist")
|
||||
ErrKeyHasNoExpiration = errors.New("key has no expiration")
|
||||
ErrJanitorAlreadyRunning = errors.New("janitor is already running")
|
||||
ErrKeyDoesNotExist = errors.New("key does not exist") // Returned when a cache key does not exist
|
||||
ErrKeyHasNoExpiration = errors.New("key has no expiration") // Returned when a cache key has no expiration
|
||||
ErrJanitorAlreadyRunning = errors.New("janitor is already running") // Returned when the janitor has already been started
|
||||
)
|
||||
|
||||
// Cache is the core struct of gocache which contains the data as well as all relevant configuration fields
|
@ -42,7 +42,7 @@ func (cache *Cache) SaveToFile(path string) error {
|
||||
if err != nil {
|
||||
// Failed to encode the value, so we'll skip it.
|
||||
// This is likely due to the fact that the custom struct wasn't registered using gob.Register(...)
|
||||
// See [Persistence - Limitations](https://github.com/TwinProduction/gocache#limitations)
|
||||
// See [Persistence - Limitations](https://github.com/TwiN/gocache#limitations)
|
||||
continue
|
||||
}
|
||||
bucket.Put([]byte(bulkEntry.Key), buffer.Bytes())
|
||||
@ -91,7 +91,7 @@ func (cache *Cache) ReadFromFile(path string) (int, error) {
|
||||
// decoding the struct would fail. This can be avoided by using a different variable name every
|
||||
// time you must change the type of a variable within a struct.
|
||||
//
|
||||
// See [Persistence - Limitations](https://github.com/TwinProduction/gocache#limitations)
|
||||
// See [Persistence - Limitations](https://github.com/TwiN/gocache#limitations)
|
||||
return err
|
||||
}
|
||||
cache.entries[string(k)] = &entry
|
1
vendor/github.com/TwiN/health/.gitattributes
generated
vendored
Normal file
1
vendor/github.com/TwiN/health/.gitattributes
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
9
vendor/github.com/TwiN/health/LICENSE.md
generated
vendored
Normal file
9
vendor/github.com/TwiN/health/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 TwiN
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,25 +1,23 @@
|
||||
# health
|
||||
|
||||
![build](https://github.com/TwinProduction/health/workflows/build/badge.svg?branch=master)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/TwinProduction/health)](https://goreportcard.com/report/github.com/TwinProduction/health)
|
||||
[![codecov](https://codecov.io/gh/TwinProduction/health/branch/master/graph/badge.svg)](https://codecov.io/gh/TwinProduction/health)
|
||||
[![Go version](https://img.shields.io/github/go-mod/go-version/TwinProduction/health.svg)](https://github.com/TwinProduction/health)
|
||||
[![Go Reference](https://pkg.go.dev/badge/github.com/TwinProduction/health.svg)](https://pkg.go.dev/github.com/TwinProduction/health)
|
||||
![build](https://github.com/TwiN/health/workflows/build/badge.svg?branch=master)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/TwiN/health)](https://goreportcard.com/report/github.com/TwiN/health)
|
||||
[![codecov](https://codecov.io/gh/TwiN/health/branch/master/graph/badge.svg)](https://codecov.io/gh/TwiN/health)
|
||||
[![Go version](https://img.shields.io/github/go-mod/go-version/TwiN/health.svg)](https://github.com/TwiN/health)
|
||||
[![Go Reference](https://pkg.go.dev/badge/github.com/TwiN/health.svg)](https://pkg.go.dev/github.com/TwiN/health)
|
||||
|
||||
Health is a library used for creating a very simple health endpoint.
|
||||
|
||||
While implementing a health endpoint is very simple, I've grown tired of implementing
|
||||
it over and over again.
|
||||
|
||||
## Installation
|
||||
|
||||
## Installation
|
||||
```
|
||||
go get -u github.com/TwinProduction/health
|
||||
go get -u github.com/TwiN/health
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
To retrieve the handler, you must use `health.Handler()` and are expected to pass it to the router like so:
|
||||
```go
|
||||
router := http.NewServeMux()
|
||||
@ -45,8 +43,8 @@ health.SetStatus(health.Up)
|
||||
health.SetStatus(health.Down)
|
||||
```
|
||||
|
||||
### Complete example
|
||||
|
||||
### Complete example
|
||||
```go
|
||||
package main
|
||||
|
||||
@ -54,7 +52,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/health"
|
||||
"github.com/TwiN/health"
|
||||
)
|
||||
|
||||
func main() {
|
@ -9,6 +9,7 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
// healthHandler is the HTTP handler for serving the health endpoint
|
||||
type healthHandler struct {
|
||||
useJSON bool
|
||||
status Status
|
||||
@ -22,7 +23,8 @@ func (h *healthHandler) WithJSON(v bool) *healthHandler {
|
||||
return h
|
||||
}
|
||||
|
||||
func (h healthHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
|
||||
// ServeHTTP serves the HTTP request for the health handler
|
||||
func (h healthHandler) ServeHTTP(writer http.ResponseWriter, _ *http.Request) {
|
||||
var status int
|
||||
var body []byte
|
||||
if h.status == Up {
|
8
vendor/github.com/TwiN/health/status.go
generated
vendored
Normal file
8
vendor/github.com/TwiN/health/status.go
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
package health
|
||||
|
||||
type Status string
|
||||
|
||||
var (
|
||||
Down Status = "DOWN" // For when the application is unhealthy
|
||||
Up Status = "UP" // For when the application is healthy
|
||||
)
|
1
vendor/github.com/TwinProduction/health/.gitattributes
generated
vendored
1
vendor/github.com/TwinProduction/health/.gitattributes
generated
vendored
@ -1 +0,0 @@
|
||||
* text=lf
|
8
vendor/github.com/TwinProduction/health/status.go
generated
vendored
8
vendor/github.com/TwinProduction/health/status.go
generated
vendored
@ -1,8 +0,0 @@
|
||||
package health
|
||||
|
||||
type Status string
|
||||
|
||||
var (
|
||||
Down Status = "DOWN"
|
||||
Up Status = "UP"
|
||||
)
|
10
vendor/modules.txt
vendored
10
vendor/modules.txt
vendored
@ -1,9 +1,9 @@
|
||||
# github.com/TwinProduction/gocache v1.2.3
|
||||
# github.com/TwiN/gocache v1.2.4
|
||||
## explicit; go 1.16
|
||||
github.com/TwinProduction/gocache
|
||||
# github.com/TwinProduction/health v1.0.0
|
||||
## explicit; go 1.15
|
||||
github.com/TwinProduction/health
|
||||
github.com/TwiN/gocache
|
||||
# github.com/TwiN/health v1.0.1
|
||||
## explicit; go 1.17
|
||||
github.com/TwiN/health
|
||||
# github.com/beorn7/perks v1.0.1
|
||||
## explicit; go 1.11
|
||||
github.com/beorn7/perks/quantile
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
// HandleAlerting takes care of alerts to resolve and alerts to trigger based on result success or failure
|
||||
|
@ -4,12 +4,12 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty"
|
||||
"github.com/TwinProduction/gatus/v3/config"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/alerting"
|
||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
|
||||
"github.com/TwiN/gatus/v3/config"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
)
|
||||
|
||||
func TestHandleAlerting(t *testing.T) {
|
||||
|
@ -6,12 +6,12 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/TwinProduction/gatus/v3/alerting"
|
||||
"github.com/TwinProduction/gatus/v3/config"
|
||||
"github.com/TwinProduction/gatus/v3/config/maintenance"
|
||||
"github.com/TwinProduction/gatus/v3/core"
|
||||
"github.com/TwinProduction/gatus/v3/metric"
|
||||
"github.com/TwinProduction/gatus/v3/storage"
|
||||
"github.com/TwiN/gatus/v3/alerting"
|
||||
"github.com/TwiN/gatus/v3/config"
|
||||
"github.com/TwiN/gatus/v3/config/maintenance"
|
||||
"github.com/TwiN/gatus/v3/core"
|
||||
"github.com/TwiN/gatus/v3/metric"
|
||||
"github.com/TwiN/gatus/v3/storage"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="social">
|
||||
<a href="https://github.com/TwinProduction/gatus" target="_blank" title="Gatus on GitHub">
|
||||
<a href="https://github.com/TwiN/gatus" target="_blank" title="Gatus on GitHub">
|
||||
<img src="../assets/github.png" alt="GitHub" width="32" height="auto"/>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#social[data-v-1cbbc992]{position:fixed;right:5px;bottom:5px;padding:5px;margin:0;z-index:100}#social img[data-v-1cbbc992]{opacity:.3}#social img[data-v-1cbbc992]:hover{opacity:1}#tooltip{position:fixed;background-color:#fff;border:1px solid #d3d3d3;border-radius:4px;padding:6px;font-size:13px}#tooltip code{color:#212529;line-height:1}#tooltip .tooltip-title{font-weight:700;margin-bottom:0;display:block;margin-top:8px}#tooltip>.tooltip-title:first-child{margin-top:0}
|
||||
#social[data-v-a88161aa]{position:fixed;right:5px;bottom:5px;padding:5px;margin:0;z-index:100}#social img[data-v-a88161aa]{opacity:.3}#social img[data-v-a88161aa]:hover{opacity:1}#tooltip{position:fixed;background-color:#fff;border:1px solid #d3d3d3;border-radius:4px;padding:6px;font-size:13px}#tooltip code{color:#212529;line-height:1}#tooltip .tooltip-title{font-weight:700;margin-bottom:0;display:block;margin-top:8px}#tooltip>.tooltip-title:first-child{margin-top:0}
|
||||
|
||||
/*! tailwindcss v2.2.15 | MIT License | https://tailwindcss.com */
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user