listeners

package
v19.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BucketHandler = handlers.NewBucketHandler

BucketHandler ...

View Source
var DataHandler = handlers.NewDataHandler

DataHandler ...

View Source
var GetCurrentStorageTenants = getCurrentStorageTenants

GetCurrentStorageTenants contains the current tenant

View Source
var GetCurrentTenant = getCurrentTenant

GetCurrentTenant contains the current tenant

View Source
var HostHandler = handlers.NewHostHandler

HostHandler ...

View Source
var ImageHandler = handlers.NewImageHandler

ImageHandler ...

View Source
var JobManagerHandler = handlers.NewJobHandler

JobManagerHandler ...

View Source
var NetworkHandler = handlers.NewNetworkHandler

NetworkHandler ...

SSHHandler exists to ease integration tests

View Source
var ShareHandler = handlers.NewShareHandler

ShareHandler ...

View Source
var TemplateHandler = handlers.NewTemplateHandler

TemplateHandler exists to ease integration tests

View Source
var VolumeHandler = handlers.NewVolumeHandler

VolumeHandler ...

Functions

This section is empty.

Types

type BucketListener

type BucketListener struct{}

BucketListener is the bucket service grpc server

func (*BucketListener) Create

func (s *BucketListener) Create(ctx context.Context, in *pb.Bucket) (empty *google_protobuf.Empty, err error)

Create a new bucket

func (*BucketListener) Delete

func (s *BucketListener) Delete(ctx context.Context, in *pb.Bucket) (empty *google_protobuf.Empty, err error)

Delete a bucket

func (*BucketListener) Inspect

func (s *BucketListener) Inspect(ctx context.Context, in *pb.Bucket) (bmp *pb.BucketMountingPoint, err error)

Inspect a bucket

func (*BucketListener) List

func (s *BucketListener) List(ctx context.Context, in *google_protobuf.Empty) (bl *pb.BucketList, err error)

List available buckets

func (*BucketListener) Mount

Mount a bucket on the filesystem of the host

func (*BucketListener) Unmount

func (s *BucketListener) Unmount(ctx context.Context, in *pb.BucketMountingPoint) (empty *google_protobuf.Empty, err error)

Unmount a bucket from the filesystem of the host

type DataListener

type DataListener struct{}

DataListener is the data service grpc server

func (*DataListener) Delete

func (s *DataListener) Delete(ctx context.Context, in *pb.File) (empty *google_protobuf.Empty, err error)

Delete remove a file from one or several Object Storages

func (*DataListener) Get

func (s *DataListener) Get(ctx context.Context, in *pb.File) (empty *google_protobuf.Empty, err error)

Get fetch a file from one or several ObjectStorages

func (*DataListener) List

func (s *DataListener) List(ctx context.Context, in *google_protobuf.Empty) (fl *pb.FileList, err error)

List will returns all the files from one or several ObjectStorages

func (*DataListener) Push

func (s *DataListener) Push(ctx context.Context, in *pb.File) (empty *google_protobuf.Empty, err error)

Push upload a file to one or several ObjectStorages

type HostListener

type HostListener struct{}

HostListener host service server grpc

func (*HostListener) Create

func (s *HostListener) Create(ctx context.Context, in *pb.HostDefinition) (h *pb.Host, err error)

Create creates a new host

func (*HostListener) Delete

func (s *HostListener) Delete(ctx context.Context, in *pb.Reference) (empty *google_protobuf.Empty, err error)

Delete an host

func (*HostListener) Inspect

func (s *HostListener) Inspect(ctx context.Context, in *pb.Reference) (h *pb.Host, err error)

Inspect an host

func (*HostListener) List

func (s *HostListener) List(ctx context.Context, in *pb.HostListRequest) (hl *pb.HostList, err error)

List lists hosts managed by SafeScale only, or all hosts.

func (*HostListener) Reboot

func (s *HostListener) Reboot(ctx context.Context, in *pb.Reference) (empty *google_protobuf.Empty, err error)

Reboot reboots a host.

