config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFileName = ".kubewatch.yaml"

Functions

This section is empty.

Types

type Config

type Config struct {
	Handler Handler `json:"handler"`
	//Reason   []string `json:"reason"`
	Resource Resource `json:"resource"`
}

Config struct contains kubewatch configuration

func New

func New() (*Config, error)

New creates new config object

func (*Config) CheckMissingResourceEnvvars

func (c *Config) CheckMissingResourceEnvvars()

func (*Config) Load

func (c *Config) Load() error

Load loads configuration from config file

func (*Config) Write

func (c *Config) Write() error

type Handler

type Handler struct {
	Slack Slack `json:"slack"`
}

type Resource

type Resource struct {
	Deployment            bool `json:"deployment"`
	ReplicationController bool `json:"rc"`
	ReplicaSet            bool `json:"rs"`
	DaemonSet             bool `json:"ds"`
	Services              bool `json:"svc"`
	Pod                   bool `json:"po"`
	Job                   bool `json:"job"`
	PersistentVolume      bool `json:"pv"`
}

Resource contains resource configuration

type Slack

type Slack struct {
	Token   string `json:"token"`
	Channel string `json:"channel"`
}

Slack contains slack configuration

Jump to

Keyboard shortcuts

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