sinks

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Type  string `json:"type"`
	Text  string `json:"text"`
	Color string `json:"color"`
	Title string `json:"title"`
}

type Client

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

func NewClient

func NewClient(timeout time.Duration) *Client

type ISink

type ISink interface {
	Configure(config v1alpha1.K8sGPT, c Client, sinkSecretValue string)
	Emit(results v1alpha1.ResultSpec) error
}

func NewSink

func NewSink(sinkType string) ISink

type MattermostMessage added in v0.0.28

type MattermostMessage struct {
	Text        string       `json:"text"`
	Channel     string       `json:"channel,omitempty"`
	UserName    string       `json:"username,omitempty"`
	IconURL     string       `json:"icon_url,omitempty"`
	Attachments []attachment `json:"attachments"`
}

type MattermostSink added in v0.0.28

type MattermostSink struct {
	Endpoint string
	K8sGPT   string
	Client   Client
	Channel  string
	UserName string
	IconURL  string
}

func (*MattermostSink) Configure added in v0.0.28

func (s *MattermostSink) Configure(config v1alpha1.K8sGPT, c Client, sinkSecretValue string)

func (*MattermostSink) Emit added in v0.0.28

func (s *MattermostSink) Emit(results v1alpha1.ResultSpec) error

type SlackMessage

type SlackMessage struct {
	Text        string       `json:"text"`
	Attachments []Attachment `json:"attachments"`
}

type SlackSink

type SlackSink struct {
	Endpoint string
	K8sGPT   string
	Client   Client
}

func (*SlackSink) Configure

func (s *SlackSink) Configure(config v1alpha1.K8sGPT, c Client, sinkSecretValue string)

func (*SlackSink) Emit

func (s *SlackSink) Emit(results v1alpha1.ResultSpec) error

Jump to

Keyboard shortcuts

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