⚠ Migrate TwinProduction/gatus to TwiN/gatus

This commit is contained in:
TwiN 2021-10-07 21:28:04 -04:00
parent 422eaa6d37
commit 6c45f5b99c
92 changed files with 293 additions and 284 deletions

2
.github/FUNDING.yml vendored
View File

@ -1 +1 @@
github: [TwinProduction] github: [TwiN]

View File

@ -1,6 +1,6 @@
MIT License 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: 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:

View File

@ -1,12 +1,12 @@
![Gatus](.github/assets/logo-with-name.png) ![Gatus](.github/assets/logo-with-name.png)
![build](https://github.com/TwinProduction/gatus/workflows/build/badge.svg?branch=master) ![build](https://github.com/TwiN/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) [![Go Report Card](https://goreportcard.com/badge/github.com/TwiN/gatus?)](https://goreportcard.com/report/github.com/TwiN/gatus)
[![codecov](https://codecov.io/gh/TwinProduction/gatus/branch/master/graph/badge.svg)](https://codecov.io/gh/TwinProduction/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/TwinProduction/gatus.svg)](https://github.com/TwinProduction/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) [![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) [![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 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, 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 ### 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 **If you are not using a file storage**, updating the configuration while Gatus is running is effectively
the same as restarting the application. 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 ### Service groups
@ -1200,7 +1200,7 @@ No such header is required to query the API.
## Sponsors ## 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/math280h.png" width="50" />](https://github.com/math280h)
[<img src="https://github.com/pyroscope-io.png" width="50" />](https://github.com/pyroscope-io) [<img src="https://github.com/pyroscope-io.png" width="50" />](https://github.com/pyroscope-io)

View File

@ -1,17 +1,17 @@
package alerting package alerting
import ( import (
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider" "github.com/TwiN/gatus/v3/alerting/provider"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/alerting/provider/discord" "github.com/TwiN/gatus/v3/alerting/provider/discord"
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost" "github.com/TwiN/gatus/v3/alerting/provider/mattermost"
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird" "github.com/TwiN/gatus/v3/alerting/provider/messagebird"
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty" "github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
"github.com/TwinProduction/gatus/v3/alerting/provider/slack" "github.com/TwiN/gatus/v3/alerting/provider/slack"
"github.com/TwinProduction/gatus/v3/alerting/provider/teams" "github.com/TwiN/gatus/v3/alerting/provider/teams"
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram" "github.com/TwiN/gatus/v3/alerting/provider/telegram"
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio" "github.com/TwiN/gatus/v3/alerting/provider/twilio"
) )
// Config is the configuration for alerting providers // Config is the configuration for alerting providers

View File

@ -9,9 +9,9 @@ import (
"os" "os"
"strings" "strings"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/client" "github.com/TwiN/gatus/v3/client"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// AlertProvider is the configuration necessary for sending an alert using a custom HTTP request // AlertProvider is the configuration necessary for sending an alert using a custom HTTP request

View File

@ -4,8 +4,8 @@ import (
"io/ioutil" "io/ioutil"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestAlertProvider_IsValid(t *testing.T) { func TestAlertProvider_IsValid(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// AlertProvider is the configuration necessary for sending an alert using Discord // AlertProvider is the configuration necessary for sending an alert using Discord

View File

@ -6,8 +6,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestAlertProvider_IsValid(t *testing.T) { func TestAlertProvider_IsValid(t *testing.T) {

View File

@ -4,10 +4,10 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/client" "github.com/TwiN/gatus/v3/client"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// AlertProvider is the configuration necessary for sending an alert using Mattermost // 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(`{ Body: fmt.Sprintf(`{
"text": "", "text": "",
"username": "gatus", "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": [ "attachments": [
{ {
"title": ":rescue_worker_helmet: Gatus", "title": ":rescue_worker_helmet: Gatus",

View File

@ -6,8 +6,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestAlertProvider_IsValid(t *testing.T) { func TestAlertProvider_IsValid(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
const ( const (

View File

@ -6,8 +6,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestMessagebirdAlertProvider_IsValid(t *testing.T) { func TestMessagebirdAlertProvider_IsValid(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
const ( const (

View File

@ -6,8 +6,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestAlertProvider_IsValid(t *testing.T) { func TestAlertProvider_IsValid(t *testing.T) {

View File

@ -1,17 +1,17 @@
package provider package provider
import ( import (
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/alerting/provider/discord" "github.com/TwiN/gatus/v3/alerting/provider/discord"
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost" "github.com/TwiN/gatus/v3/alerting/provider/mattermost"
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird" "github.com/TwiN/gatus/v3/alerting/provider/messagebird"
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty" "github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
"github.com/TwinProduction/gatus/v3/alerting/provider/slack" "github.com/TwiN/gatus/v3/alerting/provider/slack"
"github.com/TwinProduction/gatus/v3/alerting/provider/teams" "github.com/TwiN/gatus/v3/alerting/provider/teams"
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram" "github.com/TwiN/gatus/v3/alerting/provider/telegram"
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio" "github.com/TwiN/gatus/v3/alerting/provider/twilio"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// AlertProvider is the interface that each providers should implement // AlertProvider is the interface that each providers should implement

View File

@ -3,7 +3,7 @@ package provider
import ( import (
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
) )
func TestParseWithDefaultAlert(t *testing.T) { func TestParseWithDefaultAlert(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// AlertProvider is the configuration necessary for sending an alert using Slack // AlertProvider is the configuration necessary for sending an alert using Slack

View File

@ -6,8 +6,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestAlertProvider_IsValid(t *testing.T) { func TestAlertProvider_IsValid(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// AlertProvider is the configuration necessary for sending an alert using Teams // AlertProvider is the configuration necessary for sending an alert using Teams

View File

@ -6,8 +6,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestAlertProvider_IsValid(t *testing.T) { func TestAlertProvider_IsValid(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// AlertProvider is the configuration necessary for sending an alert using Telegram // AlertProvider is the configuration necessary for sending an alert using Telegram

View File

@ -7,8 +7,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestAlertProvider_IsValid(t *testing.T) { func TestAlertProvider_IsValid(t *testing.T) {

View File

@ -6,9 +6,9 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// AlertProvider is the configuration necessary for sending an alert using Twilio // AlertProvider is the configuration necessary for sending an alert using Twilio

View File

@ -5,8 +5,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestTwilioAlertProvider_IsValid(t *testing.T) { func TestTwilioAlertProvider_IsValid(t *testing.T) {

View File

@ -86,7 +86,7 @@ func Ping(address string, config *Config) (bool, time.Duration) {
pinger.Count = 1 pinger.Count = 1
pinger.Timeout = config.Timeout pinger.Timeout = config.Timeout
// Set the pinger's privileged mode to true for every GOOS except darwin // 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. // Note that for this to work on Linux, Gatus must run with sudo privileges.
// See https://github.com/go-ping/ping#linux // See https://github.com/go-ping/ping#linux

View File

@ -7,15 +7,15 @@ import (
"os" "os"
"time" "time"
"github.com/TwinProduction/gatus/v3/alerting" "github.com/TwiN/gatus/v3/alerting"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider" "github.com/TwiN/gatus/v3/alerting/provider"
"github.com/TwinProduction/gatus/v3/config/maintenance" "github.com/TwiN/gatus/v3/config/maintenance"
"github.com/TwinProduction/gatus/v3/config/ui" "github.com/TwiN/gatus/v3/config/ui"
"github.com/TwinProduction/gatus/v3/config/web" "github.com/TwiN/gatus/v3/config/web"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/security" "github.com/TwiN/gatus/v3/security"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
) )

View File

@ -5,21 +5,21 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/alerting" "github.com/TwiN/gatus/v3/alerting"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/alerting/provider/discord" "github.com/TwiN/gatus/v3/alerting/provider/discord"
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost" "github.com/TwiN/gatus/v3/alerting/provider/mattermost"
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird" "github.com/TwiN/gatus/v3/alerting/provider/messagebird"
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty" "github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
"github.com/TwinProduction/gatus/v3/alerting/provider/slack" "github.com/TwiN/gatus/v3/alerting/provider/slack"
"github.com/TwinProduction/gatus/v3/alerting/provider/teams" "github.com/TwiN/gatus/v3/alerting/provider/teams"
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram" "github.com/TwiN/gatus/v3/alerting/provider/telegram"
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio" "github.com/TwiN/gatus/v3/alerting/provider/twilio"
"github.com/TwinProduction/gatus/v3/client" "github.com/TwiN/gatus/v3/client"
"github.com/TwinProduction/gatus/v3/config/ui" "github.com/TwiN/gatus/v3/config/ui"
"github.com/TwinProduction/gatus/v3/config/web" "github.com/TwiN/gatus/v3/config/web"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestLoadFileThatDoesNotExist(t *testing.T) { func TestLoadFileThatDoesNotExist(t *testing.T) {

View File

@ -8,10 +8,10 @@ import (
"os" "os"
"time" "time"
"github.com/TwinProduction/gatus/v3/config/ui" "github.com/TwiN/gatus/v3/config/ui"
"github.com/TwinProduction/gatus/v3/config/web" "github.com/TwiN/gatus/v3/config/web"
"github.com/TwinProduction/gatus/v3/controller/handler" "github.com/TwiN/gatus/v3/controller/handler"
"github.com/TwinProduction/gatus/v3/security" "github.com/TwiN/gatus/v3/security"
) )
var ( var (

View File

@ -7,9 +7,9 @@ import (
"os" "os"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/config" "github.com/TwiN/gatus/v3/config"
"github.com/TwinProduction/gatus/v3/config/web" "github.com/TwiN/gatus/v3/config/web"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestHandle(t *testing.T) { func TestHandle(t *testing.T) {

View File

@ -7,8 +7,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )

View File

@ -7,10 +7,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/config" "github.com/TwiN/gatus/v3/config"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"github.com/TwinProduction/gatus/v3/watchdog" "github.com/TwiN/gatus/v3/watchdog"
) )
func TestUptimeBadge(t *testing.T) { func TestUptimeBadge(t *testing.T) {

View File

@ -7,8 +7,8 @@ import (
"sort" "sort"
"time" "time"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/wcharczuk/go-chart/v2" "github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing" "github.com/wcharczuk/go-chart/v2/drawing"

View File

@ -6,10 +6,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/config" "github.com/TwiN/gatus/v3/config"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"github.com/TwinProduction/gatus/v3/watchdog" "github.com/TwiN/gatus/v3/watchdog"
) )
func TestResponseTimeChart(t *testing.T) { func TestResponseTimeChart(t *testing.T) {

View File

@ -3,9 +3,9 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/TwinProduction/gatus/v3/config/ui" "github.com/TwiN/gatus/v3/config/ui"
"github.com/TwinProduction/gatus/v3/security" "github.com/TwiN/gatus/v3/security"
"github.com/TwinProduction/health" "github.com/TwiN/health"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
) )

View File

@ -10,10 +10,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
"github.com/TwinProduction/gocache" "github.com/TwiN/gocache"
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )

View File

@ -6,10 +6,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/config" "github.com/TwiN/gatus/v3/config"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"github.com/TwinProduction/gatus/v3/watchdog" "github.com/TwiN/gatus/v3/watchdog"
) )
var ( var (

View File

@ -5,7 +5,7 @@ import (
"log" "log"
"net/http" "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 { func SinglePageApplication(staticFolder string, ui *ui.Config) http.HandlerFunc {

View File

@ -6,10 +6,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/config" "github.com/TwiN/gatus/v3/config"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"github.com/TwinProduction/gatus/v3/watchdog" "github.com/TwiN/gatus/v3/watchdog"
) )
func TestSinglePageApplication(t *testing.T) { func TestSinglePageApplication(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"net/http" "net/http"
"strconv" "strconv"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
) )
const ( const (

View File

@ -6,8 +6,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/TwinProduction/gatus/v3/jsonpath" "github.com/TwiN/gatus/v3/jsonpath"
"github.com/TwinProduction/gatus/v3/pattern" "github.com/TwiN/gatus/v3/pattern"
) )
const ( const (

View File

@ -3,7 +3,7 @@ package core
import ( import (
"testing" "testing"
"github.com/TwinProduction/gatus/v3/pattern" "github.com/TwiN/gatus/v3/pattern"
) )
func TestIntegrationQuery(t *testing.T) { func TestIntegrationQuery(t *testing.T) {

View File

@ -12,10 +12,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/client" "github.com/TwiN/gatus/v3/client"
"github.com/TwinProduction/gatus/v3/core/ui" "github.com/TwiN/gatus/v3/core/ui"
"github.com/TwinProduction/gatus/v3/util" "github.com/TwiN/gatus/v3/util"
) )
const ( const (

View File

@ -6,8 +6,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/client" "github.com/TwiN/gatus/v3/client"
) )
func TestService_IsEnabled(t *testing.T) { func TestService_IsEnabled(t *testing.T) {

View File

@ -13,7 +13,7 @@
# Support # 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 # 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. 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. 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. 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 ## In Gatus

6
go.mod
View File

@ -1,10 +1,10 @@
module github.com/TwinProduction/gatus/v3 module github.com/TwiN/gatus/v3
go 1.17 go 1.17
require ( require (
github.com/TwinProduction/gocache v1.2.3 github.com/TwiN/gocache v1.2.4
github.com/TwinProduction/health v1.0.0 github.com/TwiN/health v1.0.1
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/go-ping/ping v0.0.0-20210911151512-381826476871 github.com/go-ping/ping v0.0.0-20210911151512-381826476871

8
go.sum
View File

@ -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= 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/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/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/TwiN/gocache v1.2.4 h1:AfJ1YRcxtQ/zZEN61URDwk/dwFG7LSRenU5qIm9dQzo=
github.com/TwinProduction/gocache v1.2.3/go.mod h1:Yj2daITit8TTBgiOpc26XCDSbg9xcFskUilHj9u3Mh8= github.com/TwiN/gocache v1.2.4/go.mod h1:BjabsQQy6z5uHDorHa4LJVPEzFeitLIDbCtdv3gc1gA=
github.com/TwinProduction/health v1.0.0 h1:TVyYTAORQQZ8LaptX8jCHZRCGCAO6e+oJx19BUIzQYY= github.com/TwiN/health v1.0.1 h1:Q8lE6mTMPG4A5nHXq5Xa+NY4Y8LkQdRBWh1ReUkuc6Y=
github.com/TwinProduction/health v1.0.0/go.mod h1:ys4mYKUeEfYrWmkm60xLtPjTuLIEDQNBZaTZvenLG1c= 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-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/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= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=

View File

@ -7,10 +7,10 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/TwinProduction/gatus/v3/config" "github.com/TwiN/gatus/v3/config"
"github.com/TwinProduction/gatus/v3/controller" "github.com/TwiN/gatus/v3/controller"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
"github.com/TwinProduction/gatus/v3/watchdog" "github.com/TwiN/gatus/v3/watchdog"
) )
func main() { func main() {

View File

@ -5,7 +5,7 @@ import (
"strconv" "strconv"
"sync" "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"
"github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promauto"
) )

View File

@ -5,9 +5,9 @@ import (
"log" "log"
"time" "time"
"github.com/TwinProduction/gatus/v3/storage/store" "github.com/TwiN/gatus/v3/storage/store"
"github.com/TwinProduction/gatus/v3/storage/store/memory" "github.com/TwiN/gatus/v3/storage/store/memory"
"github.com/TwinProduction/gatus/v3/storage/store/sql" "github.com/TwiN/gatus/v3/storage/store/sql"
) )
var ( var (

View File

@ -4,7 +4,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/storage/store/sql" "github.com/TwiN/gatus/v3/storage/store/sql"
) )
func TestGet(t *testing.T) { func TestGet(t *testing.T) {

View File

@ -6,11 +6,11 @@ import (
"sync" "sync"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
"github.com/TwinProduction/gatus/v3/util" "github.com/TwiN/gatus/v3/util"
"github.com/TwinProduction/gocache" "github.com/TwiN/gocache"
) )
func init() { func init() {

View File

@ -4,8 +4,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
) )
var ( var (

View File

@ -3,7 +3,7 @@ package memory
import ( import (
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
const ( const (

View File

@ -4,7 +4,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func BenchmarkProcessUptimeAfterResult(b *testing.B) { func BenchmarkProcessUptimeAfterResult(b *testing.B) {

View File

@ -4,7 +4,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestProcessUptimeAfterResult(t *testing.T) { func TestProcessUptimeAfterResult(t *testing.T) {

View File

@ -1,9 +1,9 @@
package memory package memory
import ( import (
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
) )
// ShallowCopyServiceStatus returns a shallow copy of a ServiceStatus with only the results // ShallowCopyServiceStatus returns a shallow copy of a ServiceStatus with only the results

View File

@ -3,9 +3,9 @@ package memory
import ( import (
"testing" "testing"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
) )
func BenchmarkShallowCopyServiceStatus(b *testing.B) { func BenchmarkShallowCopyServiceStatus(b *testing.B) {

View File

@ -4,9 +4,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
) )
func TestAddResult(t *testing.T) { func TestAddResult(t *testing.T) {

View File

@ -8,10 +8,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
"github.com/TwinProduction/gatus/v3/util" "github.com/TwiN/gatus/v3/util"
_ "github.com/lib/pq" _ "github.com/lib/pq"
_ "modernc.org/sqlite" _ "modernc.org/sqlite"
) )

View File

@ -4,9 +4,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
) )
var ( var (

View File

@ -3,10 +3,10 @@ package store
import ( import (
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
"github.com/TwinProduction/gatus/v3/storage/store/memory" "github.com/TwiN/gatus/v3/storage/store/memory"
"github.com/TwinProduction/gatus/v3/storage/store/sql" "github.com/TwiN/gatus/v3/storage/store/sql"
) )
// Store is the interface that each stores should implement // Store is the interface that each stores should implement

View File

@ -4,10 +4,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
"github.com/TwinProduction/gatus/v3/storage/store/memory" "github.com/TwiN/gatus/v3/storage/store/memory"
"github.com/TwinProduction/gatus/v3/storage/store/sql" "github.com/TwiN/gatus/v3/storage/store/sql"
) )
func BenchmarkStore_GetAllServiceStatuses(b *testing.B) { func BenchmarkStore_GetAllServiceStatuses(b *testing.B) {

View File

@ -4,11 +4,11 @@ import (
"testing" "testing"
"time" "time"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/storage/store/common" "github.com/TwiN/gatus/v3/storage/store/common"
"github.com/TwinProduction/gatus/v3/storage/store/common/paging" "github.com/TwiN/gatus/v3/storage/store/common/paging"
"github.com/TwinProduction/gatus/v3/storage/store/memory" "github.com/TwiN/gatus/v3/storage/store/memory"
"github.com/TwinProduction/gatus/v3/storage/store/sql" "github.com/TwiN/gatus/v3/storage/store/sql"
) )
var ( var (

View File

@ -1,6 +1,6 @@
MIT License 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: 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:

View File

@ -1,11 +1,11 @@
# gocache # gocache
![build](https://github.com/TwinProduction/gocache/workflows/build/badge.svg?branch=master) ![build](https://github.com/TwiN/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) [![Go Report Card](https://goreportcard.com/badge/github.com/TwiN/gocache)](https://goreportcard.com/report/github.com/TwiN/gocache)
[![codecov](https://codecov.io/gh/TwinProduction/gocache/branch/master/graph/badge.svg)](https://codecov.io/gh/TwinProduction/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/TwinProduction/gocache.svg)](https://github.com/TwinProduction/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/TwinProduction/gocache.svg)](https://pkg.go.dev/github.com/TwinProduction/gocache) [![Go Reference](https://pkg.go.dev/badge/github.com/TwiN/gocache.svg)](https://pkg.go.dev/github.com/TwiN/gocache)
[![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)
gocache is an easy-to-use, high-performance, lightweight and thread-safe (goroutine-safe) in-memory key-value cache 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. 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 ## 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) 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). | 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). | 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 ### Examples
@ -134,7 +134,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/TwinProduction/gocache" "github.com/TwiN/gocache"
) )
func main() { func main() {
@ -323,8 +323,8 @@ For the sake of convenience, a ready-to-go cache server is available through the
package main package main
import ( import (
"github.com/TwinProduction/gocache" "github.com/TwiN/gocache"
gocacheserver "github.com/TwinProduction/gocache/server" gocacheserver "github.com/TwiN/gocache/server"
) )
func main() { func main() {
@ -490,7 +490,7 @@ import (
"os/signal" "os/signal"
"syscall" "syscall"
"github.com/TwinProduction/gocache" "github.com/TwiN/gocache"
) )
const CacheFile = "gocache.data" const CacheFile = "gocache.data"

View File

@ -31,9 +31,9 @@ const (
) )
var ( var (
ErrKeyDoesNotExist = errors.New("key does not exist") ErrKeyDoesNotExist = errors.New("key does not exist") // Returned when a cache key does not exist
ErrKeyHasNoExpiration = errors.New("key has no expiration") ErrKeyHasNoExpiration = errors.New("key has no expiration") // Returned when a cache key has no expiration
ErrJanitorAlreadyRunning = errors.New("janitor is already running") 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 // Cache is the core struct of gocache which contains the data as well as all relevant configuration fields

View File

@ -42,7 +42,7 @@ func (cache *Cache) SaveToFile(path string) error {
if err != nil { if err != nil {
// Failed to encode the value, so we'll skip it. // 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(...) // 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 continue
} }
bucket.Put([]byte(bulkEntry.Key), buffer.Bytes()) 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 // 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. // 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 return err
} }
cache.entries[string(k)] = &entry cache.entries[string(k)] = &entry

1
vendor/github.com/TwiN/health/.gitattributes generated vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

9
vendor/github.com/TwiN/health/LICENSE.md generated vendored Normal file
View 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.

View File

@ -1,32 +1,30 @@
# health # health
![build](https://github.com/TwiN/health/workflows/build/badge.svg?branch=master)
![build](https://github.com/TwinProduction/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)
[![Go Report Card](https://goreportcard.com/badge/github.com/TwinProduction/health)](https://goreportcard.com/report/github.com/TwinProduction/health) [![codecov](https://codecov.io/gh/TwiN/health/branch/master/graph/badge.svg)](https://codecov.io/gh/TwiN/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/TwiN/health.svg)](https://github.com/TwiN/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/TwiN/health.svg)](https://pkg.go.dev/github.com/TwiN/health)
[![Go Reference](https://pkg.go.dev/badge/github.com/TwinProduction/health.svg)](https://pkg.go.dev/github.com/TwinProduction/health)
Health is a library used for creating a very simple health endpoint. 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 While implementing a health endpoint is very simple, I've grown tired of implementing
it over and over again. it over and over again.
## Installation
## Installation
``` ```
go get -u github.com/TwinProduction/health go get -u github.com/TwiN/health
``` ```
## Usage ## Usage
To retrieve the handler, you must use `health.Handler()` and are expected to pass it to the router like so: To retrieve the handler, you must use `health.Handler()` and are expected to pass it to the router like so:
```go ```go
router := http.NewServeMux() router := http.NewServeMux()
router.Handle("/health", health.Handler()) router.Handle("/health", health.Handler())
server := &http.Server{ server := &http.Server{
Addr: ":8080", Addr: ":8080",
Handler: router, Handler: router,
} }
``` ```
@ -45,28 +43,28 @@ health.SetStatus(health.Up)
health.SetStatus(health.Down) health.SetStatus(health.Down)
``` ```
### Complete example
### Complete example
```go ```go
package main package main
import ( import (
"net/http" "net/http"
"time" "time"
"github.com/TwinProduction/health" "github.com/TwiN/health"
) )
func main() { func main() {
router := http.NewServeMux() router := http.NewServeMux()
router.Handle("/health", health.Handler()) router.Handle("/health", health.Handler())
server := &http.Server{ server := &http.Server{
Addr: "0.0.0.0:8080", Addr: "0.0.0.0:8080",
Handler: router, Handler: router,
ReadTimeout: 15 * time.Second, ReadTimeout: 15 * time.Second,
WriteTimeout: 15 * time.Second, WriteTimeout: 15 * time.Second,
IdleTimeout: 15 * time.Second, IdleTimeout: 15 * time.Second,
} }
server.ListenAndServe() server.ListenAndServe()
} }
``` ```

View File

@ -9,6 +9,7 @@ var (
} }
) )
// healthHandler is the HTTP handler for serving the health endpoint
type healthHandler struct { type healthHandler struct {
useJSON bool useJSON bool
status Status status Status
@ -22,7 +23,8 @@ func (h *healthHandler) WithJSON(v bool) *healthHandler {
return h 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 status int
var body []byte var body []byte
if h.status == Up { if h.status == Up {

8
vendor/github.com/TwiN/health/status.go generated vendored Normal file
View 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
)

View File

@ -1 +0,0 @@
* text=lf

View File

@ -1,8 +0,0 @@
package health
type Status string
var (
Down Status = "DOWN"
Up Status = "UP"
)

10
vendor/modules.txt vendored
View File

@ -1,9 +1,9 @@
# github.com/TwinProduction/gocache v1.2.3 # github.com/TwiN/gocache v1.2.4
## explicit; go 1.16 ## explicit; go 1.16
github.com/TwinProduction/gocache github.com/TwiN/gocache
# github.com/TwinProduction/health v1.0.0 # github.com/TwiN/health v1.0.1
## explicit; go 1.15 ## explicit; go 1.17
github.com/TwinProduction/health github.com/TwiN/health
# github.com/beorn7/perks v1.0.1 # github.com/beorn7/perks v1.0.1
## explicit; go 1.11 ## explicit; go 1.11
github.com/beorn7/perks/quantile github.com/beorn7/perks/quantile

View File

@ -4,9 +4,9 @@ import (
"encoding/json" "encoding/json"
"log" "log"
"github.com/TwinProduction/gatus/v3/alerting" "github.com/TwiN/gatus/v3/alerting"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
// HandleAlerting takes care of alerts to resolve and alerts to trigger based on result success or failure // HandleAlerting takes care of alerts to resolve and alerts to trigger based on result success or failure

View File

@ -4,12 +4,12 @@ import (
"os" "os"
"testing" "testing"
"github.com/TwinProduction/gatus/v3/alerting" "github.com/TwiN/gatus/v3/alerting"
"github.com/TwinProduction/gatus/v3/alerting/alert" "github.com/TwiN/gatus/v3/alerting/alert"
"github.com/TwinProduction/gatus/v3/alerting/provider/custom" "github.com/TwiN/gatus/v3/alerting/provider/custom"
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty" "github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
"github.com/TwinProduction/gatus/v3/config" "github.com/TwiN/gatus/v3/config"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
) )
func TestHandleAlerting(t *testing.T) { func TestHandleAlerting(t *testing.T) {

View File

@ -6,12 +6,12 @@ import (
"sync" "sync"
"time" "time"
"github.com/TwinProduction/gatus/v3/alerting" "github.com/TwiN/gatus/v3/alerting"
"github.com/TwinProduction/gatus/v3/config" "github.com/TwiN/gatus/v3/config"
"github.com/TwinProduction/gatus/v3/config/maintenance" "github.com/TwiN/gatus/v3/config/maintenance"
"github.com/TwinProduction/gatus/v3/core" "github.com/TwiN/gatus/v3/core"
"github.com/TwinProduction/gatus/v3/metric" "github.com/TwiN/gatus/v3/metric"
"github.com/TwinProduction/gatus/v3/storage" "github.com/TwiN/gatus/v3/storage"
) )
var ( var (

View File

@ -1,6 +1,6 @@
<template> <template>
<div id="social"> <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"/> <img src="../assets/github.png" alt="GitHub" width="32" height="auto"/>
</a> </a>
</div> </div>

View File

@ -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 */ /*! 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