types

package
v0.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthResource        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowResource          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Resource added in v0.6.0

type Resource struct {
	Unit  Unit
	Count uint32
}

Resource stores Unit details and Count value

type ResourceGroup

type ResourceGroup interface {
	GetName() string
	GetResources() []Resource
}

ResourceGroup is the interface that wraps GetName and GetResources methods

type Unit added in v0.6.0

type Unit struct {
	CPU     uint32 `protobuf:"varint,1,opt,name=cpu,proto3" json:"cpu" yaml:"cpu"`
	Memory  uint64 `protobuf:"varint,2,opt,name=memory,proto3" json:"memory" yaml:"memory"`
	Storage uint64 `protobuf:"varint,3,opt,name=storage,proto3" json:"storage" yaml:"storage"`
}

Unit stores cpu, memory and storage metrics

func (*Unit) Descriptor

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

func (*Unit) Equal

func (this *Unit) Equal(that interface{}) bool

func (Unit) Equals added in v0.6.0

func (u Unit) Equals(other Unit) bool

Equals compare given unit with receiver unit

func (*Unit) GetCPU

func (m *Unit) GetCPU() uint32

func (*Unit) GetMemory

func (m *Unit) GetMemory() uint64

func (*Unit) GetStorage

func (m *Unit) GetStorage() uint64

func (*Unit) Marshal

func (m *Unit) Marshal() (dAtA []byte, err error)

func (*Unit) MarshalTo

func (m *Unit) MarshalTo(dAtA []byte) (int, error)

func (*Unit) MarshalToSizedBuffer

func (m *Unit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Unit) ProtoMessage

func (*Unit) ProtoMessage()

func (*Unit) Reset

func (m *Unit) Reset()

func (*Unit) Size

func (m *Unit) Size() (n int)

func (*Unit) String added in v0.9.1

func (m *Unit) String() string

func (*Unit) Unmarshal

func (m *Unit) Unmarshal(dAtA []byte) error

func (*Unit) XXX_DiscardUnknown

func (m *Unit) XXX_DiscardUnknown()

func (*Unit) XXX_Marshal

func (m *Unit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Unit) XXX_Merge

func (m *Unit) XXX_Merge(src proto.Message)

func (*Unit) XXX_Size

func (m *Unit) XXX_Size() int

func (*Unit) XXX_Unmarshal

func (m *Unit) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