trigger

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Trigger = &cobra.Command{
	Use: "trigger",
	RunE: func(cmd *cobra.Command, args []string) error {
		action, err := CreateTriggerAction()
		if err != nil {
			return fmt.Errorf("[Trigger] %v", err)
		}
		if action == nil {
			return nil
		}
		if err := <-action.Do(); err != nil {
			return err
		}

		wg := sync.WaitGroup{}
		wg.Add(1)
		util.AddShutDownHook(wg.Done)
		wg.Wait()

		action.Stop()
		return nil
	},
}

Functions

func CreateTriggerAction added in v1.1.0

func CreateTriggerAction() (trigger.Action, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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