seq

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 9 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"`
	Properties []Property `json:"Properties"`
	Messages   []Message  `json:"MessageTemplateTokens"`
	EventType  string     `json:"EventType"`
	Exception  string     `json:"Exception"`
	Level      string     `json:"Level"`
	TraceID    string     `json:"TraceId"`
	SpanID     string     `json:"SpanId"`
	SpanKind   string     `json:"SpanKind"`
	Resource   []Resource `json:"Resource"`
	ID         string     `json:"Id"`
	Links      struct {
		Self  string `json:"Self"`
		Group string `json:"Group"`
	} `json:"Links"`
}

Events holds the returned logging events from Seq.

type Message added in v1.1.3

type Message struct {
	Text string `json:"Text"`
}

Message holds the message template tokens from Seq.

type Property added in v1.1.3

type Property struct {
	Name  string `json:"Name"`
	Value any    `json:"Value"`
}

Property holds the property name and value from Seq.

type Resource added in v1.1.3

type Resource struct {
	Name  string `json:"Name"`
	Value struct {
		Name string `json:"name"`
	} `json:"Value"`
}

Resource holds the resource name and value 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, string, 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