mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
rename
This commit is contained in:
parent
bbd3c586f6
commit
8bc16f1149
|
@ -16,7 +16,7 @@ func FollowMetadata(filerAddress ServerAddress, grpcDialOption grpc.DialOption,
|
||||||
pathPrefix string, additionalPathPrefixes []string, lastTsNs int64, selfSignature int32,
|
pathPrefix string, additionalPathPrefixes []string, lastTsNs int64, selfSignature int32,
|
||||||
processEventFn ProcessMetadataFunc, fatalOnError bool) error {
|
processEventFn ProcessMetadataFunc, fatalOnError bool) error {
|
||||||
|
|
||||||
err := WithFilerClient(true, filerAddress, grpcDialOption, makeFunc(clientName, clientId,
|
err := WithFilerClient(true, filerAddress, grpcDialOption, makeSubscribeMetadataFunc(clientName, clientId,
|
||||||
pathPrefix, additionalPathPrefixes, &lastTsNs, selfSignature, processEventFn, fatalOnError))
|
pathPrefix, additionalPathPrefixes, &lastTsNs, selfSignature, processEventFn, fatalOnError))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("subscribing filer meta change: %v", err)
|
return fmt.Errorf("subscribing filer meta change: %v", err)
|
||||||
|
@ -28,7 +28,7 @@ func WithFilerClientFollowMetadata(filerClient filer_pb.FilerClient,
|
||||||
clientName string, clientId int32, pathPrefix string, lastTsNs *int64, selfSignature int32,
|
clientName string, clientId int32, pathPrefix string, lastTsNs *int64, selfSignature int32,
|
||||||
processEventFn ProcessMetadataFunc, fatalOnError bool) error {
|
processEventFn ProcessMetadataFunc, fatalOnError bool) error {
|
||||||
|
|
||||||
err := filerClient.WithFilerClient(true, makeFunc(clientName, clientId,
|
err := filerClient.WithFilerClient(true, makeSubscribeMetadataFunc(clientName, clientId,
|
||||||
pathPrefix, nil, lastTsNs, selfSignature, processEventFn, fatalOnError))
|
pathPrefix, nil, lastTsNs, selfSignature, processEventFn, fatalOnError))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("subscribing filer meta change: %v", err)
|
return fmt.Errorf("subscribing filer meta change: %v", err)
|
||||||
|
@ -37,7 +37,7 @@ func WithFilerClientFollowMetadata(filerClient filer_pb.FilerClient,
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeFunc(clientName string, clientId int32, pathPrefix string, additionalPathPrefixes []string, lastTsNs *int64, selfSignature int32,
|
func makeSubscribeMetadataFunc(clientName string, clientId int32, pathPrefix string, additionalPathPrefixes []string, lastTsNs *int64, selfSignature int32,
|
||||||
processEventFn ProcessMetadataFunc, fatalOnError bool) func(client filer_pb.SeaweedFilerClient) error {
|
processEventFn ProcessMetadataFunc, fatalOnError bool) func(client filer_pb.SeaweedFilerClient) error {
|
||||||
return func(client filer_pb.SeaweedFilerClient) error {
|
return func(client filer_pb.SeaweedFilerClient) error {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
|
Loading…
Reference in a new issue