Skip to content

Commit

Permalink
feat(slack): polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
rkettelerij committed Apr 16, 2024
1 parent 1981182 commit b0b0ec0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package service
package providers

import (
"encoding/json"
"log"

"github.com/PDOK/uptime-operator/internal/model"
"github.com/PDOK/uptime-operator/internal/service"
)

type MockUptimeProvider struct {
checks map[string]model.UptimeCheck
}

func NewMockUptimeProvider() UptimeProvider {
func NewMockUptimeProvider() service.UptimeProvider {
return &MockUptimeProvider{
checks: make(map[string]model.UptimeCheck),
}
Expand Down
3 changes: 2 additions & 1 deletion internal/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

m "github.com/PDOK/uptime-operator/internal/model"
"github.com/PDOK/uptime-operator/internal/service/providers"

Check failure on line 8 in internal/service/service.go

View workflow job for this annotation

GitHub Actions / test

no such package located
"sigs.k8s.io/controller-runtime/pkg/log"
)

Expand All @@ -17,7 +18,7 @@ func New(provider string, slackToken string, slackChannel string) *UptimeCheckSe
var p UptimeProvider
switch provider {
case "mock":
p = NewMockUptimeProvider()
p = providers.NewMockUptimeProvider()
// TODO add new case(s) for actual uptime monitoring SaaS providers
}

Expand Down

0 comments on commit b0b0ec0

Please sign in to comment.