preload

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: GPL-2.0 Imports: 4 Imported by: ? 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

This section is empty.

Variables

View Source
var (
	// ErrNotReady indicates that one or more components are not ready and we should retry
	ErrNotReady = errors.New("cloud resources not ready")
)

Functions

This section is empty.

Types

type Data

type Data map[string]*Entry

Data is a map of key/value pairs

func NewData

func NewData() Data

NewData returns a new Data instance

func (*Data) Add

func (d *Data) Add(name string, entry Entry)

Add adds a new entry to the data

func (*Data) Get

func (d *Data) Get(name string) *Entry

Get returns an entry from the data

func (*Data) Keys

func (d *Data) Keys() []string

Keys returns a list of keys in the data

func (*Data) MarshalTo

func (d *Data) MarshalTo(w io.Writer) error

MarshalTo marshals the data to JSON

type Entry

type Entry struct {
	// Description is a human readable description of the entry
	Description string `json:"description"`
	// Value is the value of the entry
	Value interface{} `json:"value"`
}

Entry is a single entry in the preload data

func (*Entry) Marshal

func (e *Entry) Marshal() ([]byte, error)

Marshal marshals the data to JSON

type Interface

type Interface interface {
	// Load is used to load the preload data
	Load(ctx context.Context) (Data, error)
}

Interface is the external interface for the preload package

Directories

Path Synopsis
eks
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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