|
|
@ -138,11 +138,11 @@ func maybeStartMetrics(fs *FilerServer, option *FilerOption) { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func readFilerConfiguration(grpcDialOption grpc.DialOption, masterGrpcAddress string) (metricsAddress string, metricsIntervalSec int, err error) { |
|
|
|
err = operation.WithMasterServerClient(masterGrpcAddress, grpcDialOption, func(masterClient master_pb.SeaweedClient) error { |
|
|
|
func readFilerConfiguration(grpcDialOption grpc.DialOption, masterAddress string) (metricsAddress string, metricsIntervalSec int, err error) { |
|
|
|
err = operation.WithMasterServerClient(masterAddress, grpcDialOption, func(masterClient master_pb.SeaweedClient) error { |
|
|
|
resp, err := masterClient.GetMasterConfiguration(context.Background(), &master_pb.GetMasterConfigurationRequest{}) |
|
|
|
if err != nil { |
|
|
|
return fmt.Errorf("get master %s configuration: %v", masterGrpcAddress, err) |
|
|
|
return fmt.Errorf("get master %s configuration: %v", masterAddress, err) |
|
|
|
} |
|
|
|
metricsAddress, metricsIntervalSec = resp.MetricsAddress, int(resp.MetricsIntervalSeconds) |
|
|
|
return nil |
|
|
|