metathings_callback_sdk

package
v1.2.13-alpha6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedCallbackDriver = errors.New("unsupported callback driver")
)

Functions

func ToCallback

func ToCallback(v *Callback) func(string, interface{}) error

Types

type Callback

type Callback interface {
	Emit(data interface{}, tags map[string]string) error
}

func NewCallback

func NewCallback(name string, args ...interface{}) (Callback, error)

func NewDummyCallback

func NewDummyCallback(args ...interface{}) (Callback, error)

func NewWebhookCallback

func NewWebhookCallback(args ...interface{}) (Callback, error)

type CallbackFactory

type CallbackFactory func(args ...interface{}) (Callback, error)

type DummyCallback

type DummyCallback struct{}

func (*DummyCallback) Emit

func (cb *DummyCallback) Emit(data interface{}, tags map[string]string) error

type WebhookCallback

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

func (*WebhookCallback) Emit

func (cb *WebhookCallback) Emit(data interface{}, tags map[string]string) error

type WebhookCallbackOption

type WebhookCallbackOption struct {
	AllowPlainText bool
	Insecure       bool
	UserAgent      string
	CustomHeaders  map[string]string
	TagPrefix      string
	Url            string
	Timeout        time.Duration
}

func NewWebhookCallbackOption

func NewWebhookCallbackOption() *WebhookCallbackOption

Jump to

Keyboard shortcuts

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