Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Host of the kafka brokers. Host []string // KafkaVersion denotes the expecting kafka version used by this client. KafkaVersion string // contains filtered or unexported fields }
Client defines object for SSE instance client
func (*Client) GetKafkaVersion ¶
GetKafkaVersion gets the kafka version
func (*Client) PublishEvent ¶
func (s *Client) PublishEvent(ctx context.Context, topic string, key string, payload interface{}) (err error)
PublishEvent has functionality to publish event to kafka brokers. For payload, you can use marshalable types, such as struct or map[string]interface{}. PublishEvent will publish message to kafka broker in asynchronous fashion.
type ISseClient ¶
type ISseClient interface { // PublishEvent has functionality to publish event to kafka brokers PublishEvent(ctx context.Context, topic string, key string, payload interface{}) (err error) // SetKafkaVersion sets the kafka version SetKafkaVersion(ctx context.Context, version string) // GetKafkaVersion gets the kafka version GetKafkaVersion(ctx context.Context) string }
ISseClient defines interface of SSE client
func NewSseClient ¶
func NewSseClient(host []string, opts ...kafka.ProducerConfigOption) ISseClient
NewSseClient initializes new instance of SSE client
Click to show internal directories.
Click to hide internal directories.