machinery

package
v0.0.0-...-a9890c3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DeviceType_name = map[int32]string{
		0: "ROUTER",
		1: "VM",
		2: "BLOCK",
	}
	DeviceType_value = map[string]int32{
		"ROUTER": 0,
		"VM":     1,
		"BLOCK":  2,
	}
)

Enum value maps for DeviceType.

View Source
var (
	PlacementAction_name = map[int32]string{
		0: "ASSIGN",
		1: "REPLACE",
		2: "UNASSIGN",
	}
	PlacementAction_value = map[string]int32{
		"ASSIGN":   0,
		"REPLACE":  1,
		"UNASSIGN": 2,
	}
)

Enum value maps for PlacementAction.

View Source
var (
	Machine_Capability_name = map[int32]string{
		0: "ORCHEST",
		1: "COMPUTE",
		2: "NETWORK",
		3: "STORAGE",
	}
	Machine_Capability_value = map[string]int32{
		"ORCHEST": 0,
		"COMPUTE": 1,
		"NETWORK": 2,
		"STORAGE": 3,
	}
)

Enum value maps for Machine_Capability.

View Source
var File_machinery_proto protoreflect.FileDescriptor

Functions

func RegisterMachineryServiceServer

func RegisterMachineryServiceServer(s *grpc.Server, srv MachineryServiceServer)

Types

type DeviceType

type DeviceType int32
const (
	DeviceType_ROUTER DeviceType = 0
	DeviceType_VM     DeviceType = 1
	DeviceType_BLOCK  DeviceType = 2
)

func (DeviceType) Descriptor

func (DeviceType) Descriptor() protoreflect.EnumDescriptor

func (DeviceType) Enum

func (x DeviceType) Enum() *DeviceType

func (DeviceType) EnumDescriptor deprecated

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

Deprecated: Use DeviceType.Descriptor instead.

func (DeviceType) Number

func (x DeviceType) Number() protoreflect.EnumNumber

func (DeviceType) String

func (x DeviceType) String() string

func (DeviceType) Type

type Machine

