Documentation ¶
Index ¶
Constants ¶
View Source
const ( OKMessage = iota WarnMessage ErrorMessage )
Messages types
View Source
const ( FlushInterval = 30 * time.Second BotName = "Kafka objects operator" MsgColorOK = "#00CC00" MsgColorWarning = "#F5EC1E" MsgColorError = "#EE0000" BotLogo = "https://90poe-tools-infrastructure.s3.eu-west-1.amazonaws.com/images/k8s-logo.png" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewMessage ¶
func NewMessage(msg string, msgType MessageType) *Message
NewMessage would initialises Message and would return it
func (*Message) MsgType ¶
func (m *Message) MsgType() MessageType
MsgType would return type of this message
type MessageType ¶
type MessageType uint8
type Messenger ¶
type Messenger struct {
// contains filtered or unexported fields
}
func (*Messenger) Send ¶
func (m *Messenger) Send(msg string, msgType MessageType)
Send will send message to slack
type Options ¶
func HTTPClient ¶
HTTPClient will add http client for Slack Messenger
func SlackClient ¶
SlackClient will add slack client for mocking purposes only use it in tests
func TickInterval ¶
SlackClient will add slack client for mocking purposes only use it in tests
Click to show internal directories.
Click to hide internal directories.