mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-02 00:45:30 +08:00
23 lines
354 B
Go
23 lines
354 B
Go
package client
|
|
|
|
import "context"
|
|
|
|
type ProducerOptions struct {
|
|
Topic string
|
|
}
|
|
|
|
type ProducerMessage struct {
|
|
Payload []byte
|
|
Properties map[string]string
|
|
}
|
|
|
|
type Producer interface {
|
|
// return the topic which producer is publishing to
|
|
//Topic() string
|
|
|
|
// publish a message
|
|
Send(ctx context.Context, message *ProducerMessage) error
|
|
|
|
Close()
|
|
}
|