Versions in this module Expand all Collapse all v0 v0.29.0 Dec 2, 2026 Changes in this version + const ContainerKind + const WorkloadResource + func Container(id string, rank int64, mods ...func(*logsv2.LogSource)) logsv2.LogSource + func NotDefault(s *logsv2.LogSource) + func StateName(s logsv2.SourceState) string + func WithInstance(v string) func(*logsv2.LogSource) + type Batch struct + Entries []logsv2.SourceEntry + Lines []Line + type Harness struct + Clock *timeutil.FakeClock + Kind *Kind + Manager *logsv2.Manager + Resolver *Resolver + func New(t testing.TB, opts ...Option) *Harness + func (h *Harness) Add(s logsv2.LogSource) + func (h *Harness) Advance(d time.Duration) + func (h *Harness) Batches() []Batch + func (h *Harness) Close() + func (h *Harness) CloseEvents() + func (h *Harness) Ended() (logsv2.Event, bool) + func (h *Harness) Events(t logsv2.EventType) []logsv2.Event + func (h *Harness) FlushLines(id string, n int) []string + func (h *Harness) LastState(id string) (logsv2.SourceInfo, bool) + func (h *Harness) LastSummary() (logsv2.Summary, bool) + func (h *Harness) Lines() []Line + func (h *Harness) Remove(id string) + func (h *Harness) Send(ev logsv2.SourceEvent) + func (h *Harness) SessionID() string + func (h *Harness) Snapshot() *logsv2.Session + func (h *Harness) Source(id string) logsv2.SourceInfo + func (h *Harness) Sources(req logsv2.ListSourcesRequest) *logsv2.SourcePage + func (h *Harness) Start(opts ...SessionOption) *logsv2.Session + func (h *Harness) State(id string) logsv2.SourceState + func (h *Harness) Summary() logsv2.Summary + func (h *Harness) Sync() + func (h *Harness) Texts(id string) []string + func (h *Harness) TryStart(opts ...SessionOption) (*logsv2.Session, error) + func (h *Harness) Update(s logsv2.LogSource) + func (h *Harness) UpdateSelection(sel logsv2.SourceSelection, limit int32) logsv2.SelectionResult + func (h *Harness) WaitClosed(id string) + func (h *Harness) WaitEnded() logsv2.Event + func (h *Harness) WaitEvent(t logsv2.EventType, n int) []logsv2.Event + func (h *Harness) WaitLines(id string, n int) []string + func (h *Harness) WaitOpens(id string, n int) + func (h *Harness) WaitState(id string, want logsv2.SourceState) + func (h *Harness) WaitStreams(id string, n int) + func (h *Harness) WaitUntil(what string, cond func() bool) + type Kind struct + func NewKind() *Kind + func (k *Kind) Open(pctx *types.PluginContext, req logsv2.OpenRequest) (io.ReadCloser, error) + func (k *Kind) OpenOrder() []string + func (k *Kind) Script(id string) *Script + func (k *Kind) SourceKind() logsv2.SourceKind + type Line struct + Batch int + Level logsv2.LogLevel + Origin logsv2.LogLineOrigin + Replay bool + Source logsv2.SourceRef + Text string + TimestampMicros int64 + type Option func(*config) + func WithJitter(fn func(time.Duration) time.Duration) Option + func WithKind(key string, k logsv2.SourceKind) Option + func WithLimitCeiling(n int32) Option + func WithResource(key string, r logsv2.LogResource) Option + func WithSources(sources ...logsv2.LogSource) Option + func WithTimeout(d time.Duration) Option + type Resolver struct + func NewResolver(t testing.TB, sources ...logsv2.LogSource) *Resolver + func (r *Resolver) Add(s logsv2.LogSource) + func (r *Resolver) CloseEvents() + func (r *Resolver) Fail(err error) + func (r *Resolver) Pending() int + func (r *Resolver) Remove(id string) + func (r *Resolver) Requests() []logsv2.ResolveRequest + func (r *Resolver) Resolve(pctx *types.PluginContext, req logsv2.ResolveRequest) (*logsv2.ResolveResult, error) + func (r *Resolver) Send(ev logsv2.SourceEvent) + func (r *Resolver) SetSources(sources ...logsv2.LogSource) + func (r *Resolver) Update(s logsv2.LogSource) + type Script struct + func (s *Script) Block() + func (s *Script) Closed() bool + func (s *Script) End() + func (s *Script) EndWith(reason string) + func (s *Script) EndWithError(err error) + func (s *Script) EndedOnOpen(reason string) + func (s *Script) Fail(code, detail string) + func (s *Script) FailWith(err error) + func (s *Script) NotReady() + func (s *Script) Opens() []logsv2.OpenRequest + func (s *Script) Ready() + func (s *Script) Release() + func (s *Script) Streams() int + func (s *Script) Write(lines ...string) + func (s *Script) WriteRaw(b []byte) + type SessionOption func(*logsv2.CreateSessionOptions) + func OnResource(key, id string) SessionOption + func WithFollow(f bool) SessionOption + func WithLimit(n int32) SessionOption + func WithPrevious() SessionOption + func WithReplayMarkers() SessionOption + func WithSelection(s logsv2.SourceSelection) SessionOption + func WithSince(at time.Time) SessionOption + func WithTail(budget int64) SessionOption