hostthermaldiscovery

package
v0.0.0-...-03891ea Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HostThermalStateURL points to Thermal extension
	HostThermalStateURL = "type.googleapis.com/HostThermal.Temp/State"
	// ModuleStateURL refers to module state
	ModuleStateURL = "/Services/hostthermaldiscovery/State"
)

Variables

View Source
var (
	ErrInvalidLengthHostthermaldiscovery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHostthermaldiscovery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHostthermaldiscovery = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type CPUTempObj

type CPUTempObj struct {
	TimeStamp   time.Time
	HostAddress string
	CPUTemp     int32
}

CPUTempObj is strututure for node CPU temperature

type Config

type Config struct {
	PollingInterval      string   `protobuf:"bytes,1,opt,name=polling_interval,json=pollingInterval,proto3" json:"polling_interval,omitempty"`
	TempSensorPath       string   `protobuf:"bytes,2,opt,name=temp_sensor_path,json=tempSensorPath,proto3" json:"temp_sensor_path,omitempty"`
	FreqSensorUrl        string   `protobuf:"bytes,3,opt,name=freq_sensor_url,json=freqSensorUrl,proto3" json:"freq_sensor_url,omitempty"`
	LogThermalData       bool     `protobuf:"varint,4,opt,name=log_thermal_data,json=logThermalData,proto3" json:"log_thermal_data,omitempty"`
	LogHere              string   `protobuf:"bytes,5,opt,name=log_here,json=logHere,proto3" json:"log_here,omitempty"`
	LowerNormal          int32    `protobuf:"varint,6,opt,name=lower_normal,json=lowerNormal,proto3" json:"lower_normal,omitempty"`
	UpperNormal          int32    `protobuf:"varint,7,opt,name=upper_normal,json=upperNormal,proto3" json:"upper_normal,omitempty"`
	LowerHigh            int32    `protobuf:"varint,8,opt,name=lower_high,json=lowerHigh,proto3" json:"lower_high,omitempty"`
	UpperHigh            int32    `protobuf:"varint,9,opt,name=upper_high,json=upperHigh,proto3" json:"upper_high,omitempty"`
	LowerCritical        int32    `protobuf:"varint,10,opt,name=lower_critical,json=lowerCritical,proto3" json:"lower_critical,omitempty"`
	UpperCritical        int32    `protobuf:"varint,11,opt,name=upper_critical,json=upperCritical,proto3" json:"upper_critical,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Config) Descriptor

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

func (*Config) GetFreqSensorUrl

func (m *Config) GetFreqSensorUrl() string

func (*Config) GetLogHere

func (m *Config) GetLogHere() string

func (*Config) GetLogThermalData

func (m *Config) GetLogThermalData() bool

func (*Config) GetLowerCritical

func (m *Config) GetLowerCritical() int32

func (*Config) GetLowerHigh

func (m *Config) GetLowerHigh() int32

func (*Config) GetLowerNormal

func (m *Config) GetLowerNormal() int32

func (*Config) GetPollingInterval

func (m *Config) GetPollingInterval() string

func (*Config) GetTempSensorPath

func (m *Config) GetTempSensorPath() string

func (*Config) GetUpperCritical

func (m *Config) GetUpperCritical() int32

func (*Config) GetUpperHigh

func (m *Config) GetUpperHigh() int32

func (*Config) GetUpperNormal

func (m *Config) GetUpperNormal() int32

func (*Config) Marshal

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

func (*Config) MarshalTo

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

func (*Config) MarshalToSizedBuffer

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

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) Size

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

func (*Config) String

func (m *Config) String() string

func (*Config) Unmarshal

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

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

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

func (*Config) XXX_Merge

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

func (*Config) XXX_MessageName

func (*Config) XXX_MessageName() string

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

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

type HostDisc

type HostDisc struct {
	// contains filtered or unexported fields
}

HostDisc provides hostdiscovery module capabilities

func (*HostDisc) CapturingStatData

func (hostDisc *HostDisc) CapturingStatData()

CapturingStatData logs thermal information

func (*HostDisc) ConfigURL

func (*HostDisc) ConfigURL() string

ConfigURL gives the any resolver URL for the config

func (*HostDisc) DiscFreqScaler

func (hostDisc *HostDisc) DiscFreqScaler()

DiscFreqScaler cpu frequency scaler

func (*HostDisc) Entry

func (hostDisc *HostDisc) Entry()

Entry is the module's executable entrypoint

func (*HostDisc) GetCPUTemp

func (hostDisc *HostDisc) GetCPUTemp() CPUTempObj

GetCPUTemp returns CPU temperature

func (*HostDisc) GetNodeIPAddress

func (hostDisc *HostDisc) GetNodeIPAddress() string

GetNodeIPAddress returns non local loop IP address

func (*HostDisc) Init

func (hostDisc *HostDisc) Init(api types.ModuleAPIClient)

Init is used to intialize an executable module prior to entrypoint

func (*HostDisc) Name

func (*HostDisc) Name() string

Name returns the FQDN of the module

func (*HostDisc) NewConfig

func (*HostDisc) NewConfig() proto.Message

NewConfig returns a fully initialized default config

func (*HostDisc) ReadCPUTemp

func (hostDisc *HostDisc) ReadCPUTemp() int32

ReadCPUTemp function reads the CPU thermal sensor

func (*HostDisc) ReadFreqScaler

func (hostDisc *HostDisc) ReadFreqScaler() string

ReadFreqScaler cpu frequency scaler

func (*HostDisc) SetDiscoveryChan

func (hostDisc *HostDisc) SetDiscoveryChan(c chan<- types.Event)

SetDiscoveryChan sets the current discovery channel this is generally done by the API

func (*HostDisc) Stop

func (hostDisc *HostDisc) Stop()

Stop should perform a graceful exit

func (*HostDisc) UpdateConfig

func (hostDisc *HostDisc) UpdateConfig(cfg proto.Message) (e error)

UpdateConfig updates the running config

Jump to

Keyboard shortcuts

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