package hubrpc

import (
	"gitlink.org.cn/cloudream/jcs-pub/common/pkgs/rpc"
)

type HubAPI interface {
	CacheSvc
	IOSwitchSvc
	MicsSvc
	UserSpaceSvc
}

type Server struct {
	UnimplementedHubServer
	*rpc.ServerBase
	svrImpl HubAPI
}

func NewServer(cfg rpc.Config, impl HubAPI) *Server {
	svr := &Server{
		svrImpl: impl,
	}
	svr.ServerBase = rpc.NewServerBase(cfg, svr, &Hub_ServiceDesc)
	return svr
}

var _ HubServer = (*Server)(nil)
