node

package
v0.0.0-...-e913552 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Status_name = map[int32]string{
	0: "SUCCESS",
	1: "FAILED",
}
View Source
var Status_value = map[string]int32{
	"SUCCESS": 0,
	"FAILED":  1,
}

Functions

func RegisterNodeServer

func RegisterNodeServer(s *grpc.Server, srv NodeServer)

Types

type ConnectResponse

type ConnectResponse struct {
	Status               Status   `protobuf:"varint,1,opt,name=status,proto3,enum=node.Status" json:"status,omitempty"`
	Path                 string   `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ConnectResponse) Descriptor

func (*ConnectResponse) Descriptor() ([]byte, []int)

func (*ConnectResponse) GetPath

func (m *ConnectResponse) GetPath() string

func (*ConnectResponse) GetStatus

func (m *ConnectResponse) GetStatus() Status

func (*ConnectResponse) ProtoMessage

func (*ConnectResponse) ProtoMessage()

func (*ConnectResponse) Reset

func (m *ConnectResponse) Reset()

func (*ConnectResponse) String

func (m *ConnectResponse) String() string

func (*ConnectResponse) XXX_DiscardUnknown

func (m *ConnectResponse) XXX_DiscardUnknown()

func (*ConnectResponse) XXX_Marshal

func (m *ConnectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectResponse) XXX_Merge

func (m *ConnectResponse) XXX_Merge(src proto.Message)

func (*ConnectResponse) XXX_Size

func (m *ConnectResponse) XXX_Size() int

func (*ConnectResponse) XXX_Unmarshal

func (m *ConnectResponse) XXX_Unmarshal(b []byte) error

type DriveResponse

type DriveResponse struct {
	Status               Status   `protobuf:"varint,1,opt,name=status,proto3,enum=node.Status" json:"status,omitempty"`
	Size                 int64    `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Path                 string   `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DriveResponse) Descriptor

func (*DriveResponse) Descriptor() ([]byte, []int)

func (*DriveResponse) GetPath

func (m *DriveResponse) GetPath() string

func (*DriveResponse) GetSize

func (m *DriveResponse) GetSize() int64

func (*DriveResponse) GetStatus

func (m *DriveResponse) GetStatus() Status

func (*DriveResponse) ProtoMessage

func (*DriveResponse) ProtoMessage()

func (*DriveResponse) Reset

func (m *DriveResponse) Reset()

func (*DriveResponse) String

func (m *DriveResponse) String() string

func (*DriveResponse) XXX_DiscardUnknown

func (m *DriveResponse) XXX_DiscardUnknown()

func (*DriveResponse) XXX_Marshal

func (m *DriveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DriveResponse) XXX_Merge

func (m *DriveResponse) XXX_Merge(src proto.Message)

func (*DriveResponse) XXX_Size

func (m *DriveResponse) XXX_Size() int

func (*DriveResponse) XXX_Unmarshal

func (m *DriveResponse) XXX_Unmarshal(b []byte) error

type ImageName

type ImageName struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ImageName) Descriptor

func (*ImageName) Descriptor() ([]byte, []int)

func (*ImageName) GetName

func (m *ImageName) GetName() string

func (*ImageName) ProtoMessage

func (*ImageName) ProtoMessage()

func (*ImageName) Reset

func (m *ImageName) Reset()

func (*ImageName) String

func (m *ImageName) String() string

func (*ImageName) XXX_DiscardUnknown

func (m *ImageName) XXX_DiscardUnknown()

func (*ImageName) XXX_Marshal

func (m *ImageName) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ImageName) XXX_Merge

func (m *ImageName) XXX_Merge(src proto.Message)

func (*ImageName) XXX_Size

func (m *ImageName) XXX_Size() int

func (*ImageName) XXX_Unmarshal

func (m *ImageName) XXX_Unmarshal(b []byte) error

type NodeClient

type NodeClient interface {
	StartVM(ctx context.Context, in *VmConfig, opts ...grpc.CallOption) (*VmResponse, error)
	StopVM(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*Response, error)
	ListVMs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*VmList, error)
	CreateDrive(ctx context.Context, in *ImageName, opts ...grpc.CallOption) (*DriveResponse, error)
	ConnectVolume(ctx context.Context, in *Volume, opts ...grpc.CallOption) (*ConnectResponse, error)
}

NodeClient is the client API for Node service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNodeClient

func NewNodeClient(cc *grpc.ClientConn) NodeClient

type NodeServer

type NodeServer interface {
	StartVM(context.Context, *VmConfig) (*VmResponse, error)
	StopVM(context.Context, *UUID) (*Response, error)
	ListVMs(context.Context, *empty.Empty) (*VmList, error)
	CreateDrive(context.Context, *ImageName) (*DriveResponse, error)
	ConnectVolume(context.Context, *Volume) (*ConnectResponse, error)
}

NodeServer is the server API for Node service.

type Response

type Response struct {
	Status               Status   `protobuf:"varint,1,opt,name=status,proto3,enum=node.Status" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) GetStatus