func (*HostListener) Resize

func (s *HostListener) Resize(ctx context.Context, in *pb.HostDefinition) (h *pb.Host, err error)

Resize an host

func (*HostListener) SSH

func (s *HostListener) SSH(ctx context.Context, in *pb.Reference) (sc *pb.SshConfig, err error)

SSH returns ssh parameters to access an host

func (*HostListener) Start

func (s *HostListener) Start(ctx context.Context, in *pb.Reference) (empty *google_protobuf.Empty, err error)

Start ...

func (*HostListener) Status

func (s *HostListener) Status(ctx context.Context, in *pb.Reference) (ht *pb.HostStatus, err error)

Status returns the status of a host (running or stopped mainly)

func (*HostListener) Stop

func (s *HostListener) Stop(ctx context.Context, in *pb.Reference) (empty *google_protobuf.Empty, err error)

Stop shutdowns a host.

type ImageListener

type ImageListener struct{}

ImageListener image service server grpc

func (*ImageListener) List

func (s *ImageListener) List(ctx context.Context, in *pb.ImageListRequest) (il *pb.ImageList, err error)

List available images

type JobManagerListener

type JobManagerListener struct{}

JobManagerListener service server gRPC

func (*JobManagerListener) List

func (s *JobManagerListener) List(ctx context.Context, in *google_protobuf.Empty) (jl *pb.JobList, err error)

List running process

func (*JobManagerListener) Stop

func (s *JobManagerListener) Stop(ctx context.Context, in *pb.JobDefinition) (empty *google_protobuf.Empty, err error)

Stop specified process

type NetworkListener

type NetworkListener struct{}

NetworkListener network service server grpc

func (*NetworkListener) Create

func (s *NetworkListener) Create(ctx context.Context, in *pb.NetworkDefinition) (net *pb.Network, err error)

Create a new network

func (*NetworkListener) Delete

func (s *NetworkListener) Delete(ctx context.Context, in *pb.Reference) (buf *google_protobuf.Empty, err error)

Delete a network

func (*NetworkListener) Inspect

func (s *NetworkListener) Inspect(ctx context.Context, in *pb.Reference) (net *pb.Network, err error)

Inspect returns infos on a network

func (*NetworkListener) List

func (s *NetworkListener) List(ctx context.Context, in *pb.NetworkListRequest) (rv *pb.NetworkList, err error)

List existing networks

type SSHListener

type SSHListener struct{}

SSHListener SSH service server grpc

func (*SSHListener) Copy

func (s *SSHListener) Copy(ctx context.Context, in *pb.SshCopyCommand) (sr *pb.SshResponse, err error)

Copy copy file from/to an host

func (*SSHListener) Run

func (s *SSHListener) Run(ctx context.Context, in *pb.SshCommand) (sr *pb.SshResponse, err error)

Run executes an ssh command an an host

type ShareListener

type ShareListener struct{}

ShareListener Share service server grpc

func (*ShareListener) Create

func (s *ShareListener) Create(ctx context.Context, in *pb.ShareDefinition) (sd *pb.ShareDefinition, err error)

Create calls share service creation

func (*ShareListener) Delete

func (s *ShareListener) Delete(ctx context.Context, in *pb.Reference) (empty *google_protobuf.Empty, err error)

Delete call share service deletion

func (*ShareListener) Inspect

func (s *ShareListener) Inspect(ctx context.Context, in *pb.Reference) (sml *pb.ShareMountList, err error)

Inspect shows the detail of a share and all connected clients

func (*ShareListener) List

func (s *ShareListener) List(ctx context.Context, in *google_protobuf.Empty) (sl *pb.ShareList, err error)

List return the list of all available shares

func (*ShareListener) Mount

Mount mounts share on a local directory of the given host

func (*ShareListener) Unmount

func (s *ShareListener) Unmount(ctx context.Context, in *pb.ShareMountDefinition) (empty *google_protobuf.Empty, err error)

Unmount unmounts share from the given host

type StorageTenants

