setup

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package setup shares OTLP env parsing and base agent options for the config/ and objects/ examples.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseAgentOptions

func BaseAgentOptions(cfg *excfg.Config, llm interfaces.LLMClient) []agent.Option

BaseAgentOptions returns shared [agent.Option]s for both examples (identity, Temporal, LLM, logger).

func UserPrompt

func UserPrompt() string

UserPrompt returns command-line text after the program name, or a default line if empty.

Types

type OTLP

type OTLP struct {
	Endpoint string
	// AgentProto is used with [agent.ObservabilityConfig].
	AgentProto agent.OTLPProtocol
	// ObsProto is used with [observability.Option] when building tracer, metrics, and logs manually.
	ObsProto observability.Protocol
	Insecure bool
}

OTLP holds values from OTEL_EXPORTER_OTLP_ENDPOINT, OTLP_PROTOCOL, OTLP_INSECURE.

func MustParseOTLP

func MustParseOTLP() OTLP

MustParseOTLP reads OTLP-related environment variables and exits on missing endpoint or bad protocol.

Jump to

Keyboard shortcuts

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