func (m *Response) GetStatus() Status

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type Status

type Status int32
const (
	Status_SUCCESS Status = 0
	Status_FAILED  Status = 1
)

func (Status) EnumDescriptor

func (Status) EnumDescriptor() ([]byte, []int)

func (Status) String

func (x Status) String() string

type UUID

type UUID struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UUID) Descriptor

func (*UUID) Descriptor() ([]byte, []int)

func (*UUID) GetValue

func (m *UUID) GetValue() string

func (*UUID) ProtoMessage

func (*UUID) ProtoMessage()

func (*UUID) Reset

func (m *UUID) Reset()

func (*UUID) String

func (m *UUID) String() string

func (*UUID) XXX_DiscardUnknown

func (m *UUID) XXX_DiscardUnknown()

func (*UUID) XXX_Marshal

func (m *UUID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UUID) XXX_Merge

func (m *UUID) XXX_Merge(src proto.Message)

func (*UUID) XXX_Size

func (m *UUID) XXX_Size() int

func (*UUID) XXX_Unmarshal

func (m *UUID) XXX_Unmarshal(b []byte) error

type UnimplementedNodeServer

type UnimplementedNodeServer struct {
}

UnimplementedNodeServer can be embedded to have forward compatible implementations.

func (*UnimplementedNodeServer) ConnectVolume

func (*UnimplementedNodeServer) ConnectVolume(ctx context.Context, req *Volume) (*ConnectResponse, error)

func (*UnimplementedNodeServer) CreateDrive

func (*UnimplementedNodeServer) ListVMs

func (*UnimplementedNodeServer) ListVMs(ctx context.Context, req *empty.Empty) (*VmList, error)

func (*UnimplementedNodeServer) StartVM

func (*UnimplementedNodeServer) StopVM

func (*UnimplementedNodeServer) StopVM(ctx context.Context, req *UUID) (*Response, error)

type VmConfig

