diff --git a/21070d370331239fb90f6c70295d6595591f73d2 b/21070d370331239fb90f6c70295d6595591f73d2 index bd725d3..4e36a84 100644 --- a/21070d370331239fb90f6c70295d6595591f73d2 +++ b/21070d370331239fb90f6c70295d6595591f73d2 @@ -2811,3 +2811,338 @@ func (v *Hypervisors) Unmarshal(data []byte) error { } // `autogen:hypervisor.pb.go` + +// Code modified by go.wit.com/apps/autogenpb DO NOT EDIT. +// +// user defined Mutex locks were auto added +// +// autogenpb version & build time: v0.0.50 2025-02-07_10:22:09_UTC +// autogenpb auto generates Sort(), Unique() and Marshal() functions +// go install go.wit.com/apps/autogenpb@latest + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2-devel +// protoc v3.21.12 +// source: hypervisor.proto + +package virtbuf // autogenpb changed the package name + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// think about this more +type HypervisorArch int32 + +const ( + HypervisorArch_RISCV64 HypervisorArch = 0 + HypervisorArch_X86_64 HypervisorArch = 1 + HypervisorArch_ARM64 HypervisorArch = 2 +) + +// Enum value maps for HypervisorArch. +var ( + HypervisorArch_name = map[int32]string{ + 0: "RISCV64", + 1: "X86_64", + 2: "ARM64", + } + HypervisorArch_value = map[string]int32{ + "RISCV64": 0, + "X86_64": 1, + "ARM64": 2, + } +) + +func (x HypervisorArch) Enum() *HypervisorArch { + p := new(HypervisorArch) + *p = x + return p +} + +func (x HypervisorArch) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HypervisorArch) Descriptor() protoreflect.EnumDescriptor { + return file_hypervisor_proto_enumTypes[0].Descriptor() +} + +func (HypervisorArch) Type() protoreflect.EnumType { + return &file_hypervisor_proto_enumTypes[0] +} + +func (x HypervisorArch) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HypervisorArch.Descriptor instead. +func (HypervisorArch) EnumDescriptor() ([]byte, []int) { + return file_hypervisor_proto_rawDescGZIP(), []int{0} +} + +type Hypervisors struct { + sync.RWMutex // auto-added by go.wit.com/apps/autogenpb + + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:6e3aa8b9-cf98-40f6-af58-3c6ad1edf4d4` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.1` + Hypervisors []*Hypervisor `protobuf:"bytes,3,rep,name=hypervisors,proto3" json:"hypervisors,omitempty"` +} + +func (x *Hypervisors) Reset() { + *x = Hypervisors{} + mi := &file_hypervisor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Hypervisors) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hypervisors) ProtoMessage() {} + +func (x *Hypervisors) ProtoReflect() protoreflect.Message { + mi := &file_hypervisor_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hypervisors.ProtoReflect.Descriptor instead. +func (*Hypervisors) Descriptor() ([]byte, []int) { + return file_hypervisor_proto_rawDescGZIP(), []int{0} +} + +func (x *Hypervisors) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *Hypervisors) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Hypervisors) GetHypervisors() []*Hypervisor { + if x != nil { + return x.Hypervisors + } + return nil +} + +type Hypervisor struct { + sync.RWMutex // auto-added by go.wit.com/apps/autogenpb + + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:unique` + Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` // `autogenpb:unique` + Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` // is allowed to start new droplets + Cpus int64 `protobuf:"varint,4,opt,name=cpus,proto3" json:"cpus,omitempty"` + Memory int64 `protobuf:"varint,5,opt,name=memory,proto3" json:"memory,omitempty"` // in bytes + Comment string `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"` + Autoscan bool `protobuf:"varint,7,opt,name=autoscan,proto3" json:"autoscan,omitempty"` // to scan or not to scan by virtigo + Arch HypervisorArch `protobuf:"varint,8,opt,name=arch,proto3,enum=virtbuf.HypervisorArch" json:"arch,omitempty"` +} + +func (x *Hypervisor) Reset() { + *x = Hypervisor{} + mi := &file_hypervisor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Hypervisor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hypervisor) ProtoMessage() {} + +func (x *Hypervisor) ProtoReflect() protoreflect.Message { + mi := &file_hypervisor_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hypervisor.ProtoReflect.Descriptor instead. +func (*Hypervisor) Descriptor() ([]byte, []int) { + return file_hypervisor_proto_rawDescGZIP(), []int{1} +} + +func (x *Hypervisor) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *Hypervisor) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *Hypervisor) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *Hypervisor) GetCpus() int64 { + if x != nil { + return x.Cpus + } + return 0 +} + +func (x *Hypervisor) GetMemory() int64 { + if x != nil { + return x.Memory + } + return 0 +} + +func (x *Hypervisor) GetComment() string { + if x != nil { + return x.Comment + } + return "" +} + +func (x *Hypervisor) GetAutoscan() bool { + if x != nil { + return x.Autoscan + } + return false +} + +func (x *Hypervisor) GetArch() HypervisorArch { + if x != nil { + return x.Arch + } + return HypervisorArch_RISCV64 +} + +var File_hypervisor_proto protoreflect.FileDescriptor + +var file_hypervisor_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x68, 0x79, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x07, 0x76, 0x69, 0x72, 0x74, 0x62, 0x75, 0x66, 0x22, 0x72, 0x0a, 0x0b, 0x48, + 0x79, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0b, 0x68, 0x79, 0x70, 0x65, + 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x76, 0x69, 0x72, 0x74, 0x62, 0x75, 0x66, 0x2e, 0x48, 0x79, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, + 0x6f, 0x72, 0x52, 0x0b, 0x68, 0x79, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x22, + 0xe3, 0x01, 0x0a, 0x0a, 0x48, 0x79, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x70, 0x75, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x70, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x72, 0x63, 0x68, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x69, 0x72, 0x74, 0x62, 0x75, 0x66, + 0x2e, 0x48, 0x79, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x41, 0x72, 0x63, 0x68, 0x52, + 0x04, 0x61, 0x72, 0x63, 0x68, 0x2a, 0x34, 0x0a, 0x0e, 0x48, 0x79, 0x70, 0x65, 0x72, 0x76, 0x69, + 0x73, 0x6f, 0x72, 0x41, 0x72, 0x63, 0x68, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x49, 0x53, 0x43, 0x56, + 0x36, 0x34, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x58, 0x38, 0x36, 0x5f, 0x36, 0x34, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x4d, 0x36, 0x34, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_hypervisor_proto_rawDescOnce sync.Once + file_hypervisor_proto_rawDescData = file_hypervisor_proto_rawDesc +) + +func file_hypervisor_proto_rawDescGZIP() []byte { + file_hypervisor_proto_rawDescOnce.Do(func() { + file_hypervisor_proto_rawDescData = protoimpl.X.CompressGZIP(file_hypervisor_proto_rawDescData) + }) + return file_hypervisor_proto_rawDescData +} + +var file_hypervisor_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_hypervisor_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_hypervisor_proto_goTypes = []any{ + (HypervisorArch)(0), // 0: virtbuf.HypervisorArch + (*Hypervisors)(nil), // 1: virtbuf.Hypervisors + (*Hypervisor)(nil), // 2: virtbuf.Hypervisor +} +var file_hypervisor_proto_depIdxs = []int32{ + 2, // 0: virtbuf.Hypervisors.hypervisors:type_name -> virtbuf.Hypervisor + 0, // 1: virtbuf.Hypervisor.arch:type_name -> virtbuf.HypervisorArch + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_hypervisor_proto_init() } +func file_hypervisor_proto_init() { + if File_hypervisor_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_hypervisor_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_hypervisor_proto_goTypes, + DependencyIndexes: file_hypervisor_proto_depIdxs, + EnumInfos: file_hypervisor_proto_enumTypes, + MessageInfos: file_hypervisor_proto_msgTypes, + }.Build() + File_hypervisor_proto = out.File + file_hypervisor_proto_rawDesc = nil + file_hypervisor_proto_goTypes = nil + file_hypervisor_proto_depIdxs = nil +}