trigger

package
v0.0.0-...-12a776e Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BroadcasterRunning = "running"
	BroadcasterIdle    = "idle"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	TriggerClient() *clientConfig.Client
	Config() *config.Trigger
}

type Trigger

type Trigger struct {
	*base.Handler
	// contains filtered or unexported fields
}

func New

func New() *Trigger

New trigger-able handler

func (*Trigger) Config

func (handler *Trigger) Config() *config.Trigger

func (*Trigger) Route

func (handler *Trigger) Route(_ string, _ interface{}, _ ...string) error

Route adds a route along with its handler to this handler

func (*Trigger) SetConfig

func (handler *Trigger) SetConfig(trigger *config.Trigger)

SetConfig adds the parameters of the handler from the config.

Sets Frontend configuration as well.

func (*Trigger) SetLogger

func (handler *Trigger) SetLogger(logger *log.Logger) error

func (*Trigger) Start

func (handler *Trigger) Start() error

Start the trigger directly, not by goroutine.

The Trigger-able handlers can have only one instance

func (*Trigger) TriggerClient

func (handler *Trigger) TriggerClient() *clientConfig.Client

TriggerClient is the client parameters to trigger this handler

Jump to

Keyboard shortcuts

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