Skip to content

Commit

Permalink
fix deps
Browse files Browse the repository at this point in the history
  • Loading branch information
zc2638 committed Nov 18, 2023
1 parent 0210d74 commit 244af4e
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 183 deletions.
2 changes: 1 addition & 1 deletion core/command/ctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"strings"
"time"

"github.com/99nil/gopkg/printer"
"github.com/spf13/cobra"
"github.com/zc2638/wslog"
"golang.org/x/sync/errgroup"
Expand All @@ -33,7 +34,6 @@ import (
"github.com/zc2638/ink/core/worker/hooks"
v1 "github.com/zc2638/ink/pkg/api/core/v1"
"github.com/zc2638/ink/pkg/flags"
"github.com/zc2638/ink/pkg/printer"
)

func NewCtl() *cobra.Command {
Expand Down
12 changes: 3 additions & 9 deletions core/command/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"fmt"
"time"

"github.com/99nil/gopkg/server"
"github.com/99nil/gopkg/sets"
"github.com/spf13/cobra"
"github.com/zc2638/wslog"
"golang.org/x/sync/errgroup"
"gorm.io/gorm"

"github.com/zc2638/ink/core/constant"
Expand All @@ -33,8 +33,6 @@ import (
"github.com/zc2638/ink/pkg/database"
"github.com/zc2638/ink/pkg/livelog"
"github.com/zc2638/ink/pkg/queue"
"github.com/zc2638/ink/pkg/server"
"github.com/zc2638/ink/pkg/signals"
"github.com/zc2638/ink/resource"
)

Expand Down Expand Up @@ -74,17 +72,13 @@ func NewDaemon() *cobra.Command {

sched := scheduler.New(listInCompleteStages(db))

srv := server.New(cfg.Server)
srv := server.New(&cfg.Server)
srv.ReadTimeout = 0
srv.WriteTimeout = 0
srv.Handler = handler.New(log, db, ll, sched)
log.Info(fmt.Sprintf("Daemon listen on %s", srv.Addr))

eg, ctx := errgroup.WithContext(context.Background())
eg.Go(func() error { return signals.Exit(ctx) })
eg.Go(func() error { return srv.ListenAndServe() })
eg.Go(func() error { return server.Shutdown(ctx, srv) })
return eg.Wait()
return srv.RunAndStop(context.Background())
},
}

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/zc2638/ink
go 1.21.0

require (
github.com/99nil/gopkg v0.0.0-20231116031809-c8b52fe444ee
github.com/99nil/gopkg v0.0.0-20231117031104-b92c1eee778d
github.com/docker/distribution v2.8.2+incompatible
github.com/docker/docker v24.0.5+incompatible
github.com/docker/go-units v0.5.0
Expand Down Expand Up @@ -63,11 +63,11 @@ require (
github.com/stretchr/testify v1.8.2 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.12.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
github.com/99nil/gopkg v0.0.0-20231116031809-c8b52fe444ee h1:jDLuuFtEt1GGFV1GbsEIj41G99a+z+g58MgSyHE9heg=
github.com/99nil/gopkg v0.0.0-20231116031809-c8b52fe444ee/go.mod h1:/aCVq+yd2QmHOO+rD6fHafyjx+HfOh/qGz54Re/3oT0=
github.com/99nil/gopkg v0.0.0-20231117031104-b92c1eee778d h1:aeQmaBZiFhZ+vigb8enMx1pIw0xkRHKgrEaFMO/iMcQ=
github.com/99nil/gopkg v0.0.0-20231117031104-b92c1eee778d/go.mod h1:yQy7Xa2r1VHYfgqfCuDE6VGDmBt8xJgDVTZ2Bw3xTW0=
github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg=
github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k=
github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
Expand Down Expand Up @@ -1244,6 +1246,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA=
golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down Expand Up @@ -1366,6 +1370,7 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
Expand Down Expand Up @@ -1527,6 +1532,7 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand All @@ -1545,6 +1551,7 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
83 changes: 0 additions & 83 deletions pkg/printer/printer.go

This file was deleted.

47 changes: 0 additions & 47 deletions pkg/server/server.go

This file was deleted.

38 changes: 0 additions & 38 deletions pkg/signals/signal.go

This file was deleted.

0 comments on commit 244af4e

Please sign in to comment.