mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 09:38:39 +08:00
issue: #33285 - use reader but not consumer for pulsar - advanced test framework - move some streaming related package into pkg --------- Signed-off-by: chyezh <chyezh@outlook.com>
33 lines
676 B
Go
33 lines
676 B
Go
//go:build test
|
|
// +build test
|
|
|
|
package walimplstest
|
|
|
|
import (
|
|
"github.com/milvus-io/milvus/pkg/streaming/util/message"
|
|
"github.com/milvus-io/milvus/pkg/streaming/walimpls"
|
|
"github.com/milvus-io/milvus/pkg/streaming/walimpls/registry"
|
|
)
|
|
|
|
const (
|
|
walName = "test"
|
|
)
|
|
|
|
func init() {
|
|
// register the builder to the registry.
|
|
registry.RegisterBuilder(&openerBuilder{})
|
|
message.RegisterMessageIDUnmsarshaler(walName, UnmarshalTestMessageID)
|
|
}
|
|
|
|
var _ walimpls.OpenerBuilderImpls = &openerBuilder{}
|
|
|
|
type openerBuilder struct{}
|
|
|
|
func (o *openerBuilder) Name() string {
|
|
return walName
|
|
}
|
|
|
|
func (o *openerBuilder) Build() (walimpls.OpenerImpls, error) {
|
|
return &opener{}, nil
|
|
}
|