Documentation ¶
Index ¶
- Variables
- func RegisterLibvirtServer(s grpc.ServiceRegistrar, srv LibvirtServer)
- type Empty
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetEventId() string
- func (x *Event) GetInstance() *Instance
- func (x *Event) GetVolume() *Volume
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventUpdate
- func (*EventUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *EventUpdate) GetEventId() string
- func (x *EventUpdate) GetMessage() string
- func (x *EventUpdate) GetType() EventUpdate_Type
- func (*EventUpdate) ProtoMessage()
- func (x *EventUpdate) ProtoReflect() protoreflect.Message
- func (x *EventUpdate) Reset()
- func (x *EventUpdate) String() string
- type EventUpdate_Type
- func (EventUpdate_Type) Descriptor() protoreflect.EnumDescriptor
- func (x EventUpdate_Type) Enum() *EventUpdate_Type
- func (EventUpdate_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x EventUpdate_Type) Number() protoreflect.EnumNumber
- func (x EventUpdate_Type) String() string
- func (EventUpdate_Type) Type() protoreflect.EnumType
- type Instance
- func (*Instance) Descriptor() ([]byte, []int)deprecated
- func (x *Instance) GetBiosdata() string
- func (x *Instance) GetCores() int32
- func (x *Instance) GetId() string
- func (x *Instance) GetMemory() int32
- func (x *Instance) GetNetworkInterfaces() []*NetworkInterface
- func (x *Instance) GetRootVolume() string
- func (x *Instance) GetSpecialCases() []Instance_SpecialCase
- func (x *Instance) GetState() Instance_State
- func (x *Instance) GetVolumes() []string
- func (*Instance) ProtoMessage()
- func (x *Instance) ProtoReflect() protoreflect.Message
- func (x *Instance) Reset()
- func (x *Instance) String() string
- type Instance_SpecialCase
- func (Instance_SpecialCase) Descriptor() protoreflect.EnumDescriptor
- func (x Instance_SpecialCase) Enum() *Instance_SpecialCase
- func (Instance_SpecialCase) EnumDescriptor() ([]byte, []int)deprecated
- func (x Instance_SpecialCase) Number() protoreflect.EnumNumber
- func (x Instance_SpecialCase) String() string
- func (Instance_SpecialCase) Type() protoreflect.EnumType
- type Instance_State
- func (Instance_State) Descriptor() protoreflect.EnumDescriptor
- func (x Instance_State) Enum() *Instance_State
- func (Instance_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x Instance_State) Number() protoreflect.EnumNumber
- func (x Instance_State) String() string
- func (Instance_State) Type() protoreflect.EnumType
- type LibvirtClient
- type LibvirtServer
- type Libvirt_EventStreamClient
- type Libvirt_EventStreamServer
- type NetworkInterface
- func (*NetworkInterface) Descriptor() ([]byte, []int)deprecated
- func (x *NetworkInterface) GetId() string
- func (x *NetworkInterface) GetIp() string
- func (x *NetworkInterface) GetMac() string
- func (x *NetworkInterface) GetTagged() bool
- func (x *NetworkInterface) GetVlan() []int32
- func (x *NetworkInterface) GetWan() bool
- func (*NetworkInterface) ProtoMessage()
- func (x *NetworkInterface) ProtoReflect() protoreflect.Message
- func (x *NetworkInterface) Reset()
- func (x *NetworkInterface) String() string
- type UnimplementedLibvirtServer
- type UnsafeLibvirtServer
- type Volume
- func (*Volume) Descriptor() ([]byte, []int)deprecated
- func (x *Volume) GetId() string
- func (x *Volume) GetSize() int32
- func (x *Volume) GetSourceImage() string
- func (x *Volume) GetState() Volume_State
- func (*Volume) ProtoMessage()
- func (x *Volume) ProtoReflect() protoreflect.Message
- func (x *Volume) Reset()
- func (x *Volume) String() string
- type Volume_State
- func (Volume_State) Descriptor() protoreflect.EnumDescriptor
- func (x Volume_State) Enum() *Volume_State
- func (Volume_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x Volume_State) Number() protoreflect.EnumNumber
- func (x Volume_State) String() string
- func (Volume_State) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( EventUpdate_Type_name = map[int32]string{ 0: "ASYNC", 1: "STARTED", 2: "UPDATE", 3: "SUCCESS", 4: "FAILED", } EventUpdate_Type_value = map[string]int32{ "ASYNC": 0, "STARTED": 1, "UPDATE": 2, "SUCCESS": 3, "FAILED": 4, } )
Enum value maps for EventUpdate_Type.
var ( Instance_State_name = map[int32]string{ 0: "PENDING", 1: "CREATING", 2: "STARTING", 3: "RUNNING", 4: "STOPPING", 5: "STOPPED", 6: "DELETING", 7: "DELETED", 8: "ERROR", } Instance_State_value = map[string]int32{ "PENDING": 0, "CREATING": 1, "STARTING": 2, "RUNNING": 3, "STOPPING": 4, "STOPPED": 5, "DELETING": 6, "DELETED": 7, "ERROR": 8, } )
Enum value maps for Instance_State.
var ( Instance_SpecialCase_name = map[int32]string{ 0: "ROUTER", 2: "CONTROL_NETWORK", } Instance_SpecialCase_value = map[string]int32{ "ROUTER": 0, "CONTROL_NETWORK": 2, } )
Enum value maps for Instance_SpecialCase.
var ( Volume_State_name = map[int32]string{ 0: "PENDING", 1: "CREATING", 2: "UNATTACHED", 3: "ATTACHED", 4: "DELETED", 5: "ERROR", } Volume_State_value = map[string]int32{ "PENDING": 0, "CREATING": 1, "UNATTACHED": 2, "ATTACHED": 3, "DELETED": 4, "ERROR": 5, } )
Enum value maps for Volume_State.
var File_protos_libvirt_proto protoreflect.FileDescriptor
var Libvirt_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protos.Libvirt", HandlerType: (*LibvirtServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "InstanceStateChange", Handler: _Libvirt_InstanceStateChange_Handler, }, { MethodName: "VolumeStateChange", Handler: _Libvirt_VolumeStateChange_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "EventStream", Handler: _Libvirt_EventStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "protos/libvirt.proto", }
Libvirt_ServiceDesc is the grpc.ServiceDesc for Libvirt service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLibvirtServer ¶
func RegisterLibvirtServer(s grpc.ServiceRegistrar, srv LibvirtServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Event ¶
type Event struct { EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` Instance *Instance `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"` Volume *Volume `protobuf:"bytes,3,opt,name=volume,proto3" json:"volume,omitempty"` // contains filtered or unexported fields }
Event instances are streamed from the central control server to a libvirt node
func (*Event) Descriptor
deprecated
func (*Event) GetEventId ¶
func (*Event) GetInstance ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventUpdate ¶
type EventUpdate struct { EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` Type EventUpdate_Type `protobuf:"varint,2,opt,name=type,proto3,enum=protos.EventUpdate_Type" json:"type,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
EventUpdate instances are streamed from a libvirt node to the central control server
func (*EventUpdate) Descriptor
deprecated
func (*EventUpdate) Descriptor() ([]byte, []int)
Deprecated: Use EventUpdate.ProtoReflect.Descriptor instead.
func (*EventUpdate) GetEventId ¶
func (x *EventUpdate) GetEventId() string
func (*EventUpdate) GetMessage ¶
func (x *EventUpdate) GetMessage() string
func (*EventUpdate) GetType ¶
func (x *EventUpdate) GetType() EventUpdate_Type
func (*EventUpdate) ProtoMessage ¶
func (*EventUpdate) ProtoMessage()
func (*EventUpdate) ProtoReflect ¶
func (x *EventUpdate) ProtoReflect() protoreflect.Message
func (*EventUpdate) Reset ¶
func (x *EventUpdate) Reset()
func (*EventUpdate) String ¶
func (x *EventUpdate) String() string
type EventUpdate_Type ¶
type EventUpdate_Type int32
const ( EventUpdate_ASYNC EventUpdate_Type = 0 // ASYNC type for async updates not triggered by a server-side event. Please help me think of a better name. Also currently unused EventUpdate_STARTED EventUpdate_Type = 1 EventUpdate_UPDATE EventUpdate_Type = 2 EventUpdate_SUCCESS EventUpdate_Type = 3 EventUpdate_FAILED EventUpdate_Type = 4 )
func (EventUpdate_Type) Descriptor ¶
func (EventUpdate_Type) Descriptor() protoreflect.EnumDescriptor
func (EventUpdate_Type) Enum ¶
func (x EventUpdate_Type) Enum() *EventUpdate_Type
func (EventUpdate_Type) EnumDescriptor
deprecated
func (EventUpdate_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use EventUpdate_Type.Descriptor instead.
func (EventUpdate_Type) Number ¶
func (x EventUpdate_Type) Number() protoreflect.EnumNumber
func (EventUpdate_Type) String ¶
func (x EventUpdate_Type) String() string
func (EventUpdate_Type) Type ¶
func (EventUpdate_Type) Type() protoreflect.EnumType
type Instance ¶
type Instance struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` State Instance_State `protobuf:"varint,2,opt,name=state,proto3,enum=protos.Instance_State" json:"state,omitempty"` // removed bytes user_data = 3; RootVolume string `protobuf:"bytes,4,opt,name=root_volume,json=rootVolume,proto3" json:"root_volume,omitempty"` Memory int32 `protobuf:"varint,5,opt,name=memory,proto3" json:"memory,omitempty"` Cores int32 `protobuf:"varint,6,opt,name=cores,proto3" json:"cores,omitempty"` Volumes []string `protobuf:"bytes,7,rep,name=volumes,proto3" json:"volumes,omitempty"` NetworkInterfaces []*NetworkInterface `protobuf:"bytes,8,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` SpecialCases []Instance_SpecialCase `` /* 138-byte string literal not displayed */ Biosdata string `protobuf:"bytes,10,opt,name=biosdata,proto3" json:"biosdata,omitempty"` // contains filtered or unexported fields }
func (*Instance) Descriptor
deprecated
func (*Instance) GetBiosdata ¶
func (*Instance) GetNetworkInterfaces ¶
func (x *Instance) GetNetworkInterfaces() []*NetworkInterface
func (*Instance) GetRootVolume ¶
func (*Instance) GetSpecialCases ¶
func (x *Instance) GetSpecialCases() []Instance_SpecialCase
func (*Instance) GetState ¶
func (x *Instance) GetState() Instance_State
func (*Instance) GetVolumes ¶
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
func (*Instance) ProtoReflect ¶
func (x *Instance) ProtoReflect() protoreflect.Message
type Instance_SpecialCase ¶
type Instance_SpecialCase int32
const ( Instance_ROUTER Instance_SpecialCase = 0 Instance_CONTROL_NETWORK Instance_SpecialCase = 2 )
func (Instance_SpecialCase) Descriptor ¶
func (Instance_SpecialCase) Descriptor() protoreflect.EnumDescriptor
func (Instance_SpecialCase) Enum ¶
func (x Instance_SpecialCase) Enum() *Instance_SpecialCase
func (Instance_SpecialCase) EnumDescriptor
deprecated
func (Instance_SpecialCase) EnumDescriptor() ([]byte, []int)
Deprecated: Use Instance_SpecialCase.Descriptor instead.
func (Instance_SpecialCase) Number ¶
func (x Instance_SpecialCase) Number() protoreflect.EnumNumber
func (Instance_SpecialCase) String ¶
func (x Instance_SpecialCase) String() string
func (Instance_SpecialCase) Type ¶
func (Instance_SpecialCase) Type() protoreflect.EnumType
type Instance_State ¶
type Instance_State int32
const ( Instance_PENDING Instance_State = 0 Instance_CREATING Instance_State = 1 Instance_STARTING Instance_State = 2 Instance_RUNNING Instance_State = 3 Instance_STOPPING Instance_State = 4 Instance_STOPPED Instance_State = 5 Instance_DELETING Instance_State = 6 Instance_DELETED Instance_State = 7 Instance_ERROR Instance_State = 8 )
func (Instance_State) Descriptor ¶
func (Instance_State) Descriptor() protoreflect.EnumDescriptor
func (Instance_State) Enum ¶
func (x Instance_State) Enum() *Instance_State
func (Instance_State) EnumDescriptor
deprecated
func (Instance_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Instance_State.Descriptor instead.
func (Instance_State) Number ¶
func (x Instance_State) Number() protoreflect.EnumNumber
func (Instance_State) String ¶
func (x Instance_State) String() string
func (Instance_State) Type ¶
func (Instance_State) Type() protoreflect.EnumType
type LibvirtClient ¶
type LibvirtClient interface { EventStream(ctx context.Context, opts ...grpc.CallOption) (Libvirt_EventStreamClient, error) InstanceStateChange(ctx context.Context, in *Instance, opts ...grpc.CallOption) (*Empty, error) VolumeStateChange(ctx context.Context, in *Volume, opts ...grpc.CallOption) (*Empty, error) }
LibvirtClient is the client API for Libvirt 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.
func NewLibvirtClient ¶
func NewLibvirtClient(cc grpc.ClientConnInterface) LibvirtClient
type LibvirtServer ¶
type LibvirtServer interface { EventStream(Libvirt_EventStreamServer) error InstanceStateChange(context.Context, *Instance) (*Empty, error) VolumeStateChange(context.Context, *Volume) (*Empty, error) // contains filtered or unexported methods }
LibvirtServer is the server API for Libvirt service. All implementations must embed UnimplementedLibvirtServer for forward compatibility
type Libvirt_EventStreamClient ¶
type Libvirt_EventStreamClient interface { Send(*EventUpdate) error Recv() (*Event, error) grpc.ClientStream }
type Libvirt_EventStreamServer ¶
type Libvirt_EventStreamServer interface { Send(*Event) error Recv() (*EventUpdate, error) grpc.ServerStream }
type NetworkInterface ¶
type NetworkInterface struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Mac string `protobuf:"bytes,2,opt,name=mac,proto3" json:"mac,omitempty"` Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` Vlan []int32 `protobuf:"varint,4,rep,packed,name=vlan,proto3" json:"vlan,omitempty"` Tagged bool `protobuf:"varint,5,opt,name=tagged,proto3" json:"tagged,omitempty"` Wan bool `protobuf:"varint,6,opt,name=wan,proto3" json:"wan,omitempty"` // contains filtered or unexported fields }
func (*NetworkInterface) Descriptor
deprecated
func (*NetworkInterface) Descriptor() ([]byte, []int)
Deprecated: Use NetworkInterface.ProtoReflect.Descriptor instead.
func (*NetworkInterface) GetId ¶
func (x *NetworkInterface) GetId() string
func (*NetworkInterface) GetIp ¶
func (x *NetworkInterface) GetIp() string
func (*NetworkInterface) GetMac ¶
func (x *NetworkInterface) GetMac() string
func (*NetworkInterface) GetTagged ¶
func (x *NetworkInterface) GetTagged() bool
func (*NetworkInterface) GetVlan ¶
func (x *NetworkInterface) GetVlan() []int32
func (*NetworkInterface) GetWan ¶
func (x *NetworkInterface) GetWan() bool
func (*NetworkInterface) ProtoMessage ¶
func (*NetworkInterface) ProtoMessage()
func (*NetworkInterface) ProtoReflect ¶
func (x *NetworkInterface) ProtoReflect() protoreflect.Message
func (*NetworkInterface) Reset ¶
func (x *NetworkInterface) Reset()
func (*NetworkInterface) String ¶
func (x *NetworkInterface) String() string
type UnimplementedLibvirtServer ¶
type UnimplementedLibvirtServer struct { }
UnimplementedLibvirtServer must be embedded to have forward compatible implementations.
func (UnimplementedLibvirtServer) EventStream ¶
func (UnimplementedLibvirtServer) EventStream(Libvirt_EventStreamServer) error
func (UnimplementedLibvirtServer) InstanceStateChange ¶
func (UnimplementedLibvirtServer) VolumeStateChange ¶
type UnsafeLibvirtServer ¶
type UnsafeLibvirtServer interface {
// contains filtered or unexported methods
}
UnsafeLibvirtServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LibvirtServer will result in compilation errors.
type Volume ¶
type Volume struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` SourceImage string `protobuf:"bytes,3,opt,name=source_image,json=sourceImage,proto3" json:"source_image,omitempty"` State Volume_State `protobuf:"varint,4,opt,name=state,proto3,enum=protos.Volume_State" json:"state,omitempty"` // contains filtered or unexported fields }
func (*Volume) Descriptor
deprecated
func (*Volume) GetSourceImage ¶
func (*Volume) GetState ¶
func (x *Volume) GetState() Volume_State
func (*Volume) ProtoMessage ¶
func (*Volume) ProtoMessage()
func (*Volume) ProtoReflect ¶
func (x *Volume) ProtoReflect() protoreflect.Message
type Volume_State ¶
type Volume_State int32
const ( Volume_PENDING Volume_State = 0 Volume_CREATING Volume_State = 1 Volume_UNATTACHED Volume_State = 2 Volume_ATTACHED Volume_State = 3 Volume_DELETED Volume_State = 4 Volume_ERROR Volume_State = 5 )
func (Volume_State) Descriptor ¶
func (Volume_State) Descriptor() protoreflect.EnumDescriptor
func (Volume_State) Enum ¶
func (x Volume_State) Enum() *Volume_State
func (Volume_State) EnumDescriptor
deprecated
func (Volume_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Volume_State.Descriptor instead.
func (Volume_State) Number ¶
func (x Volume_State) Number() protoreflect.EnumNumber
func (Volume_State) String ¶
func (x Volume_State) String() string
func (Volume_State) Type ¶
func (Volume_State) Type() protoreflect.EnumType