Updated versionand remote
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/cli"
|
"git.cer.sh/axodouble/quptime/internal/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module github.com/jasper/quptime
|
module git.cer.sh/axodouble/quptime
|
||||||
|
|
||||||
go 1.23
|
go 1.23.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/spf13/cobra v1.8.1
|
github.com/spf13/cobra v1.8.1
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// discordTimeout caps how long a single webhook POST is allowed to
|
// discordTimeout caps how long a single webhook POST is allowed to
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/checks"
|
"git.cer.sh/axodouble/quptime/internal/checks"
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Dispatcher fans an aggregator transition out to every alert listed
|
// Dispatcher fans an aggregator transition out to every alert listed
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/checks"
|
"git.cer.sh/axodouble/quptime/internal/checks"
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Message is the rendered notification ready to ship across any
|
// Message is the rendered notification ready to ship across any
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/checks"
|
"git.cer.sh/axodouble/quptime/internal/checks"
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRenderDownTransition(t *testing.T) {
|
func TestRenderDownTransition(t *testing.T) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"net/smtp"
|
"net/smtp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// sendSMTP delivers msg through the alert's SMTP relay. STARTTLS is
|
// sendSMTP delivers msg through the alert's SMTP relay. STARTTLS is
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// State is the aggregate verdict on one check.
|
// State is the aggregate verdict on one check.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAggregatorHysteresisRequiresConsecutiveEvals(t *testing.T) {
|
func TestAggregatorHysteresisRequiresConsecutiveEvals(t *testing.T) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// maxBodyRead is the cap on how much body a check will pull when
|
// maxBodyRead is the cap on how much body a check will pull when
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
probing "github.com/prometheus-community/pro-bing"
|
probing "github.com/prometheus-community/pro-bing"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type icmpProber struct{}
|
type icmpProber struct{}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Result is the outcome of a single probe.
|
// Result is the outcome of a single probe.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHTTPProberHappyPath(t *testing.T) {
|
func TestHTTPProberHappyPath(t *testing.T) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReconcileInterval is how often the scheduler reconciles its set of
|
// ReconcileInterval is how often the scheduler reconciles its set of
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type tcpProber struct{}
|
type tcpProber struct{}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/daemon"
|
"git.cer.sh/axodouble/quptime/internal/daemon"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addAlertCmd(root *cobra.Command) {
|
func addAlertCmd(root *cobra.Command) {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/daemon"
|
"git.cer.sh/axodouble/quptime/internal/daemon"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addCheckCmd(root *cobra.Command) {
|
func addCheckCmd(root *cobra.Command) {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/daemon"
|
"git.cer.sh/axodouble/quptime/internal/daemon"
|
||||||
)
|
)
|
||||||
|
|
||||||
// callDaemon sends one control-plane request and decodes the
|
// callDaemon sends one control-plane request and decodes the
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/crypto"
|
"git.cer.sh/axodouble/quptime/internal/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addInitCmd(root *cobra.Command) {
|
func addInitCmd(root *cobra.Command) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/daemon"
|
"git.cer.sh/axodouble/quptime/internal/daemon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addNodeCmd(root *cobra.Command) {
|
func addNodeCmd(root *cobra.Command) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/daemon"
|
"git.cer.sh/axodouble/quptime/internal/daemon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addServeCmd(root *cobra.Command) {
|
func addServeCmd(root *cobra.Command) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/daemon"
|
"git.cer.sh/axodouble/quptime/internal/daemon"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addStatusCmd(root *cobra.Command) {
|
func addStatusCmd(root *cobra.Command) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/daemon"
|
"git.cer.sh/axodouble/quptime/internal/daemon"
|
||||||
"github.com/jasper/quptime/internal/trust"
|
"git.cer.sh/axodouble/quptime/internal/trust"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addTrustCmd(root *cobra.Command) {
|
func addTrustCmd(root *cobra.Command) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// KeySize is the RSA modulus size used by qu.
|
// KeySize is the RSA modulus size used by qu.
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/crypto"
|
"git.cer.sh/axodouble/quptime/internal/crypto"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
"github.com/jasper/quptime/internal/trust"
|
"git.cer.sh/axodouble/quptime/internal/trust"
|
||||||
)
|
)
|
||||||
|
|
||||||
// controlMaxFrame caps unix-socket request/response frames. Generous
|
// controlMaxFrame caps unix-socket request/response frames. Generous
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/alerts"
|
"git.cer.sh/axodouble/quptime/internal/alerts"
|
||||||
"github.com/jasper/quptime/internal/checks"
|
"git.cer.sh/axodouble/quptime/internal/checks"
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/crypto"
|
"git.cer.sh/axodouble/quptime/internal/crypto"
|
||||||
"github.com/jasper/quptime/internal/quorum"
|
"git.cer.sh/axodouble/quptime/internal/quorum"
|
||||||
"github.com/jasper/quptime/internal/replicate"
|
"git.cer.sh/axodouble/quptime/internal/replicate"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
"github.com/jasper/quptime/internal/trust"
|
"git.cer.sh/axodouble/quptime/internal/trust"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Daemon is the live process: every long-running component lives here.
|
// Daemon is the live process: every long-running component lives here.
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/checks"
|
"git.cer.sh/axodouble/quptime/internal/checks"
|
||||||
"github.com/jasper/quptime/internal/crypto"
|
"git.cer.sh/axodouble/quptime/internal/crypto"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
"github.com/jasper/quptime/internal/trust"
|
"git.cer.sh/axodouble/quptime/internal/trust"
|
||||||
)
|
)
|
||||||
|
|
||||||
// registerHandlers wires every inter-node RPC method that the daemon
|
// registerHandlers wires every inter-node RPC method that the daemon
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Defaults for the heartbeat loop. The dead-after is comfortably
|
// Defaults for the heartbeat loop. The dead-after is comfortably
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
func threeNode(self string) (*config.ClusterConfig, *Manager) {
|
func threeNode(self string) (*config.ClusterConfig, *Manager) {
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MasterView is the minimum the replicator needs from the quorum
|
// MasterView is the minimum the replicator needs from the quorum
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/transport"
|
"git.cer.sh/axodouble/quptime/internal/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
type fakeMaster struct {
|
type fakeMaster struct {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Method names. Defined here so every package agrees on the wire-level
|
// Method names. Defined here so every package agrees on the wire-level
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/crypto"
|
"git.cer.sh/axodouble/quptime/internal/crypto"
|
||||||
"github.com/jasper/quptime/internal/trust"
|
"git.cer.sh/axodouble/quptime/internal/trust"
|
||||||
)
|
)
|
||||||
|
|
||||||
// testNode bundles everything one side of the handshake needs.
|
// testNode bundles everything one side of the handshake needs.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/trust"
|
"git.cer.sh/axodouble/quptime/internal/trust"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MinTLS is the minimum protocol version both sides require.
|
// MinTLS is the minimum protocol version both sides require.
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import (
|
|||||||
|
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/config"
|
"git.cer.sh/axodouble/quptime/internal/config"
|
||||||
"github.com/jasper/quptime/internal/crypto"
|
"git.cer.sh/axodouble/quptime/internal/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Entry is one trusted peer.
|
// Entry is one trusted peer.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/pem"
|
"encoding/pem"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jasper/quptime/internal/crypto"
|
"git.cer.sh/axodouble/quptime/internal/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRoundtripAndLookup(t *testing.T) {
|
func TestRoundtripAndLookup(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user