diff --git a/grpc.go b/grpc.go index 0d2650b..6803920 100644 --- a/grpc.go +++ b/grpc.go @@ -1,7 +1,6 @@ package contracts import ( - "github.com/samber/do" "google.golang.org/grpc" ) @@ -24,9 +23,3 @@ type GRpcBase struct { func (GRpcBase) GetGRpcServiceDesc() *grpc.ServiceDesc { return nil } - -func NewJGRpcBase(container *do.Injector) GRpc { - return &GRpcBase{ - Controller: &BaseController{container}, - } -} diff --git a/job.go b/job.go index aa83c10..83e5352 100644 --- a/job.go +++ b/job.go @@ -1,9 +1,5 @@ package contracts -import ( - "github.com/samber/do" -) - type JobService interface { Start() error Stop() error @@ -14,19 +10,13 @@ type JobService interface { type Job interface { Controller // 任务处理 - Handle(any) error + Handle(any, User) error } type JobBase struct { Controller } -func (JobBase) Handle(any) error { +func (JobBase) Handle(any, User) error { return nil } - -func NewJobBase(container *do.Injector) Job { - return &JobBase{ - Controller: &BaseController{container}, - } -}