25 lines
612 B
Go
25 lines
612 B
Go
package rpc
|
|
|
|
import (
|
|
"gitlink.org.cn/cloudream/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"
|
|
)
|
|
|
|
type Service struct {
|
|
swWorker *exec.Worker
|
|
stgPool *pool.Pool
|
|
accessToken *accesstoken.Cache
|
|
}
|
|
|
|
func NewService(swWorker *exec.Worker, stgPool *pool.Pool, accessToken *accesstoken.Cache) *Service {
|
|
return &Service{
|
|
swWorker: swWorker,
|
|
stgPool: stgPool,
|
|
accessToken: accessToken,
|
|
}
|
|
}
|
|
|
|
var _ hubrpc.HubAPI = (*Service)(nil)
|