serve

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultCacheTTL = time.Minute

DefaultCacheTTL is how long a fetched archive answers value pickers before the server asks Layer whether the sessions namespace has been written since.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryConfig

type FactoryConfig struct {
	Rows, Prices, Subscriptions, Outcomes, Team string
	Repos                                       []string
}

func ResolveFactoryPaths

func ResolveFactoryPaths(dir string) FactoryConfig

ResolveFactoryPaths provides predictable paths without introducing identity or provisioning dependencies. Every input is an ordinary operator-written file.

type Reader

type Reader interface {
	ListSessionRows(topK int, filter any) ([]trace.SessionRow, error)
	ListBlockRows(sessionID string) ([]trace.BlockRow, error)
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(reader Reader) *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

func (*Server) Warm

func (s *Server) Warm() *Server

Warm fills the picker archive in the background, so the first filter a visitor opens counts from memory.

func (*Server) WithCacheTTL

func (s *Server) WithCacheTTL(ttl time.Duration) *Server

WithCacheTTL sets how long the archive answers value pickers before it is revalidated against Layer. Zero or less sends every picker to the store.

func (*Server) WithFactory

func (s *Server) WithFactory(c FactoryConfig) *Server

func (*Server) WithReviewEnabled added in v0.5.0

func (s *Server) WithReviewEnabled(enabled bool) *Server

WithReviewEnabled exposes the navigation link for configured hosted wrappers.

Jump to

Keyboard shortcuts

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