Skip to content

Commit

Permalink
run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ketsiambaku committed Aug 16, 2024
1 parent 358b911 commit 2495592
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 6 deletions.
20 changes: 20 additions & 0 deletions internal/debug/lifecycle.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
// Copyright (c) 2017-2021 Uber Technologies Inc.
//
// 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.

package debug

import "go.uber.org/atomic"
Expand Down
20 changes: 20 additions & 0 deletions internal/debug/lifecycle_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
// Copyright (c) 2017-2021 Uber Technologies Inc.
//
// 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.

package debug

import (
Expand Down
5 changes: 3 additions & 2 deletions internal/internal_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"encoding/hex"
"errors"
"fmt"
"go.uber.org/cadence/internal/debug"
"io"
"os"
"reflect"
Expand All @@ -40,6 +39,8 @@ import (
"sync/atomic"
"time"

"go.uber.org/cadence/internal/debug"

"go.uber.org/cadence/internal/common/isolationgroup"

"github.com/opentracing/opentracing-go"
Expand Down Expand Up @@ -190,7 +191,7 @@ func ensureRequiredParams(params *workerExecutionParameters) {
}
if params.EventMonitoring.LifeCycle == nil {
params.EventMonitoring.LifeCycle = debug.NewLifeCycle()
params.Logger.Debug("No PollerLifeCycle configured for cadence worker. Use noop PollerLifeCycle as default.")
params.Logger.Debug("No PollerLifeCycle configured for cadence worker. Use default one.")
}
}

Expand Down
3 changes: 2 additions & 1 deletion internal/internal_worker_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ import (
"context"
"errors"
"fmt"
"go.uber.org/cadence/internal/debug"
"os"
"runtime"
"sync"
"syscall"
"time"

"go.uber.org/cadence/internal/debug"

"github.com/shirou/gopsutil/cpu"
"github.com/uber-go/tally"
"go.uber.org/zap"
Expand Down
3 changes: 2 additions & 1 deletion internal/internal_worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ package internal
import (
"context"
"errors"
"go.uber.org/cadence/internal/debug"
"os"
"reflect"
"runtime"
"sync"
"testing"
"time"

"go.uber.org/cadence/internal/debug"

"github.com/golang/mock/gomock"
"github.com/opentracing/opentracing-go"
"github.com/stretchr/testify/assert"
Expand Down
5 changes: 3 additions & 2 deletions internal/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ package internal

import (
"context"
"go.uber.org/cadence/debug"
"time"

"go.uber.org/cadence/debug"

"github.com/opentracing/opentracing-go"
"github.com/uber-go/tally"
"go.uber.org/zap"
Expand Down Expand Up @@ -275,7 +276,7 @@ type (

// Optional: EventMonitoring provides a set of methods that can be used to collect
// stats on the Worker for debugging purposes.
// default: noop implementation
// default: internal implementation provided
// Deprecated: in development and very likely to change
EventMonitoring debug.EventMonitoring
}
Expand Down

0 comments on commit 2495592

Please sign in to comment.