powerapi

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: BSD-3-Clause Imports: 18 Imported by: 0

README

vboxmanage module

This module can control "power" state of virtualbox VMs via the vboxmanage-rest-api (https://www.npmjs.com/package/vboxmanage-rest-api).

Documentation

Index

Constants

View Source
const (
	PlatformString string = "powerapi"
)

Variables

View Source
var (
	ErrInvalidLengthPowerapiConfig        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPowerapiConfig          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPowerapiConfig = 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"`
	NameUrl              string             `protobuf:"bytes,3,opt,name=name_url,json=nameUrl,proto3" json:"name_url,omitempty"`
	ServerUrl            string             `protobuf:"bytes,4,opt,name=server_url,json=serverUrl,proto3" json:"server_url,omitempty"`
	UriUrl               string             `protobuf:"bytes,5,opt,name=uri_url,json=uriUrl,proto3" json:"uri_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*Config) Descriptor

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

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) GetUriUrl

func (m *Config) GetUriUrl() string

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 PowerAPI

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

PowerAPI provides a power on/off interface

func (*PowerAPI) ConfigURL

func (*PowerAPI) ConfigURL() string

ConfigURL gives the any resolver URL for the config

func (*PowerAPI) Entry

func (pp *PowerAPI) Entry()

Entry is the module's executable entrypoint

func (*PowerAPI) Init

func (pp *PowerAPI) Init(api types.ModuleAPIClient)

Init is used to intialize an executable module prior to entrypoint

func (*PowerAPI) Name

func (*PowerAPI) Name() string

Name returns the FQDN of the module

func (*PowerAPI) NewConfig

func (*PowerAPI) NewConfig() proto.Message

NewConfig returns a fully initialized default config

func (*PowerAPI) SetDiscoveryChan

func (pp *PowerAPI) SetDiscoveryChan(c chan<- types.Event)

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

func (*PowerAPI) SetMutationChan

func (pp *PowerAPI) SetMutationChan(c <-chan types.Event)

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

func (*PowerAPI) Stop

func (pp *PowerAPI) Stop()

Stop should perform a graceful exit

func (*PowerAPI) UpdateConfig

func (pp *PowerAPI) UpdateConfig(cfg proto.Message) (e error)

UpdateConfig updates the running config

type Server

type Server struct {
	Server               string   `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	Port                 int32    `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Https                bool     `protobuf:"varint,3,opt,name=https,proto3" json:"https,omitempty"`
	ApiBase              string   `protobuf:"bytes,4,opt,name=api_base,json=apiBase,proto3" json:"api_base,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Server) Descriptor

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

func (*Server) GetApiBase

func (m *Server) GetApiBase() string

func (*Server) GetHttps

func (m *Server) GetHttps() bool

func (*Server) GetPort

func (m *Server) GetPort() int32

func (*Server) GetServer

func (m *Server) GetServer() string

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