Documentation ¶
Index ¶
Constants ¶
const (
// DebugEnv os debug env key
DebugEnv = "DEBUG"
)
Variables ¶
This section is empty.
Functions ¶
func NewDialect ¶
NewDialect constructs a new in-memory mocking dialect
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer a message consumer
func (*Consumer) Close ¶
Close closes the kafka consumer, all topic subscriptions and event channels.
func (*Consumer) Subscribe ¶
Subscribe creates a new topic subscription that will receive messages consumed by the consumer of the given topic. This method will return a message channel and a close function. Once a message is consumed should the marked channel be called. Pass a nil for a successful consume and a error if a error occurred during processing.
type Dialect ¶
type Dialect struct {
// contains filtered or unexported fields
}
Dialect a in-memory mocking dialect
func (*Dialect) Close ¶
Close awaits till the consumer(s) and producer(s) of the given dialect are closed. If an error is returned is the closing aborted and the error returned to the user.
func (*Dialect) Healthy ¶
Healthy when called should it check if the dialect's consumer/producer are healthy and up and running. This method could be called to check if the service is up and running. The user should implement the health check
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
Producer a message producer
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription mock message subscription
type SubscriptionCollection ¶
type SubscriptionCollection struct {
// contains filtered or unexported fields
}
SubscriptionCollection represents a collection of subscriptions
func NewTopic ¶
func NewTopic() *SubscriptionCollection
NewTopic constructs a new subscription collection for a topic