notification

package
v0.0.0-...-a7b91b5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPHelper

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

HTTPHelper in charge of sending notification messages to remote endpoint

type SlackJob

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

SlackJob implements the job interface, which send notification to slack by slack incoming webhooks.

func (*SlackJob) MaxCurrency

func (sj *SlackJob) MaxCurrency() uint

MaxCurrency is implementation of same method in Interface.

func (*SlackJob) MaxFails

func (sj *SlackJob) MaxFails() (result uint)

MaxFails returns that how many times this job can fail.

func (*SlackJob) Run

func (sj *SlackJob) Run(ctx job.Context, params job.Parameters) error

Run implements the interface in job/Interface

func (*SlackJob) ShouldRetry

func (sj *SlackJob) ShouldRetry() bool

ShouldRetry ...

func (*SlackJob) Validate

func (sj *SlackJob) Validate(params job.Parameters) error

Validate implements the interface in job/Interface

type WebhookJob

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

WebhookJob implements the job interface, which send notification by http or https.

func (*WebhookJob) MaxCurrency

func (wj *WebhookJob) MaxCurrency() uint

MaxCurrency is implementation of same method in Interface.

func (*WebhookJob) MaxFails

func (wj *WebhookJob) MaxFails() (result uint)

MaxFails returns that how many times this job can fail, get this value from ctx.

func (*WebhookJob) Run

func (wj *WebhookJob) Run(ctx job.Context, params job.Parameters) error

Run implements the interface in job/Interface

func (*WebhookJob) ShouldRetry

func (wj *WebhookJob) ShouldRetry() bool

ShouldRetry ...

func (*WebhookJob) Validate

func (wj *WebhookJob) Validate(_ job.Parameters) error

Validate implements the interface in job/Interface

Jump to

Keyboard shortcuts

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