object

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object struct {
	// Type of object
	Type Type
	// Name is a unique name of the object
	Name string
}

Object is a single instance of an object

func (*Object) Log

func (o *Object) Log() *logrus.Entry

Log is a custom logging function on the Object type

type Ops

type Ops interface {
	// ListObjects returns a list of objects of this type matching the provided
	// selectors
	ListObjects(namespaceSelector, labelSelector metav1.LabelSelector) ([]Object, error)

	// QuerySelector returns the metrics query selector for this object
	QuerySelector(object Object) map[string]string

	// DoAction does an action on the provided object instance
	DoAction(action string, object Object, actionParams map[string]string) error
}

Ops is a set of operations that can be done on an object of a certain type

func NewStoragePoolOps

func NewStoragePoolOps(
	metricsProvider metrics.Provider,
	storageDriver storage.Driver,
) (Ops, error)

NewStoragePoolOps returns the Ops iplementation for volume object

func NewVolumeOps

func NewVolumeOps(
	schedDriver scheduler.Driver,
) (Ops, error)

NewVolumeOps returns the Ops iplementation for volume object

type StoragePoolObjectActions

type StoragePoolObjectActions string

StoragePoolObjectActions are a set of supported actions on the storage pool object type

const (
	// ResizeStoragePoolAction action for resizing volume
	ResizeStoragePoolAction StoragePoolObjectActions = "expand"
)

type Type

type Type string

Type is a type of objects on which autopilot rules can act upon

const (
	// OpenstorageVolume is a object of type volume provided through the
	// libopenstorage/openstorage interfaces
	OpenstorageVolume Type = "openstorage.io.action.volume"
	// OpenstorageStoragePool is an object of type of storage pool provided
	// through the libopenstorage/openstorage storage providers
	OpenstorageStoragePool Type = "openstorage.io.action.storagepool"
)

type VolumeObjectActions

type VolumeObjectActions string

VolumeObjectActions are a set of supported actions on the volume object type

const (
	// ResizeVolumeAction action for resizing volume
	ResizeVolumeAction VolumeObjectActions = "resize"
)

Jump to

Keyboard shortcuts

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