supportbundles

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	UID       string `json:"uid"`
	State     State  `json:"state"`
	Creator   string `json:"creator"`
	CreatedAt int64  `json:"createdAt"`
	ExpiresAt int64  `json:"expiresAt"`
	TarBytes  []byte `json:"tarBytes,omitempty"`
}

type Collector

type Collector struct {
	// UID is a unique identifier for the collector.
	UID string `json:"uid"`
	// DisplayName is the name of the collector. User facing.
	DisplayName string `json:"displayName"`
	// Description is a description of the collector. User facing.
	Description string `json:"description"`
	// IncludedByDefault determines if the collector is included by default.
	// User cannot override this.
	IncludedByDefault bool `json:"includedByDefault"`
	// Default determines if the collector is included by default.
	// User can override this.
	Default bool `json:"default"`
	// Fn is the function that collects the support item.
	Fn CollectorFunc `json:"-"`
	// EnabledFn is a function that determines if the collector is enabled. If nil, the collector is always enabled.
	EnabledFn func() bool `json:"-"`
}

type CollectorFunc

type CollectorFunc func(context.Context) (*SupportItem, error)

type Service

type Service interface {
	RegisterSupportItemCollector(collector Collector)
}

type State

type State string
const (
	StatePending  State = "pending"
	StateComplete State = "complete"
	StateError    State = "error"
	StateTimeout  State = "timeout"
)

func (State) String

func (s State) String() string

type SupportItem

type SupportItem struct {
	Filename  string
	FileBytes []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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