resource_updates_receiver

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"resource_updates_receiver",
	fx.Invoke(
		func(lf fx.Lifecycle, ruc ResourceUpdateConsumer, eoa ErrorOnApplyConsumer, d domain.Domain, logger *slog.Logger) {
			lf.Append(fx.Hook{
				OnStart: func(context.Context) error {
					go Start(StartArgs{
						ResourceUpdateConsumer: ruc,
						ErrorOnApplyConsumer:   eoa,
						Domain:                 d,
						Logger:                 logger,
					})
					return nil
				},
				OnStop: func(ctx context.Context) error {
					return Stop(ctx, StopArgs{
						ResourceUpdateConsumer: ruc,
						ErrorOnApplyConsumer:   eoa,
					})
				},
			})
		}),
)

Functions

func ProcessErrorOnApply

func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, d domain.Domain, logger *slog.Logger)

func ProcessResourceUpdates

func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, logger *slog.Logger)

func Start

func Start(args StartArgs)

func Stop

func Stop(ctx context.Context, args StopArgs) error

Types

type ErrorOnApplyConsumer

type ErrorOnApplyConsumer messaging.Consumer

type ResourceUpdateConsumer

type ResourceUpdateConsumer messaging.Consumer

type StopArgs

type StopArgs struct {
	ResourceUpdateConsumer
	ErrorOnApplyConsumer
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