notification

package
v0.0.0-...-969384c Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PolicyMgr is a global notification policy manager
	PolicyMgr policy.Manager

	// HookManager is a hook manager
	HookManager hook.Manager
)

Functions

func AddEvent

func AddEvent(ctx context.Context, m n_event.Metadata, notify ...bool)

AddEvent add events into request context, the event will be sent by the notification middleware eventually.

func Init

func Init()

Init ...

func NewContext

func NewContext(ctx context.Context, ec *EventCtx) context.Context

NewContext returns new context with event

Types

type EventCtx

type EventCtx struct {
	Events     *list.List
	MustNotify bool
}

EventCtx ...

func NewEventCtx

func NewEventCtx() *EventCtx

NewEventCtx returns instance of EventCtx

type EventType

type EventType string

EventType is the type of event

func GetSupportedEventTypes

func GetSupportedEventTypes() []EventType

func (EventType) String

func (e EventType) String() string

type NotifyType

type NotifyType string

NotifyType is the type of notify

func GetSupportedNotifyTypes

func GetSupportedNotifyTypes() []NotifyType

func (NotifyType) String

func (n NotifyType) String() string

type PayloadFormatType

type PayloadFormatType string

PayloadFormatType is the type of payload format

func GetSupportedPayloadFormats

func GetSupportedPayloadFormats() []PayloadFormatType

func (PayloadFormatType) String

func (p PayloadFormatType) String() string

Directories

Path Synopsis
dao

Jump to

Keyboard shortcuts

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