Compare commits

..

No commits in common. "main" and "v1.3.1" have entirely different histories.
main ... v1.3.1

3 changed files with 8 additions and 27 deletions

View File

@ -1,9 +0,0 @@
kind: pipeline
type: docker
name: "test"
steps:
- name: test
image: harbor.front.kjuulh.io/docker-proxy/library/bash:latest
commands:
- echo 'Run tests'

View File

@ -4,7 +4,6 @@ import (
"context" "context"
"os" "os"
"sync" "sync"
"time"
) )
const ( const (
@ -34,9 +33,7 @@ func NewManager() *Manager {
type ComponentsAreReady struct { type ComponentsAreReady struct {
} }
type CleanupFunc func(ctx context.Context) error func (m *Manager) RunNonBlocking(ctx context.Context, readyChan chan ComponentsAreReady) error {
func (m *Manager) RunNonBlocking(ctx context.Context, readyChan chan ComponentsAreReady) (CleanupFunc, error) {
go func() error { go func() error {
m.initLifetime() m.initLifetime()
err := m.init(ctx) err := m.init(ctx)
@ -56,12 +53,13 @@ func (m *Manager) RunNonBlocking(ctx context.Context, readyChan chan ComponentsA
return err return err
} }
err = m.shutdown(ctx)
if err != nil {
return err
}
return nil return nil
}() }()
return nil
return func(ctx context.Context) error {
return m.shutdown(ctx)
}, nil
} }
func (m *Manager) Run(ctx context.Context) error { func (m *Manager) Run(ctx context.Context) error {
@ -164,13 +162,8 @@ func (m *Manager) initLifetime() {
} }
func (m *Manager) wait(ctx context.Context) error { func (m *Manager) wait(ctx context.Context) error {
select { exitCode := <-m.exitChan
case exitCode := <-m.exitChan: m.exitCode = exitCode
m.exitCode = exitCode
return nil
case <-ctx.Done():
return nil
}
return nil return nil
} }

View File

@ -1,3 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}