base

package
v0.0.0-...-c638bfa Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT-0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AGENT_SHUTDOWN_DELAY = 20 * time.Second // this const is the delay between stopping trace generation and stopping agent
)

Variables

This section is empty.

Functions

func GenerateTraces

func GenerateTraces(traceTest TraceTestConfig) error

func SegmentValidationTest

func SegmentValidationTest(t *testing.T, traceTest TraceTestConfig, segments []types.Segment) error

func TraceTest

func TraceTest(t *testing.T, traceTest TraceTestConfig) error

Types

type TraceGenerator

type TraceGenerator struct {
	Cfg                     *TraceGeneratorConfig
	SegmentsGenerationCount int
	SegmentsEndedCount      int
	AgentConfigPath         string
	AgentRuntime            time.Duration
	Name                    string
	Done                    chan struct{}
}

type TraceGeneratorConfig

type TraceGeneratorConfig struct {
	Interval    time.Duration
	Annotations map[string]interface{}
	Metadata    map[string]map[string]interface{}
	Attributes  []attribute.KeyValue
}

type TraceGeneratorInterface

type TraceGeneratorInterface interface {
	StartSendingTraces(ctx context.Context) error
	StopSendingTraces()
	Generate(ctx context.Context) error
	GetSegmentCount() (int, int)
	GetAgentConfigPath() string
	GetGeneratorConfig() *TraceGeneratorConfig
	GetContext() context.Context
	GetAgentRuntime() time.Duration
	GetName() string
}

type TraceTestConfig

type TraceTestConfig struct {
	Generator       TraceGeneratorInterface
	Name            string
	AgentConfigPath string
	AgentRuntime    time.Duration
}

Jump to

Keyboard shortcuts

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