|
|
|
@ -20,8 +20,10 @@ import ( |
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/filer" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/iam" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/iam_pb" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/security" |
|
|
|
weed_server "github.com/seaweedfs/seaweedfs/weed/server" |
|
|
|
stats_collect "github.com/seaweedfs/seaweedfs/weed/stats" |
|
|
|
@ -389,6 +391,15 @@ func (fo *FilerOptions) startFiler() { |
|
|
|
} |
|
|
|
grpcS := pb.NewGrpcServer(security.LoadServerTLS(util.GetViper(), "grpc.filer")) |
|
|
|
filer_pb.RegisterSeaweedFilerServer(grpcS, fs) |
|
|
|
|
|
|
|
// IAM Service
|
|
|
|
iamStorage, err := iam.NewFilerIamStorage(nil, func() string { return filerAddress }, security.LoadClientTLS(util.GetViper(), "grpc.filer")) |
|
|
|
if err != nil { |
|
|
|
glog.Errorf("Failed to initialize IAM storage: %v", err) |
|
|
|
} else { |
|
|
|
iamGrpcS := weed_server.NewIamGrpcServer(iamStorage) |
|
|
|
iam_pb.RegisterSeaweedIdentityAccessManagementServer(grpcS, iamGrpcS) |
|
|
|
} |
|
|
|
reflection.Register(grpcS) |
|
|
|
if grpcLocalL != nil { |
|
|
|
go grpcS.Serve(grpcLocalL) |
|
|
|
|