Documentation ¶
Index ¶
- Constants
- type ChatOps
- func (c *ChatOps) ChatOpsHandler(w http.ResponseWriter, r *http.Request)
- func (c *ChatOps) EnvironmentParams() map[string]string
- func (c *ChatOps) InitDb()
- func (c *ChatOps) InitHealth(prefix, brokers string)
- func (c *ChatOps) InitKafka()
- func (c *ChatOps) InitRelay()
- func (c *ChatOps) InitSlack()
- func (c *ChatOps) KafkaProduce(topic, message string)
- func (c *ChatOps) Run()
- func (c *ChatOps) SetFlags()
- func (c *ChatOps) StartRelay()
- func (c *ChatOps) StartServer()
- func (c *ChatOps) StartSignalHandler()
- func (c *ChatOps) StartStatusUpdater(interval time.Duration)
- type KafkaMessage
Constants ¶
View Source
const ( HealthEndpoint = "/health" RequestTrackingHistory = 1000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatOps ¶
type ChatOps struct { Kafka bool `envconfig:"KAFKA"` SlackAppId string `envconfig:"SLACK_APP_ID"` SlackVerificationToken string `envconfig:"SLACK_VFY_TOKEN"` SlackSecretSigningKey string `envconfig:"SLACK_SECRET_SIGNING_KEY"` SlackClientId string `envconfig:"SLACK_CLIENT_ID"` SlackClientSecret string `envconfig:"SLACK_CLIENT_SECRET"` SlackAuthRedirectUrl string `envconfig:"SLACK_AUTH_REDIRECT_URL"` //SlackToken string `envconfig:"SLACK_TOKEN"` //SlackInHook string `envconfig:"SLACK_IN_HOOK"` FeedbackTopic string `envconfig:"FEEDBACK_TOPIC"` Port int `envconfig:"PORT"` ElasticSearchUrl string `envconfig:"ELASTICSEARCH_URL"` ViewUrl string `envconfig:"VIEW_URL"` HealthUrl string `envconfig:"HEALTH_URL"` TemplateDir string `envconfig:"TEMPLATE_DIR"` RelayPort int `envconfig:"RELAY_PORT"` RelayHost string `envconfig:"RELAY_HOST"` RelayPassthrough bool `envconfig:"RELAY_PASSTHROUGH"` RelayHandler bool `envconfig:"RELAY_HANDLER"` RelayCertFile string `envconfig:"RELAY_CERT_FILE"` RelayKeyFile string `envconfig:"RELAY_KEY_FILE"` RelayInsecure bool `envconfig:"RELAY_INSECURE"` RelayWhiteList string `envconfig:"RELAY_WHITELIST"` DbFile string `envconfig:"DB_FILE"` Debug bool `envconfig:"DEBUG"` Info build.Info // contains filtered or unexported fields }
TODO:(smt) Config to toggle OnDemandTemplates
func NewChatOps ¶
func (*ChatOps) ChatOpsHandler ¶
func (c *ChatOps) ChatOpsHandler(w http.ResponseWriter, r *http.Request)
ChatOpsHandler handles requests to the general service.
func (*ChatOps) EnvironmentParams ¶
func (*ChatOps) InitHealth ¶
InitHealth creates, initializes, and starts the health reporter
func (*ChatOps) InitSlack ¶
func (c *ChatOps) InitSlack()
InitSlack initializes the slack sub-component
func (*ChatOps) KafkaProduce ¶
KafkaProduce is a mechanism for allowing subcomponents to send messages to kafka, without exposing the underlying channel
func (*ChatOps) StartRelay ¶
func (c *ChatOps) StartRelay()
func (*ChatOps) StartServer ¶
func (c *ChatOps) StartServer()
StartServer starts the application web server
func (*ChatOps) StartSignalHandler ¶
func (c *ChatOps) StartSignalHandler()
func (*ChatOps) StartStatusUpdater ¶
StartStatusUpdater provides a continual loop for updating application health data.
type KafkaMessage ¶
func (KafkaMessage) String ¶
func (k KafkaMessage) String() string
Click to show internal directories.
Click to hide internal directories.