Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶
type Exporter interface { // Send a message through the exporter. Send(c context.Context, client *http.Client, message msg.Message) error // Return a new line as a string for the exporter. NewLine() string // Return a link formatted for the exporter. FormatLink(link string, name string) string // Returns the name of the exporter. Name() string }
An exporter sends a formatted event to an upstream.
type FakeExporter ¶
func (*FakeExporter) FormatLink ¶
func (f *FakeExporter) FormatLink(link string, name string) string
func (*FakeExporter) Name ¶
func (f *FakeExporter) Name() string
func (*FakeExporter) NewLine ¶
func (f *FakeExporter) NewLine() string
type MSTeams ¶ added in v0.3.7
type MSTeams struct {
Url string
}
The MSTeams exporter sends Flux events to a Microsoft Teams channel via a webhook.
func NewMSTeams ¶ added in v0.3.7
Initialize a new MSTeams instance
func (*MSTeams) FormatLink ¶ added in v0.3.7
Return a formatted link for MS Teams.
func (*MSTeams) NewMSTeamsMessage ¶ added in v0.3.7
func (s *MSTeams) NewMSTeamsMessage(message msg.Message) MSTeamsMessage
Convert a flux event into a MS Teams message
type MSTeamsAction ¶ added in v0.3.7
type MSTeamsAction struct { Type string `json:"@type"` Name string `json:"name"` Targets []MSTeamsActionTarget `json:"targets"` }
Represents an action embedded in a MS Teams message
type MSTeamsActionTarget ¶ added in v0.3.7
Represents a slack channel and the Kubernetes namespace linked to it
type MSTeamsMessage ¶ added in v0.3.7
type MSTeamsMessage struct { Context string `json:"@context"` Type string `json:"@type"` ThemeColor string `json:"themeColor"` Title string `json:"title"` Text string `json:"text"` Actions []MSTeamsAction `json:"potentialAction"` }
Represents a MS Teams message sent to the API
type Matrix ¶ added in v0.3.1
type Matrix struct {
// contains filtered or unexported fields
}
The Matrix exporter sends Flux events to a Matrix channel.
func (*Matrix) FormatLink ¶ added in v0.3.1
Return a formatted link for Matrix.
type MatrixMessage ¶ added in v0.3.1
type Slack ¶
type Slack struct { Url string Username string Token string Channels []SlackChannel IconEmoji string }
The Slack exporter sends Flux events to a Slack channel via a webhook.
func (*Slack) FormatLink ¶
Return a formatted link for Slack.
func (*Slack) NewSlackMessage ¶
func (s *Slack) NewSlackMessage(message msg.Message) []SlackMessage
Convert a flux event into a Slack message(s)
type SlackAttachment ¶
type SlackAttachment struct { Color string `json:"color"` Title string `json:"title"` TitleLink string `json:"title_link"` Text string `json:"text"` }
Represents a section of a slack message that is sent to the API
type SlackChannel ¶ added in v0.2.10
Represents a slack channel and the Kubernetes namespace linked to it
type SlackMessage ¶
type SlackMessage struct { Channel string `json:"channel"` IconEmoji string `json:"icon_emoji"` Username string `json:"username"` Attachments []SlackAttachment `json:"attachments"` }
Represents a slack message sent to the API
type Webhook ¶
type Webhook struct {
Url string
}
The Webhook exporter sends Flux events to a Webhook channel via a webhook.
func NewWebhook ¶
Initialize a new Webhook instance
func (*Webhook) FormatLink ¶
Return a formatted link for Webhook.