destination

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FileName = "destinations.yaml"

FileName where destinations are stored and read from

Variables

This section is empty.

Functions

func GetLocal

func GetLocal(rootDir string) (map[string]string, error)

GetLocal Parse local destinations

func GetRemote

func GetRemote(esClient es.Client) (map[string]Destination, error)

GetRemote This will get all the monitor and write them into destinations.yaml file on the root directory

Types

type CustomWebhook

type CustomWebhook struct {
	Path         string            `json:"path,omitempty" yaml:",omitempty"`
	HeaderParams map[string]string `json:"header_params,omitempty" yaml:",omitempty"`
	Password     string            `json:"password,omitempty" yaml:",omitempty"`
	Port         int               `json:"port,omitempty" yaml:",omitempty"`
	Scheme       string            `json:"scheme,omitempty" yaml:",omitempty"`
	QueryParams  map[string]string `json:"query_params,omitempty" yaml:",omitempty"`
	Host         string            `json:"host,omitempty" yaml:",omitempty"`
	URL          string            `json:"url,omitempty" yaml:",omitempty"`
	Username     string            `json:"username,omitempty" yaml:",omitempty"`
}

CustomWebhook destination object

type Destination

type Destination struct {
	ID            string
	Name          string        `json:"name"`
	Type          string        `json:"type"`
	Slack         Slack         `json:"slack,omitempty" yaml:",omitempty"`
	CustomWebhook CustomWebhook `json:"custom_webhook,omitempty" yaml:",omitempty"`
}

Destination object

type Slack

type Slack struct {
	URL string `json:"url,omitempty" yaml:",omitempty"`
}

Slack destination object

Jump to

Keyboard shortcuts

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