-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from chatwork/implement_sigterm
Implementation SIGTERM
- Loading branch information
Showing
15 changed files
with
262 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
package cmd | ||
|
||
import ( | ||
"context" | ||
"time" | ||
|
||
"github.com/chatwork/kibertas/util/notify" | ||
"github.com/sirupsen/logrus" | ||
"k8s.io/client-go/kubernetes" | ||
) | ||
|
||
type Checker struct { | ||
Namespace string | ||
Clientset *kubernetes.Clientset | ||
Debug bool | ||
Logger func() *logrus.Entry | ||
Chatwork *notify.Chatwork | ||
Timeout time.Duration | ||
Ctx context.Context | ||
Debug bool | ||
Logger func() *logrus.Entry | ||
Chatwork *notify.Chatwork | ||
Timeout time.Duration | ||
} | ||
|
||
func NewChecker(namespace string, clientset *kubernetes.Clientset, debug bool, logger func() *logrus.Entry, chatwork *notify.Chatwork, timeout time.Duration) *Checker { | ||
func NewChecker(ctx context.Context, debug bool, logger func() *logrus.Entry, chatwork *notify.Chatwork, timeout time.Duration) *Checker { | ||
logger().Info("Checker timeout: ", timeout) | ||
|
||
return &Checker{ | ||
Namespace: namespace, | ||
Clientset: clientset, | ||
Debug: debug, | ||
Logger: logger, | ||
Chatwork: chatwork, | ||
Timeout: timeout, | ||
Ctx: ctx, | ||
Debug: debug, | ||
Logger: logger, | ||
Chatwork: chatwork, | ||
Timeout: timeout, | ||
} | ||
} |
Oops, something went wrong.