Documentation ¶
Index ¶
- func CheckReceived(t *testing.T, consumer *kafka.Consumer, sent []model.ProduceMessage)
- func CopyFromContainer(ctx context.Context, t *testing.T, container testcontainers.Container, ...) *os.File
- func FormatCfg(cfg string) string
- func GetReceived(t *testing.T, consumer *kafka.Consumer, sent []model.ProduceMessage, ...) []kafka.Message
- func NewConsumer(ctx context.Context, t *testing.T, topic, port string) *kafka.Consumer
- func NewKafkaContainer(ctx context.Context, name, port, network string, ...) (testcontainers.Container, error)
- func NewKafkaSASLPlainContainer(ctx context.Context, name, port, network string) (testcontainers.Container, error)
- func NewKafkaSSLContainer(ctx context.Context, name, port, network string) (testcontainers.Container, error)
- func NewKrpContainer(ctx context.Context, network string, cfg string, ...) (testcontainers.Container, error)
- func NewOtelCollectorContainer(ctx context.Context, network string) (testcontainers.Container, error)
- func NewPrometheusContainer(ctx context.Context, network string) (testcontainers.Container, error)
- func NewSchemaRegistryContainer(ctx context.Context, network string) (testcontainers.Container, error)
- func ProduceAsync(ctx context.Context, t *testing.T, krp testcontainers.Container, path string, ...)
- func ProduceError(ctx context.Context, t *testing.T, krp testcontainers.Container, path string, ...) (model.ProduceErrorResponse, int)
- func ProduceSync(ctx context.Context, t *testing.T, krp testcontainers.Container, path string, ...)
- func ProjectRootDir() string
- func Ptr[T any](value T) *T
- type ConsumeOption
- type ProduceOption
- type StdoutLogConsumer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckReceived ¶
func CopyFromContainer ¶
func GetReceived ¶
func GetReceived(t *testing.T, consumer *kafka.Consumer, sent []model.ProduceMessage, options ...ConsumeOption) []kafka.Message
func NewConsumer ¶
func NewKafkaContainer ¶
func NewKafkaSSLContainer ¶
func NewKrpContainer ¶
func NewPrometheusContainer ¶
func ProduceAsync ¶
func ProduceAsync(ctx context.Context, t *testing.T, krp testcontainers.Container, path string, req model.ProduceRequest, options ...ProduceOption)
func ProduceError ¶
func ProduceError(ctx context.Context, t *testing.T, krp testcontainers.Container, path string, req any, options ...ProduceOption) (model.ProduceErrorResponse, int)
func ProduceSync ¶
func ProduceSync(ctx context.Context, t *testing.T, krp testcontainers.Container, path string, req model.ProduceRequest, options ...ProduceOption)
func ProjectRootDir ¶
func ProjectRootDir() string
Types ¶
type ConsumeOption ¶
type ConsumeOption interface {
// contains filtered or unexported methods
}
func WithReadTimeout ¶
func WithReadTimeout(readTimeout time.Duration) ConsumeOption
func WithVerifyReceived ¶
func WithVerifyReceived(verifyReceived bool) ConsumeOption
type ProduceOption ¶
type ProduceOption interface {
// contains filtered or unexported methods
}
func WithHeaders ¶
func WithHeaders(headers map[string]string) ProduceOption
func WithSuccess ¶
func WithSuccess(success bool) ProduceOption
type StdoutLogConsumer ¶
type StdoutLogConsumer struct{}
func (*StdoutLogConsumer) Accept ¶
func (lc *StdoutLogConsumer) Accept(l testcontainers.Log)
Click to show internal directories.
Click to hide internal directories.