action

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log is an implementation of Action that just writes all messages to output.

func NewLog

func NewLog(formatter types.Formatter, output io.Writer) *Log

NewLog creates a new instance of ActionLog.

func (*Log) PerformAction

func (a *Log) PerformAction(ctx context.Context, messages []types.Message) error

PerformAction implements Action.

type Notify

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

func NewNotify

func NewNotify(params NotifyParams) *Notify

func (*Notify) PerformAction

func (n *Notify) PerformAction(ctx context.Context, messages []types.Message) error

type NotifyParams

type NotifyParams struct {
	Logger         log.Logger
	TitleFormatter types.Formatter
	BodyFormatter  types.Formatter
	Notifier       notify.Notifier
	MaxTitleSize   int
	MaxBodySize    int
}

Jump to

Keyboard shortcuts

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