server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VirtualMachineResource = "virtualmachine"
	NodeResource           = "node"
	CredentialResource     = "credential"
	MachineImageResource   = "machineimage"
	SettingResource        = "setting"
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(
	vmClient vmclientset.Interface,
	kubeClient kubernetes.Interface,
	vmInformer vminformers.VirtualMachineInformer,
	nodeInformer coreinformers.NodeInformer,
	credInformer vminformers.CredentialInformer,
	machineImageInformer vminformers.MachineImageInformer,
	settingInformer vminformers.SettingInformer,
	listenAddress string,
) *server

func NewStreamHandlerFunc

func NewStreamHandlerFunc(watcher *Watcher, listFunc func() (interface{}, error)) func(w http.ResponseWriter, r *http.Request)

Types

type CredentialCreate

type CredentialCreate struct {
	Name      string `json:"name"`
	PublicKey string `json:"pubkey"`
}

type CredentialList

type CredentialList struct {
	Credentials []*vmapi.Credential `json:"data"`
}

func (CredentialList) Len

func (l CredentialList) Len() int

func (CredentialList) Less

func (l CredentialList) Less(i, j int) bool

func (CredentialList) Swap

func (l CredentialList) Swap(i, j int)

type Instance

type Instance struct {
	Name        string             `json:"name"`
	Cpus        int                `json:"cpus"`
	Memory      int                `json:"memory"`
	Image       string             `json:"image"`
	Action      string             `json:"action"`
	PublicKeys  []string           `json:"pubkey"`
	HostedNovnc bool               `json:"novnc"`
	NodeName    string             `json:"node_name"`
	Volume      vmapi.VolumeSource `json:"volume"`
}

func (*Instance) IsValid

func (i *Instance) IsValid() bool

type InstanceCreate

type InstanceCreate struct {
	Instance  `json:",inline"`
	Instances int32 `json:"instances"`
}

func (*InstanceCreate) IsValid

func (ic *InstanceCreate) IsValid() bool

type InstanceList

type InstanceList struct {
	Instances []*vmapi.VirtualMachine `json:"data"`
}

func (InstanceList) Len

func (l InstanceList) Len() int

func (InstanceList) Less

func (l InstanceList) Less(i, j int) bool

func (InstanceList) Swap

func (l InstanceList) Swap(i, j int)

type InstanceNames

type InstanceNames struct {
	Names []string `json:"names"`
}

type MachineImageCreate added in v0.2.0

type MachineImageCreate struct {
	v1alpha1.MachineImageSpec `json:",inline"`
	Name                      string `json:"name"`
}

type MachineImageList added in v0.2.0

type MachineImageList struct {
	Items []*v1alpha1.MachineImage `json:"data"`
}

func (MachineImageList) Len added in v0.2.0

func (l MachineImageList) Len() int

func (MachineImageList) Less added in v0.2.0

func (l MachineImageList) Less(i, j int) bool

func (MachineImageList) Swap added in v0.2.0

func (l MachineImageList) Swap(i, j int)

type NodeList

type NodeList struct {
	Nodes []*corev1.Node `json:"data"`
}

func (NodeList) Len

func (l NodeList) Len() int

func (NodeList) Less

func (l NodeList) Less(i, j int) bool

func (NodeList) Swap

func (l NodeList) Swap(i, j int)

type SettingList added in v0.2.0

type SettingList struct {
	Items []*v1alpha1.Setting `json:"data"`
}

func (SettingList) Len added in v0.2.0

func (l SettingList) Len() int

func (SettingList) Less added in v0.2.0

func (l SettingList) Less(i, j int) bool

func (SettingList) Swap added in v0.2.0

func (l SettingList) Swap(i, j int)

type SettingSet added in v0.2.0

type SettingSet struct {
	Value string `json:"value"`
}

type SimpleResourceEventHandler

type SimpleResourceEventHandler struct{ ChangeFunc func() }

func (SimpleResourceEventHandler) OnAdd

func (s SimpleResourceEventHandler) OnAdd(obj interface{})

func (SimpleResourceEventHandler) OnDelete

func (s SimpleResourceEventHandler) OnDelete(obj interface{})

func (SimpleResourceEventHandler) OnUpdate

func (s SimpleResourceEventHandler) OnUpdate(oldObj, newObj interface{})

type Watcher

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

func (*Watcher) Close

func (w *Watcher) Close()

func (*Watcher) Events

func (w *Watcher) Events() <-chan struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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