You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
354 B
17 lines
354 B
package agent_client
|
|
|
|
import (
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/schema_pb"
|
|
)
|
|
|
|
func (a *SubscribeSession) SubscribeMessageRecord(
|
|
onEachMessageFn func(key []byte, record *schema_pb.RecordValue),
|
|
onCompletionFn func()) error {
|
|
for {
|
|
resp, err := a.stream.Recv()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
onEachMessageFn(resp.Key, resp.Value)
|
|
}
|
|
}
|