seed

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Injector

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

Injector injects seed data into a workspace.

func NewInjector

func NewInjector(s store.Store, k8s client.Client) *Injector

NewInjector creates a new Injector backed by the given store. Pass a non-nil k8sClient to enable virtual peer (node) injection.

func (*Injector) Clear

func (inj *Injector) Clear(ctx context.Context, workspaceID string) error

Clear removes all seed records from the given workspace.

func (*Injector) Inject

func (inj *Injector) Inject(ctx context.Context, workspaceID string, opts Options) error

Inject writes seed audit logs, policies, alerts, and virtual peers into workspaceID. All records are tagged so they can be cleared later.

type Options

type Options struct {
	VirtualNodes int // default 8
	HistoryDays  int // default 7
	AuditEntries int // default 20
}

Options controls the volume of seed data injected into a new workspace.

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns the standard seed volume.

Jump to

Keyboard shortcuts

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