Skip to content

Commit

Permalink
Pre-PR fixups
Browse files Browse the repository at this point in the history
Signed-off-by: Corbin Phelps <[email protected]>
  • Loading branch information
Corbin Phelps committed Jul 25, 2022
1 parent 06dadb2 commit f6b6e86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packagestate/packages_state_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
// CollectorPackageName is the name for the top level packages for this collector
const CollectorPackageName = "observiq-otel-collector"

// DefaultFileName is the default name of the file use to start state
// DefaultFileName is the default name of the file use to store state
const DefaultFileName = "package_statuses.json"

// StateManager tracks Package states
Expand Down
1 change: 1 addition & 0 deletions updater/cmd/updater/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func main() {
}

// Create a monitor and load the package status file
// TODO replace nop logger with real one
monitor, err := state.NewCollectorMonitor(zap.NewNop())
if err != nil {
log.Fatalln("Failed to create monitor:", err)
Expand Down
4 changes: 2 additions & 2 deletions updater/internal/state/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Monitor interface {
// If passed in statusErr is not nil it will record the error as the message
SetState(packageName string, status protobufs.PackageStatus_Status, statusErr error) error

// MonitorForSuccess will periodically check the state of the package. It will keep checking until the context is canceled.
// MonitorForSuccess will periodically check the state of the package. It will keep checking until the context is canceled or a failed/success state is detected.
// It will return an error if status is Failed or if the context times out.
MonitorForSuccess(ctx context.Context, packageName string) error
}
Expand All @@ -51,7 +51,7 @@ type CollectorMonitor struct {
currentStatus *protobufs.PackageStatuses
}

// NewCollectorMonitor create a new Monitor specificalyl for the collector
// NewCollectorMonitor create a new Monitor specifically for the collector
func NewCollectorMonitor(logger *zap.Logger) (Monitor, error) {
// Get install directory
installDir, err := path.InstallDir()
Expand Down

0 comments on commit f6b6e86

Please sign in to comment.