Modified how logging with monitord container is implemented, with simpler logic thanks to the argo client library and k8 client-go for pods' logs
This commit is contained in:
@@ -3,17 +3,15 @@ package tools
|
||||
import (
|
||||
"errors"
|
||||
"io"
|
||||
"oc-monitord/models"
|
||||
"sync"
|
||||
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
)
|
||||
|
||||
type Tool interface {
|
||||
CreateArgoWorkflow(path string, ns string) (string, error)
|
||||
CreateAccessSecret(ns string, login string, password string) (string, error)
|
||||
LogWorkflow(execID string, namespace string, workflowName string, argoFilePath string, stepMax int, current_watch *models.ArgoWatch, previous_watch *models.ArgoWatch,
|
||||
argoLogs *models.ArgoLogs, seen []string,
|
||||
logFunc func(argoFilePath string, stepMax int, pipe io.ReadCloser, current_watch *models.ArgoWatch, previous_watch *models.ArgoWatch,
|
||||
argoLogs *models.ArgoLogs, seen []string, wg *sync.WaitGroup)) error
|
||||
GetArgoWatch(executionId string, wfName string) (watch.Interface, error)
|
||||
GetPodLogger(ns string, wfName string, podName string) (io.ReadCloser, error)
|
||||
}
|
||||
|
||||
var _service = map[string]func() (Tool, error){
|
||||
|
||||
Reference in New Issue
Block a user