config

package
v0.0.0-...-507e24d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigFileName stores file of config
	ConfigFileName = ".kubens.yaml"

	// ConfigSample is a sample configuration file.
	ConfigSample = yannotated
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// Configure default network policy to apply
	NetPol NetPol `json:"netpol"`
}

Config struct contains kubewatch configuration

func New

func New() (*Config, error)

New creates new config object

func (*Config) CheckNetPolValues

func (c *Config) CheckNetPolValues()

CheckNetPolValues will validate the netpol values during JSON marshaling @TODO

func (*Config) Load

func (c *Config) Load() error

Load loads configuration from config file

func (*Config) Write

func (c *Config) Write() error

type NetPol

type NetPol struct {
	Enabled    bool   `json:"enabled"`
	Annotation string `json:"annotation"`
}

NetPol contains network policy configuration

Jump to

Keyboard shortcuts

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