type VmConfig struct {
	VmID                 *UUID    `protobuf:"bytes,1,opt,name=vmID,proto3" json:"vmID,omitempty"`
	Memory               int64    `protobuf:"varint,2,opt,name=memory,proto3" json:"memory,omitempty"`
	Vcpus                int64    `protobuf:"varint,3,opt,name=vcpus,proto3" json:"vcpus,omitempty"`
	KernelImage          string   `protobuf:"bytes,4,opt,name=kernelImage,proto3" json:"kernelImage,omitempty"`
	RootFileSystem       string   `protobuf:"bytes,5,opt,name=rootFileSystem,proto3" json:"rootFileSystem,omitempty"`
	Address              string   `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VmConfig) Descriptor

func (*VmConfig) Descriptor() ([]byte, []int)

func (*VmConfig) GetAddress

func (m *VmConfig) GetAddress() string

func (*VmConfig) GetKernelImage

func (m *VmConfig) GetKernelImage() string

func (*VmConfig) GetMemory

func (m *VmConfig) GetMemory() int64

func (*VmConfig) GetRootFileSystem

func (m *VmConfig) GetRootFileSystem() string

func (*VmConfig) GetVcpus

func (m *VmConfig) GetVcpus() int64

func (*VmConfig) GetVmID

func (m *VmConfig) GetVmID() *UUID

func (*VmConfig) ProtoMessage

func (*VmConfig) ProtoMessage()

func (*VmConfig) Reset

func (m *VmConfig) Reset()

func (*VmConfig) String

func (m *VmConfig) String() string

func (*VmConfig) XXX_DiscardUnknown

func (m *VmConfig) XXX_DiscardUnknown()

func (*VmConfig) XXX_Marshal

func (m *VmConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VmConfig) XXX_Merge

func (m *VmConfig) XXX_Merge(src proto.Message)

func (*VmConfig) XXX_Size

func (m *VmConfig) XXX_Size() int

func (*VmConfig) XXX_Unmarshal

func (m *VmConfig) XXX_Unmarshal(b []byte) error

type VmList

type VmList struct {
	VmID                 []*UUID  `protobuf:"bytes,1,rep,name=vmID,proto3" json:"vmID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VmList) Descriptor

func (*VmList) Descriptor() ([]byte, []int)

func (*VmList) GetVmID

func (m *VmList) GetVmID() []*UUID

func (*VmList) ProtoMessage

func (*VmList) ProtoMessage()

func (*VmList) Reset

func (m *VmList) Reset()

func (*VmList) String

func (m *VmList) String() string

func (*VmList) XXX_DiscardUnknown

func (m *VmList) XXX_DiscardUnknown()

func (*VmList) XXX_Marshal

func (m *VmList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VmList) XXX_Merge

func (m *VmList) XXX_Merge(src proto.Message)

func (*VmList) XXX_Size

func (m *VmList) XXX_Size() int

func (*VmList) XXX_Unmarshal

func (m *VmList) XXX_Unmarshal(b []byte) error

type VmResponse

type VmResponse struct {
	Status               Status    `protobuf:"varint,1,opt,name=status,proto3,enum=node.Status" json:"status,omitempty"`
	Config               *VmConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*VmResponse) Descriptor

func (*VmResponse) Descriptor() ([]byte, []int)

func (*VmResponse) GetConfig

func (m *VmResponse) GetConfig() *VmConfig

func (*VmResponse) GetStatus

func (m *VmResponse) GetStatus() Status

func (*VmResponse) ProtoMessage

func (*VmResponse) ProtoMessage()

func (*VmResponse) Reset

func (m *VmResponse) Reset()

func (*VmResponse) String

func (m *VmResponse) String() string

func (*VmResponse) XXX_DiscardUnknown

func (m *VmResponse) XXX_DiscardUnknown()

func (*VmResponse) XXX_Marshal

func (m *VmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VmResponse) XXX_Merge

func (m *VmResponse) XXX_Merge(src proto.Message)

func (*VmResponse) XXX_Size

func (m *VmResponse) XXX_Size() int

func (*VmResponse) XXX_Unmarshal

func (m *VmResponse) XXX_Unmarshal(b []byte) error

type Volume

type Volume struct {
	VolumeID             string   `protobuf:"bytes,1,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
	PoolName             string   `protobuf:"bytes,2,opt,name=poolName,proto3" json:"poolName,omitempty"`
	ImagePath            string   `protobuf:"bytes,3,opt,name=imagePath,proto3" json:"imagePath,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Volume) Descriptor

func (*Volume) Descriptor() ([]byte, []int)

func (*Volume) GetImagePath

func (m *Volume) GetImagePath() string

func (*Volume) GetPoolName

func (m *Volume) GetPoolName() string

func (*Volume) GetVolumeID

func (m *Volume) GetVolumeID() string

func (*Volume) ProtoMessage

func (*Volume) ProtoMessage()

func (*Volume) Reset

func (m *Volume) Reset()

func (*Volume) String

func (m *Volume) String() string

func (*Volume) XXX_DiscardUnknown

func (m *Volume) XXX_DiscardUnknown()

func (*Volume) XXX_Marshal

func (m *Volume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Volume) XXX_Merge

func (m *Volume) XXX_Merge(src proto.Message)

func (*Volume) XXX_Size

func (m *Volume) XXX_Size() int

func (*Volume) XXX_Unmarshal

func (m *Volume) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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