s3: add grpc server to accept configuration changes
This commit is contained in:
16
weed/s3api/s3api_server_grpc.go
Normal file
16
weed/s3api/s3api_server_grpc.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package s3api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/s3_pb"
|
||||
)
|
||||
|
||||
func (s3a *S3ApiServer) Configure(ctx context.Context, request *s3_pb.ConfigureRequest) (*s3_pb.ConfigureResponse, error) {
|
||||
|
||||
if err := s3a.iam.LoadS3ApiConfigurationFromBytes(request.ConfigurationFileContent); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &s3_pb.ConfigureResponse{}, nil
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user