本文整理匯總了Golang中github.com/youtube/vitess/go/vt/proto/binlogservice.UpdateStream_StreamTablesServer類的典型用法代碼示例。如果您正苦於以下問題:Golang UpdateStream_StreamTablesServer類的具體用法?Golang UpdateStream_StreamTablesServer怎麽用?Golang UpdateStream_StreamTablesServer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了UpdateStream_StreamTablesServer類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: StreamTables
// StreamTables is part of the pbs.UpdateStreamServer interface
func (server *UpdateStream) StreamTables(req *pb.StreamTablesRequest, stream pbs.UpdateStream_StreamTablesServer) (err error) {
defer server.updateStream.HandlePanic(&err)
return server.updateStream.StreamTables(req.Position, req.Tables, req.Charset, func(reply *pb.BinlogTransaction) error {
return stream.Send(&pb.StreamTablesResponse{
BinlogTransaction: reply,
})
})
}
示例2: StreamTables
// StreamTables is part of the pbs.UpdateStreamServer interface
func (server *UpdateStream) StreamTables(req *pb.StreamTablesRequest, stream pbs.UpdateStream_StreamTablesServer) (err error) {
defer server.updateStream.HandlePanic(&err)
return server.updateStream.StreamTables(&proto.TablesRequest{
Position: myproto.ProtoToReplicationPosition(req.Position),
Tables: req.Tables,
Charset: mproto.ProtoToCharset(req.Charset),
}, func(reply *proto.BinlogTransaction) error {
return stream.Send(&pb.StreamTablesResponse{
BinlogTransaction: proto.BinlogTransactionToProto(reply),
})
})
}