glue

package
v1.12.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericComponent

type GenericComponent[ARGS any] interface {
	Run(ctx context.Context) error
	Update(args ARGS) error
}

type GenericComponentGlue

type GenericComponentGlue[ARGS any] struct {
	Impl GenericComponent[ARGS]
}

GenericComponentGlue is a helper to allow writing alloy components without depending on component.Arguments package as a tiny nice bonus, the Update method is type-safe and does not require casting interface{} to ARGS

func (*GenericComponentGlue[ARGS]) Run

func (c *GenericComponentGlue[ARGS]) Run(ctx context.Context) error

func (*GenericComponentGlue[ARGS]) Update

func (c *GenericComponentGlue[ARGS]) Update(args component.Arguments) error

Jump to

Keyboard shortcuts

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