Documentation ¶
Index ¶
- Variables
- func RegisterRhyzomeServer(s grpc.ServiceRegistrar, srv RhyzomeServer)
- type Empty
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetBootstrapComplete() bool
- 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) 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) GetName() string
- 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 NetworkInterface
- func (*NetworkInterface) Descriptor() ([]byte, []int)deprecated
- func (x *NetworkInterface) GetBootstrap() bool
- 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 RhyzomeClient
- type RhyzomeServer
- type Rhyzome_EventStreamClient
- type Rhyzome_EventStreamServer
- type UnimplementedRhyzomeServer
- func (UnimplementedRhyzomeServer) EventStream(Rhyzome_EventStreamServer) error
- func (UnimplementedRhyzomeServer) Import(context.Context, *Event) (*Empty, error)
- func (UnimplementedRhyzomeServer) InstanceStateChange(context.Context, *Instance) (*Empty, error)
- func (UnimplementedRhyzomeServer) VolumeStateChange(context.Context, *Volume) (*Empty, error)
- type UnsafeRhyzomeServer
- 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) GetSourceImageQcow() 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", 1: "BOOTSTRAP_NETWORK", 2: "SYSTEM_NETWORK", } Instance_SpecialCase_value = map[string]int32{ "ROUTER": 0, "BOOTSTRAP_NETWORK": 1, "SYSTEM_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_rhyzome_proto protoreflect.FileDescriptor
var Rhyzome_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protos.Rhyzome", HandlerType: (*RhyzomeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "InstanceStateChange", Handler: _Rhyzome_InstanceStateChange_Handler, }, { MethodName: "VolumeStateChange", Handler: _Rhyzome_VolumeStateChange_Handler, }, { MethodName: "Import", Handler: _Rhyzome_Import_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "EventStream", Handler: _Rhyzome_EventStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "protos/rhyzome.proto", }
Rhyzome_ServiceDesc is the grpc.ServiceDesc for Rhyzome service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRhyzomeServer ¶
func RegisterRhyzomeServer(s grpc.ServiceRegistrar, srv RhyzomeServer)
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 { // string event_id = 1; Instance *Instance `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"` Volume *Volume `protobuf:"bytes,3,opt,name=volume,proto3" json:"volume,omitempty"` BootstrapComplete bool `protobuf:"varint,4,opt,name=bootstrap_complete,json=bootstrapComplete,proto3" json:"bootstrap_complete,omitempty"` // when set to true, indicates the bootstrap process is complete and bootstrap-related things should be cleaned up // contains filtered or unexported fields }
Event instances are streamed from the central control server to a rhyzome node
func (*Event) Descriptor
deprecated
func (*Event) GetBootstrapComplete ¶
func (*Event) GetInstance ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventUpdate ¶
type EventUpdate struct { // string event_id = 1; 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 rhyzome node to the central control server
func (*EventUpdate) Descriptor
deprecated
func (*EventUpdate) Descriptor() ([]byte, []int)
Deprecated: Use EventUpdate.ProtoReflect.Descriptor instead.
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"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` 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_BOOTSTRAP_NETWORK Instance_SpecialCase = 1 Instance_SYSTEM_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 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"` Bootstrap bool `protobuf:"varint,7,opt,name=bootstrap,proto3" json:"bootstrap,omitempty"` // contains filtered or unexported fields }
func (*NetworkInterface) Descriptor
deprecated
func (*NetworkInterface) Descriptor() ([]byte, []int)
Deprecated: Use NetworkInterface.ProtoReflect.Descriptor instead.
func (*NetworkInterface) GetBootstrap ¶
func (x *NetworkInterface) GetBootstrap() bool
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 RhyzomeClient ¶
type RhyzomeClient interface { EventStream(ctx context.Context, opts ...grpc.CallOption) (Rhyzome_EventStreamClient, error) InstanceStateChange(ctx context.Context, in *Instance, opts ...grpc.CallOption) (*Empty, error) VolumeStateChange(ctx context.Context, in *Volume, opts ...grpc.CallOption) (*Empty, error) Import(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Empty, error) }
RhyzomeClient is the client API for Rhyzome 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 NewRhyzomeClient ¶
func NewRhyzomeClient(cc grpc.ClientConnInterface) RhyzomeClient
type RhyzomeServer ¶
type RhyzomeServer interface { EventStream(Rhyzome_EventStreamServer) error InstanceStateChange(context.Context, *Instance) (*Empty, error) VolumeStateChange(context.Context, *Volume) (*Empty, error) Import(context.Context, *Event) (*Empty, error) // contains filtered or unexported methods }
RhyzomeServer is the server API for Rhyzome service. All implementations must embed UnimplementedRhyzomeServer for forward compatibility
type Rhyzome_EventStreamClient ¶
type Rhyzome_EventStreamClient interface { Send(*EventUpdate) error Recv() (*Event, error) grpc.ClientStream }
type Rhyzome_EventStreamServer ¶
type Rhyzome_EventStreamServer interface { Send(*Event) error Recv() (*EventUpdate, error) grpc.ServerStream }
type UnimplementedRhyzomeServer ¶
type UnimplementedRhyzomeServer struct { }
UnimplementedRhyzomeServer must be embedded to have forward compatible implementations.
func (UnimplementedRhyzomeServer) EventStream ¶
func (UnimplementedRhyzomeServer) EventStream(Rhyzome_EventStreamServer) error
func (UnimplementedRhyzomeServer) InstanceStateChange ¶
func (UnimplementedRhyzomeServer) VolumeStateChange ¶
type UnsafeRhyzomeServer ¶
type UnsafeRhyzomeServer interface {
// contains filtered or unexported methods
}
UnsafeRhyzomeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RhyzomeServer 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"` SourceImageQcow string `protobuf:"bytes,4,opt,name=source_image_qcow,json=sourceImageQcow,proto3" json:"source_image_qcow,omitempty"` State Volume_State `protobuf:"varint,5,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) GetSourceImageQcow ¶
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