domain

package
v0.0.0-...-a04f103 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() (*kubernetes.Clientset, error)

func RandomInt

func RandomInt(i int) int

Types

type Config

type Config struct {
	Namespace []Namespace
	Interval  int64
	Duration  int64
	Slack     bool
}

func GetConfig

func GetConfig() *Config

func (*Config) ReadConfig

func (c *Config) ReadConfig(path string) error

type Namespace

type Namespace struct {
	Name     string
	Resource []Resource
}

type PodManage

type PodManage struct {
	Ctx     context.Context
	Cancel  context.CancelFunc
	Started bool
}

func (*PodManage) MainLoop

func (m *PodManage) MainLoop(c *Config) error

func (*PodManage) SelectVictimPod

func (m *PodManage) SelectVictimPod(c *Config, ns string, kind string, name string) (*v1.Pod, bool, error)

func (*PodManage) Start

func (m *PodManage) Start(c *Config) error

func (*PodManage) Stop

func (m *PodManage) Stop(c *Config)

type Resource

type Resource struct {
	Kind   string
	Name   string
	Target int64
}

Jump to

Keyboard shortcuts

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