powermancontrol

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 (
	PMCBase        string = "/powermancontrol"
	PMCSet         string = PMCBase + "/setstate"
	PMCStat        string = PMCBase + "/nodestatus"
	PlatformString string = "powerman"
)

Variables

View Source
var (
	ErrInvalidLengthPowermancontrol        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPowermancontrol          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPowermancontrol = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Servers              map[string]*Server `` /* 155-byte string literal not displayed */
	PollingInterval      string             `protobuf:"bytes,2,opt,name=polling_interval,json=pollingInterval,proto3" json:"polling_interval,omitempty"`
	FireInterval         string             `protobuf:"bytes,3,opt,name=fire_interval,json=fireInterval,proto3" json:"fire_interval,omitempty"`
	NameUrl              string             `protobuf:"bytes,4,opt,name=name_url,json=nameUrl,proto3" json:"name_url,omitempty"`
	ServerUrl            string             `protobuf:"bytes,5,opt,name=server_url,json=serverUrl,proto3" json:"server_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*Config) Descriptor

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

func (*Config) GetFireInterval

func (m *Config) GetFireInterval() string

func (*Config) GetNameUrl

func (m *Config) GetNameUrl() string

func (*Config) GetPollingInterval

func (m *Config) GetPollingInterval() string

func (*Config) GetServerUrl

func (m *Config) GetServerUrl() string

func (*Config) GetServers

func (m *Config) GetServers() map[string]*Server

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 PMC

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

PMC provides a power on/off interface to powerman

func (*PMC) ConfigURL

func (*PMC) ConfigURL() string

ConfigURL gives the any resolver URL for the config

func (*PMC) Entry

func (p *PMC) Entry()

Entry is the module's executable entrypoint

func (*PMC) Init

func (p *PMC) Init(api types.ModuleAPIClient)

Init is used to intialize an executable module prior to entrypoint

func (*PMC) Name

func (p *PMC) Name() string

Name returns the FQDN of the module

func (*PMC) NewConfig

func (p *PMC) NewConfig() proto.Message

NewConfig returns a fully initialized default config

func (*PMC) SetDiscoveryChan

func (p *PMC) SetDiscoveryChan(c chan<- types.Event)

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

func (*PMC) SetMutationChan

func (p *PMC) SetMutationChan(c <-chan types.Event)

SetMutationChan sets the current mutation channel this is generally done by the API

func (*PMC) Stop

func (p *PMC) Stop()

Stop should perform a graceful exit

func (*PMC) UpdateConfig

func (p *PMC) UpdateConfig(cfg proto.Message) (e error)

UpdateConfig updates the running config

type Server

type Server struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Ip                   string   `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	Port                 int32    `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Server) Descriptor

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

func (*Server) GetIp

func (m *Server) GetIp() string

func (*Server) GetName

func (m *Server) GetName() string

func (*Server) GetPort

func (m *Server) GetPort() int32

func (*Server) Marshal

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

func (*Server) MarshalTo

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

func (*Server) MarshalToSizedBuffer

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

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) Reset

func (m *Server) Reset()

func (*Server) Size

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

func (*Server) String

func (m *Server) String() string

func (*Server) Unmarshal

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

func (*Server) XXX_DiscardUnknown

func (m *Server) XXX_DiscardUnknown()

func (*Server) XXX_Marshal

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

func (*Server) XXX_Merge

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

func (*Server) XXX_MessageName

func (*Server) XXX_MessageName() string

func (*Server) XXX_Size

func (m *Server) XXX_Size() int

func (*Server) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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