diff options
| author | chrislu <chris.lu@gmail.com> | 2023-01-20 01:48:12 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-01-20 01:48:12 -0800 |
| commit | 81fdf3651b1f60642fc15bd2b55ed0bd31afac15 (patch) | |
| tree | 19129015db907153d6aa89058c621e2bf93a6bae /weed/s3api | |
| parent | b04865974905c2b31eb23b966df6386172e5ba50 (diff) | |
| download | seaweedfs-81fdf3651b1f60642fc15bd2b55ed0bd31afac15.tar.xz seaweedfs-81fdf3651b1f60642fc15bd2b55ed0bd31afac15.zip | |
grpc connection to filer add sw-client-id header
Diffstat (limited to 'weed/s3api')
| -rw-r--r-- | weed/s3api/auth_credentials.go | 2 | ||||
| -rw-r--r-- | weed/s3api/s3api_circuit_breaker.go | 2 | ||||
| -rw-r--r-- | weed/s3api/s3api_handlers.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go index 82ac3688c..876acd7cf 100644 --- a/weed/s3api/auth_credentials.go +++ b/weed/s3api/auth_credentials.go @@ -92,7 +92,7 @@ func NewIdentityAccessManagement(option *S3ApiServerOption) *IdentityAccessManag func (iam *IdentityAccessManagement) loadS3ApiConfigurationFromFiler(option *S3ApiServerOption) (err error) { var content []byte - err = pb.WithFilerClient(false, option.Filer, option.GrpcDialOption, func(client filer_pb.SeaweedFilerClient) error { + err = pb.WithFilerClient(false, 0, option.Filer, option.GrpcDialOption, func(client filer_pb.SeaweedFilerClient) error { content, err = filer.ReadInsideFiler(client, filer.IamConfigDirectory, filer.IamIdentityFile) return err }) diff --git a/weed/s3api/s3api_circuit_breaker.go b/weed/s3api/s3api_circuit_breaker.go index 870c65d2b..0cc0b08d2 100644 --- a/weed/s3api/s3api_circuit_breaker.go +++ b/weed/s3api/s3api_circuit_breaker.go @@ -28,7 +28,7 @@ func NewCircuitBreaker(option *S3ApiServerOption) *CircuitBreaker { limitations: make(map[string]int64), } - err := pb.WithFilerClient(false, option.Filer, option.GrpcDialOption, func(client filer_pb.SeaweedFilerClient) error { + err := pb.WithFilerClient(false, 0, option.Filer, option.GrpcDialOption, func(client filer_pb.SeaweedFilerClient) error { content, err := filer.ReadInsideFiler(client, s3_constants.CircuitBreakerConfigDir, s3_constants.CircuitBreakerConfigFile) if err != nil { return fmt.Errorf("read S3 circuit breaker config: %v", err) diff --git a/weed/s3api/s3api_handlers.go b/weed/s3api/s3api_handlers.go index b85ff485d..81d7017dc 100644 --- a/weed/s3api/s3api_handlers.go +++ b/weed/s3api/s3api_handlers.go @@ -16,7 +16,7 @@ var _ = filer_pb.FilerClient(&S3ApiServer{}) func (s3a *S3ApiServer) WithFilerClient(streamingMode bool, fn func(filer_pb.SeaweedFilerClient) error) error { - return pb.WithGrpcClient(streamingMode, func(grpcConnection *grpc.ClientConn) error { + return pb.WithGrpcClient(streamingMode, s3a.randomClientId, func(grpcConnection *grpc.ClientConn) error { client := filer_pb.NewSeaweedFilerClient(grpcConnection) return fn(client) }, s3a.option.Filer.ToGrpcAddress(), false, s3a.option.GrpcDialOption) |