type StorageTenants struct {
	StorageServices *iaas.StorageServices
	// contains filtered or unexported fields
}

StorageTenants strcture handle tenants names and storages services for a group of storage tenants

type StoredCPUInfo

type StoredCPUInfo struct {
	ID           string `bow:"key"`
	TenantName   string `json:"tenant_name,omitempty"`
	TemplateID   string `json:"template_id,omitempty"`
	TemplateName string `json:"template_name,omitempty"`
	ImageID      string `json:"image_id,omitempty"`
	ImageName    string `json:"image_name,omitempty"`
	LastUpdated  string `json:"last_updated,omitempty"`

	NumberOfCPU    int     `json:"number_of_cpu,omitempty"`
	NumberOfCore   int     `json:"number_of_core,omitempty"`
	NumberOfSocket int     `json:"number_of_socket,omitempty"`
	CPUFrequency   float64 `json:"cpu_frequency,omitempty"`
	CPUArch        string  `json:"cpu_arch,omitempty"`
	Hypervisor     string  `json:"hypervisor,omitempty"`
	CPUModel       string  `json:"cpu_model,omitempty"`
	RAMSize        float64 `json:"ram_size,omitempty"`
	RAMFreq        float64 `json:"ram_freq,omitempty"`
	GPU            int     `json:"gpu,omitempty"`
	GPUModel       string  `json:"gpu_model,omitempty"`
}

StoredCPUInfo ...

type TemplateListener

type TemplateListener struct{}

TemplateListener host service server grpc

func (*TemplateListener) List

List available templates

type Tenant

type Tenant struct {
	Service iaas.Service
	// contains filtered or unexported fields
}

Tenant structure to handle name and clientAPI for a tenant

type TenantListener

type TenantListener struct{}

TenantListener server is used to implement SafeScale.safescale.

func (*TenantListener) Get

func (s *TenantListener) Get(ctx context.Context, in *google_protobuf.Empty) (tn *pb.TenantName, err error)

Get returns the name of the current tenant used

func (*TenantListener) List

func (s *TenantListener) List(ctx context.Context, in *google_protobuf.Empty) (list *pb.TenantList, err error)

List registered tenants

func (*TenantListener) Set

func (s *TenantListener) Set(ctx context.Context, in *pb.TenantName) (empty *google_protobuf.Empty, err error)

Set the the tenant to use for each command

func (*TenantListener) StorageGet

func (s *TenantListener) StorageGet(ctx context.Context, in *google_protobuf.Empty) (tnl *pb.TenantNameList, err error)

StorageGet returns the name of the current storage tenants used for data related commands

func (*TenantListener) StorageList

func (s *TenantListener) StorageList(ctx context.Context, in *google_protobuf.Empty) (tl *pb.TenantList, err error)

StorageList lists registered storage tenants

func (*TenantListener) StorageSet

func (s *TenantListener) StorageSet(ctx context.Context, in *pb.TenantNameList) (empty *google_protobuf.Empty, err error)

StorageSet set the tenants to use for data related commands

type VolumeListener

type VolumeListener struct{}

VolumeListener is the volume service grps server

func (*VolumeListener) Attach

Attach a volume to an host and create a mount point

func (*VolumeListener) Create

func (s *VolumeListener) Create(ctx context.Context, in *pb.VolumeDefinition) (_ *pb.Volume, err error)

Create a new volume

func (*VolumeListener) Delete

func (s *VolumeListener) Delete(ctx context.Context, in *pb.Reference) (_ *google_protobuf.Empty, err error)

Delete a volume

func (*VolumeListener) Detach

Detach a volume from an host. It umount associated mountpoint

func (*VolumeListener) Inspect

func (s *VolumeListener) Inspect(ctx context.Context, in *pb.Reference) (_ *pb.VolumeInfo, err error)

Inspect a volume

func (*VolumeListener) List

func (s *VolumeListener) List(ctx context.Context, in *pb.VolumeListRequest) (_ *pb.VolumeList, err error)

List the available volumes

Jump to

Keyboard shortcuts

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