seq

package
v1.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package seq holds the resources needed to start a Seq testcontainer.

Package seq holds the resources needed to start a Seq testcontainer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Events added in v1.0.4

type Events []struct {
	Timestamp             time.Time `json:"Timestamp"`
	MessageTemplateTokens []struct {
		Text string `json:"Text"`
	} `json:"MessageTemplateTokens"`
	Properties []struct {
		Name  string `json:"Name"`
		Value any    `json:"Value"`
	} `json:"Properties"`
	ID string `json:"Id"`
}

Events holds the returned logging events from Seq.

type Seq

type Seq struct {
	Ports   map[int]nat.Port
	Network *testcontainers.DockerNetwork
	Name    string
}

Seq hold the testcontainer, ports and network used by Seq. If instantiating yourself, be sure to populate Seq.Network, otherwise a new network will be generated.

func (*Seq) GetEvents

func (s *Seq) GetEvents(expectedEvents int, maxRetries int) (events Events, err error)

GetEvents takes returns the last n logging events that were received by Seq. There is a retry mechanism implemented; `GetEvents` will keep fetching every 2 seconds, for a maximum of `maxRetries` times, until Jaeger returns `expectedEvents` number of events.

func (*Seq) Start

func (s *Seq) Start(ctx context.Context) (func(context.Context) error, error)

Start starts the Seq container.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL