pluginlog

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: GPL-3.0 Imports: 11 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

Overview

Package pluginlog owns bounded, non-blocking plugin diagnostic delivery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	QueueCapacity int
	Now           func() time.Time
}

type Sink

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

func New

func New(out io.Writer, options Options) *Sink

func (*Sink) Close

func (s *Sink) Close(ctx context.Context) error

func (*Sink) Log

func (s *Sink) Log(pluginID string, notification protocol.LogNotification)

func (*Sink) MergeSecrets

func (s *Sink) MergeSecrets(values map[string][]string)

MergeSecrets adds candidate delivered values before a plugin start or reconcile. Existing values remain protected until the transition completes.

func (*Sink) ReplaceSecrets

func (s *Sink) ReplaceSecrets(values map[string][]string)

ReplaceSecrets records the exact values reachable by successfully applied plugin specifications. Removed values are forgotten only after old children have joined.

func (*Sink) Status

func (s *Sink) Status() Status

type Status

type Status struct {
	Queued        int       `json:"queued"`
	Dropped       uint64    `json:"dropped"`
	LastErrorCode string    `json:"last_error_code,omitempty"`
	LastErrorAt   time.Time `json:"last_error_at,omitempty"`
}

Jump to

Keyboard shortcuts

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