28 lines
761 B
Go
28 lines
761 B
Go
package rpc
|
|
|
|
import (
|
|
"gitlink.org.cn/cloudream/jcs-pub/common/pkgs/ioswitch/exec"
|
|
hubrpc "gitlink.org.cn/cloudream/jcs-pub/common/pkgs/rpc/hub"
|
|
"gitlink.org.cn/cloudream/jcs-pub/common/pkgs/storage/pool"
|
|
"gitlink.org.cn/cloudream/jcs-pub/hub/internal/accesstoken"
|
|
"gitlink.org.cn/cloudream/jcs-pub/hub/internal/pubshards"
|
|
)
|
|
|
|
type Service struct {
|
|
swWorker *exec.Worker
|
|
stgPool *pool.Pool
|
|
accessToken *accesstoken.Cache
|
|
pubShards *pubshards.Pool
|
|
}
|
|
|
|
func NewService(swWorker *exec.Worker, stgPool *pool.Pool, accessToken *accesstoken.Cache, pubShards *pubshards.Pool) *Service {
|
|
return &Service{
|
|
swWorker: swWorker,
|
|
stgPool: stgPool,
|
|
accessToken: accessToken,
|
|
pubShards: pubShards,
|
|
}
|
|
}
|
|
|
|
var _ hubrpc.HubAPI = (*Service)(nil)
|