controller

package
v0.0.0-...-e5473d9 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NDMKind     = "Disk"
	NDMVersion  = "openebs.io/v1alpha1"
	NDMPrefix   = "disk-"
	NDMHostKey  = "kubernetes.io/hostname"
	NDMActive   = "Active"
	NDMInactive = "Inactive"
)

Variables

This section is empty.

Functions

func DeviceList

func DeviceList(kuberconfig string)

DeviceList sets up the controller and calls DevList, which queries all the disk resources for this host from etcd and prints them to the standard output

func Watch

func Watch(kuberconfig string)

Watch sets up the controller, which in-turn scans the locally attached disks and push them to etcd

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller is the controller implementation for do resources

func NewController

func NewController(
	host string,
	kubeclientset kubernetes.Interface,
	clientset clientset.Interface) *Controller

NewController returns a new sample controller

func (*Controller) DevList

func (c *Controller) DevList() error

DevList queries the etcd for the devices on the host and prints them to stdout

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run will discover the local disks and push them to the etcd

Jump to

Keyboard shortcuts

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