hyper

package
v0.0.0-...-c4bda09 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerExecCreateResponse

type ContainerExecCreateResponse struct {
	ID string
}

type FipAllocateRequest

type FipAllocateRequest struct {
	Count int `json:"count"`
}

fip

func (*FipAllocateRequest) DeepCopyObject

func (fa *FipAllocateRequest) DeepCopyObject() runtime.Object

func (*FipAllocateRequest) GetObjectKind

func (fa *FipAllocateRequest) GetObjectKind() schema.ObjectKind

type FipCli

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

func NewFipCli

func NewFipCli(client *HyperConn) *FipCli

func (*FipCli) AllocateFip

func (f *FipCli) AllocateFip(count int) (int, []FipResponse, error)

func (*FipCli) GetFip

func (f *FipCli) GetFip(ip string) (int, *FipResponse, error)

func (*FipCli) ListFips

func (f *FipCli) ListFips() (int, []FipResponse, error)

func (*FipCli) NameFip

func (f *FipCli) NameFip(ip, name string) (int, string, error)

func (*FipCli) ReleaseAllFips

func (f *FipCli) ReleaseAllFips()

func (*FipCli) ReleaseFip

func (f *FipCli) ReleaseFip(ip string) (int, string)

type FipRenameRequest

type FipRenameRequest struct {
	Name string `json:"name"`
}

func (*FipRenameRequest) DeepCopyObject

func (fn *FipRenameRequest) DeepCopyObject() runtime.Object

func (*FipRenameRequest) GetObjectKind

func (fn *FipRenameRequest) GetObjectKind() schema.ObjectKind

type FipResponse

type FipResponse struct {
	Fip       string    `json:"fip"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"createdAt"`
	Services  []string  `json:"services"`
}

type GCPDiskInfo

type GCPDiskInfo struct {
	Name string
	ID   string
	Zone string
}

type HyperConn

type HyperConn struct {
	Host      string
	Region    string
	AccessKey string
	SecretKey string
}

func NewHyperConn

func NewHyperConn(config *restclient.Config) *HyperConn

func (*HyperConn) SockRequest

func (u *HyperConn) SockRequest(method, endpoint string, data io.Reader, contentType string) (string, int, error)

func (*HyperConn) SockRequestHijack

func (u *HyperConn) SockRequestHijack(method, endpoint string, data io.Reader, ct string) (net.Conn, *bufio.Reader, error)

////////////////////////////////////////////// for hijack connection //////////////////////////////////////////////

type InfoCli

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

func NewInfoCli

func NewInfoCli(client *HyperConn) *InfoCli

func (*InfoCli) GetInfo

func (f *InfoCli) GetInfo() (int, map[string]string, error)

type PodCli

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

func NewPodCli

func NewPodCli(client *HyperConn) *PodCli

func (*PodCli) CreatePod

func (p *PodCli) CreatePod(podFile string, podName string)

func (*PodCli) DeleteAllPods

func (p *PodCli) DeleteAllPods(filter string, gracePeriodSeconds int)

func (*PodCli) DeletePod

func (p *PodCli) DeletePod(podName string, gracePeriodSeconds int)

func (*PodCli) ExecPod

func (p *PodCli) ExecPod(podName, containerName string, command []string)

use k8s exec

func (*PodCli) GetPod

func (p *PodCli) GetPod(podName string) (*v1.Pod, error)

func (*PodCli) HyperExecPod

func (p *PodCli) HyperExecPod(podName, containerName string, command []string)

use hyper exec: support hijack connection

func (*PodCli) ListPods

func (p *PodCli) ListPods() (*v1.PodList, error)

type PodExecResponse

type PodExecResponse struct {
	Result string
}

type UserCli

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

func NewUserCli

func NewUserCli(client *HyperConn) *UserCli

func (*UserCli) UpdateDefaultZone

func (u *UserCli) UpdateDefaultZone(tenant, zone string) (int, error)

type Volume

type Volume struct {
	Name       string                 // Name is the Name of the volume
	Driver     string                 // Driver is the Driver Name used to create the volume
	Mountpoint string                 // Mountpoint is the location on disk of the volume
	Status     map[string]interface{} `json:",omitempty"` // Status provides low-level status information about the volume
	Labels     map[string]string      // Labels is metadata specific to the volume
	Scope      string                 // Scope describes the level at which the volume exists (e.g. `global` for cluster-wide or `local` for machine level)

	CreatedAt time.Time
}

type VolumeCli

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

func NewVolumeCli

func NewVolumeCli(client *HyperConn) *VolumeCli

func (*VolumeCli) CreateVolume

func (v *VolumeCli) CreateVolume(volName, zone, size string) (int, *VolumeResponse, error)

func (*VolumeCli) DeleteAllVolumes

func (v *VolumeCli) DeleteAllVolumes(zone string)

func (*VolumeCli) DeleteVolume

func (v *VolumeCli) DeleteVolume(volName, zone string) (int, string)

func (*VolumeCli) GetVolume

func (v *VolumeCli) GetVolume(volName, zone string) (int, *VolumeResponse, error)

func (*VolumeCli) ListVolumes

func (v *VolumeCli) ListVolumes(zone string) (int, []VolumeResponse, error)

type VolumeCreateRequest

type VolumeCreateRequest struct {
	Name string `json:"name"`
	Zone string `json:"zone"`
	Size int    `json:"size"`
}

volume

func (*VolumeCreateRequest) DeepCopyObject

func (v *VolumeCreateRequest) DeepCopyObject() runtime.Object

func (*VolumeCreateRequest) GetObjectKind

func (v *VolumeCreateRequest) GetObjectKind() schema.ObjectKind

type VolumeData

type VolumeData struct {
	ID     string
	Tenant string
	GCP    GCPDiskInfo
	Disk   VolumeResponse
}

type VolumeResponse

type VolumeResponse struct {
	Name      string    `json:"name"`
	Size      int       `json:"size"`
	Zone      string    `json:"zone"`
	Pod       string    `json:"pod"`
	Job       string    `json:"job"`
	CreatedAt time.Time `json:"createdAt"`
}

Jump to

Keyboard shortcuts

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