add remaining services

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2021-03-09 16:03:47 +00:00
parent 29910838c1
commit 2bfdab8735
24 changed files with 135 additions and 187 deletions
+5 -3
View File
@@ -6,10 +6,12 @@ import (
"strings"
"github.com/micro/cli/v2"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/thumbnails/pkg/config"
"github.com/owncloud/ocis/thumbnails/pkg/version"
"github.com/spf13/viper"
"github.com/thejerf/suture"
)
// Execute is the entry point for the ocis-thumbnails command.
@@ -113,13 +115,13 @@ type SutureService struct {
}
// NewSutureService creates a new thumbnails.SutureService
func NewSutureService(ctx context.Context, cfg *config.Config) SutureService {
func NewSutureService(ctx context.Context, cfg *ociscfg.Config) suture.Service {
sctx, cancel := context.WithCancel(ctx)
cfg.Context = sctx // propagate the context down to the go-micro services.
cfg.Thumbnails.Context = sctx
return SutureService{
ctx: sctx,
cancel: cancel,
cfg: cfg,
cfg: cfg.Thumbnails,
}
}