type Machine struct {
	Id               string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Capabilities     []Machine_Capability `protobuf:"varint,2,rep,packed,name=capabilities,proto3,enum=vpc.machinery.Machine_Capability" json:"capabilities,omitempty"`
	LastCheckin      string               `protobuf:"bytes,3,opt,name=last_checkin,json=lastCheckin,proto3" json:"last_checkin,omitempty"`
	AvailabilityZone string               `protobuf:"bytes,4,opt,name=availability_zone,json=availabilityZone,proto3" json:"availability_zone,omitempty"`
	Versions         map[string]string    `` /* 157-byte string literal not displayed */
	Limits           map[string]int32     `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Machine) Descriptor deprecated

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

Deprecated: Use Machine.ProtoReflect.Descriptor instead.

func (*Machine) GetAvailabilityZone

func (x *Machine) GetAvailabilityZone() string

func (*Machine) GetCapabilities

func (x *Machine) GetCapabilities() []Machine_Capability

func (*Machine) GetId

func (x *Machine) GetId() string

func (*Machine) GetLastCheckin

func (x *Machine) GetLastCheckin() string

func (*Machine) GetLimits

func (x *Machine) GetLimits() map[string]int32

func (*Machine) GetVersions

func (x *Machine) GetVersions() map[string]string

func (*Machine) ProtoMessage

func (*Machine) ProtoMessage()

func (*Machine) ProtoReflect

func (x *Machine) ProtoReflect() protoreflect.Message

func (*Machine) Reset

func (x *Machine) Reset()

func (*Machine) String

func (x *Machine) String() string

type Machine_Capability

type Machine_Capability int32
const (
	Machine_ORCHEST Machine_Capability = 0
	Machine_COMPUTE Machine_Capability = 1
	Machine_NETWORK Machine_Capability = 2
	Machine_STORAGE Machine_Capability = 3
)

func (Machine_Capability) Descriptor

func (Machine_Capability) Enum

func (Machine_Capability) EnumDescriptor deprecated

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

Deprecated: Use Machine_Capability.Descriptor instead.

func (Machine_Capability) Number

func (Machine_Capability) String

func (x Machine_Capability) String() string

func (Machine_Capability) Type

type MachineryServiceClient

type MachineryServiceClient interface {
	Ping(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*PingResponse, error)
	Placements(ctx context.Context, in *PlacementsRequest, opts ...grpc.CallOption) (*PlacementsResponse, error)
	Machines(ctx context.Context, in *MachinesRequest, opts ...grpc.CallOption) (*MachinesResponse, error)
	Place(ctx context.Context, in *PlaceRequest, opts ...grpc.CallOption) (*PlaceResponse, error)
}

MachineryServiceClient is the client API for MachineryService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type MachineryServiceServer

type MachineryServiceServer interface {
	Ping(context.Context, *Machine) (*PingResponse, error)
	Placements(context.Context, *PlacementsRequest) (*PlacementsResponse, error)
	Machines(context.Context, *MachinesRequest) (*MachinesResponse, error)
	Place(context.Context, *PlaceRequest) (*PlaceResponse, error)
	// contains filtered or unexported methods
}

MachineryServiceServer is the server API for MachineryService service. All implementations must embed UnimplementedMachineryServiceServer for forward compatibility

type MachinesRequest

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

func (*MachinesRequest) Descriptor deprecated

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

Deprecated: Use MachinesRequest.ProtoReflect.Descriptor instead.

func (*MachinesRequest) ProtoMessage

func (*MachinesRequest) ProtoMessage()

func (*MachinesRequest) ProtoReflect

func (x *MachinesRequest) ProtoReflect() protoreflect.Message

func (*MachinesRequest) Reset

func (x *MachinesRequest) Reset()

func (*MachinesRequest) String

func (x *MachinesRequest) String() string

type MachinesResponse

type MachinesResponse struct {
	Machines []*Machine `protobuf:"bytes,1,rep,name=machines,proto3" json:"machines,omitempty"`
	// contains filtered or unexported fields
}

func (*MachinesResponse) Descriptor deprecated

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

Deprecated: Use MachinesResponse.ProtoReflect.Descriptor instead.

func (*MachinesResponse) GetMachines

func (x *MachinesResponse) GetMachines() []*Machine

func (*MachinesResponse) ProtoMessage

func (*MachinesResponse) ProtoMessage()

func (*MachinesResponse) ProtoReflect

func (x *MachinesResponse) ProtoReflect() protoreflect.Message

func (*MachinesResponse) Reset

func (x *MachinesResponse) Reset()

func (*MachinesResponse) String

func (x *MachinesResponse) String() string

type PingResponse

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

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

func (x *PingResponse) ProtoReflect() protoreflect.Message

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

type PlaceRequest

type PlaceRequest struct {
	Action    PlacementAction `protobuf:"varint,1,opt,name=action,proto3,enum=vpc.machinery.PlacementAction" json:"action,omitempty"`
	Placement *Placement      `protobuf:"bytes,2,opt,name=placement,proto3" json:"placement,omitempty"`
	// contains filtered or unexported fields
}

func (*PlaceRequest) Descriptor deprecated

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

Deprecated: Use PlaceRequest.ProtoReflect.Descriptor instead.

func (*PlaceRequest) GetAction

func (x *PlaceRequest) GetAction() PlacementAction

func (*PlaceRequest) GetPlacement

func (x *PlaceRequest) GetPlacement() *Placement

func (*PlaceRequest) ProtoMessage

func (*PlaceRequest) ProtoMessage()

func (*PlaceRequest) ProtoReflect

func (x *PlaceRequest) ProtoReflect() protoreflect.Message

func (*PlaceRequest) Reset

func (x *PlaceRequest) Reset()

func (*PlaceRequest) String

func (x *PlaceRequest) String() string

type PlaceResponse

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

func (*PlaceResponse) Descriptor deprecated

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

Deprecated: Use PlaceResponse.ProtoReflect.Descriptor instead.

func (*PlaceResponse) ProtoMessage

func (*PlaceResponse) ProtoMessage()

func (*PlaceResponse) ProtoReflect

func (x *PlaceResponse) ProtoReflect() protoreflect.Message

func (*PlaceResponse) Reset

func (x *PlaceResponse) Reset()

func (*PlaceResponse) String

func (x *PlaceResponse) String() string

type Placement

type Placement struct {
	Id         string     `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	MachineId  string     `protobuf:"bytes,2,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
	DeviceType DeviceType `protobuf:"varint,4,opt,name=device_type,json=deviceType,proto3,enum=vpc.machinery.DeviceType" json:"device_type,omitempty"`
	DeviceId   string     `protobuf:"bytes,5,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Placement) Descriptor deprecated

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

Deprecated: Use Placement.ProtoReflect.Descriptor instead.

func (*Placement) GetDeviceId

func (x *Placement) GetDeviceId() string

func (*Placement) GetDeviceType

func (x *Placement) GetDeviceType() DeviceType

func (*Placement) GetId

func (x *Placement) GetId() string

func (*Placement) GetMachineId

func (x *Placement) GetMachineId() string

func (*Placement) ProtoMessage

func (*Placement) ProtoMessage()

func (*Placement) ProtoReflect

func (x *Placement) ProtoReflect() protoreflect.Message

func (*Placement) Reset

func (x *Placement) Reset()

func (*Placement) String

func (x *Placement) String() string

type PlacementAction

type PlacementAction int32
const (
	PlacementAction_ASSIGN   PlacementAction = 0
	PlacementAction_REPLACE  PlacementAction = 1
	PlacementAction_UNASSIGN PlacementAction = 2
)

func (PlacementAction) Descriptor

func (PlacementAction) Enum

func (x PlacementAction) Enum() *PlacementAction

func (PlacementAction) EnumDescriptor deprecated

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

Deprecated: Use PlacementAction.Descriptor instead.

func (PlacementAction) Number

func (PlacementAction) String

func (x PlacementAction) String() string

func (PlacementAction) Type

type PlacementsRequest

type PlacementsRequest struct {
	MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PlacementsRequest) Descriptor deprecated

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

Deprecated: Use PlacementsRequest.ProtoReflect.Descriptor instead.

func (*PlacementsRequest) GetMachineId

func (x *PlacementsRequest) GetMachineId() string

func (*PlacementsRequest) ProtoMessage

func (*PlacementsRequest) ProtoMessage()

func (*PlacementsRequest) ProtoReflect

func (x *PlacementsRequest) ProtoReflect() protoreflect.Message

func (*PlacementsRequest) Reset

func (x *PlacementsRequest) Reset()

func (*PlacementsRequest) String

func (x *PlacementsRequest) String() string

type PlacementsResponse

type PlacementsResponse struct {
	Placements []*Placement `protobuf:"bytes,1,rep,name=placements,proto3" json:"placements,omitempty"`
	Types      []DeviceType `protobuf:"varint,2,rep,packed,name=types,proto3,enum=vpc.machinery.DeviceType" json:"types,omitempty"`
	// contains filtered or unexported fields
}

func (*PlacementsResponse) Descriptor deprecated

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

Deprecated: Use PlacementsResponse.ProtoReflect.Descriptor instead.

func (*PlacementsResponse) GetPlacements

func (x *PlacementsResponse) GetPlacements() []*Placement

func (*PlacementsResponse) GetTypes

func (x *PlacementsResponse) GetTypes() []DeviceType

func (*PlacementsResponse) ProtoMessage

func (*PlacementsResponse) ProtoMessage()

func (*PlacementsResponse) ProtoReflect

func (x *PlacementsResponse) ProtoReflect() protoreflect.Message

func (*PlacementsResponse) Reset

func (x *PlacementsResponse) Reset()

func (*PlacementsResponse) String

func (x *PlacementsResponse) String() string

type UnimplementedMachineryServiceServer

type UnimplementedMachineryServiceServer struct {
}

UnimplementedMachineryServiceServer must be embedded to have forward compatible implementations.

func (*UnimplementedMachineryServiceServer) Machines

func (*UnimplementedMachineryServiceServer) Ping

func (*UnimplementedMachineryServiceServer) Place

func (*UnimplementedMachineryServiceServer) Placements

Jump to

Keyboard shortcuts

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