resource

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	State_name = map[int32]string{
		0: "Normal",
		1: "Warning",
		2: "Alarm",
	}
	State_value = map[string]int32{
		"Normal":  0,
		"Warning": 1,
		"Alarm":   2,
	}
)

Enum value maps for State.

View Source
var (
	Type_name = map[int32]string{
		0: "Memory",
		1: "CPU",
	}
	Type_value = map[string]int32{
		"Memory": 0,
		"CPU":    1,
	}
)

Enum value maps for Type.

View Source
var File_github_com_Compogo_resource_resource_resource_proto protoreflect.FileDescriptor
View Source
var File_github_com_Compogo_resource_resource_state_proto protoreflect.FileDescriptor
View Source
var File_github_com_Compogo_resource_resource_type_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Resource

type Resource struct {
	Type  Type   `protobuf:"varint,1,opt,name=Type,proto3,enum=compogo.resource.resource.Type" json:"Type,omitempty"`
	Limit uint64 `protobuf:"varint,2,opt,name=Limit,proto3" json:"Limit,omitempty"`
	Usage uint64 `protobuf:"varint,3,opt,name=Usage,proto3" json:"Usage,omitempty"`
	// contains filtered or unexported fields
}

func (*Resource) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetLimit

func (x *Resource) GetLimit() uint64

func (*Resource) GetType

func (x *Resource) GetType() Type

func (*Resource) GetUsage

func (x *Resource) GetUsage() uint64

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

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

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type State

type State int32
const (
	State_Normal  State = 0
	State_Warning State = 1
	State_Alarm   State = 2
)

func (State) Descriptor

func (State) Descriptor() protoreflect.EnumDescriptor

func (State) Enum

func (x State) Enum() *State

func (State) EnumDescriptor deprecated

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

Deprecated: Use State.Descriptor instead.

func (State) Number

func (x State) Number() protoreflect.EnumNumber

func (State) String

func (x State) String() string

func (State) Type

func (State) Type() protoreflect.EnumType

type Type

type Type int32
const (
	Type_Memory Type = 0
	Type_CPU    Type = 1
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

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

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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