Documentation ¶
Index ¶
- type GetBIOSSerialNumberRequest
- type GetBIOSSerialNumberResponse
- type GetServiceRequest
- type GetServiceResponse
- type Interface
- type ServiceStatus
- type StartServiceRequest
- type StartServiceResponse
- type Startype
- type StopServiceRequest
- type StopServiceResponse
- type System
- func (s *System) GetBIOSSerialNumber(context context.Context, request *GetBIOSSerialNumberRequest) (*GetBIOSSerialNumberResponse, error)
- func (s *System) GetService(context context.Context, request *GetServiceRequest) (*GetServiceResponse, error)
- func (s *System) StartService(context context.Context, request *StartServiceRequest) (*StartServiceResponse, error)
- func (s *System) StopService(context context.Context, request *StopServiceRequest) (*StopServiceResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetBIOSSerialNumberRequest ¶
type GetBIOSSerialNumberRequest struct { }
type GetBIOSSerialNumberResponse ¶
type GetBIOSSerialNumberResponse struct { // Serial number SerialNumber string }
type GetServiceRequest ¶
type GetServiceRequest struct { // Service name (as listed in System\CCS\Services keys) Name string }
type GetServiceResponse ¶
type GetServiceResponse struct { // Service display name DisplayName string // Service start type // Used to control whether a service will start on boot, and if so on which // boot phase StartType Startype // Service status, e.g. stopped, running, paused Status ServiceStatus }
type Interface ¶
type Interface interface { // GetBIOSSerialNumber returns the device's serial number GetBIOSSerialNumber(context.Context, *GetBIOSSerialNumberRequest) (*GetBIOSSerialNumberResponse, error) // GetService queries a Windows service state GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error) // StartService starts a Windows service // NOTE: This method affects global node state and should only be used // with consideration to other CSI drivers that run concurrently. StartService(context.Context, *StartServiceRequest) (*StartServiceResponse, error) // StopService stops a Windows service // NOTE: This method affects global node state and should only be used // with consideration to other CSI drivers that run concurrently. StopService(context.Context, *StopServiceRequest) (*StopServiceResponse, error) }
type ServiceStatus ¶
type ServiceStatus uint32
const ( SERVICE_STATUS_UNKNOWN ServiceStatus = iota SERVICE_STATUS_STOPPED SERVICE_STATUS_START_PENDING SERVICE_STATUS_STOP_PENDING SERVICE_STATUS_RUNNING SERVICE_STATUS_CONTINUE_PENDING SERVICE_STATUS_PAUSE_PENDING SERVICE_STATUS_PAUSED )
https://docs.microsoft.com/en-us/windows/win32/api/winsvc/ns-winsvc-service_status#members
type StartServiceRequest ¶
type StartServiceRequest struct { // Service name (as listed in System\CCS\Services keys) Name string }
type StartServiceResponse ¶
type StartServiceResponse struct { }
type Startype ¶
type Startype uint32
const ( START_TYPE_BOOT Startype = iota START_TYPE_SYSTEM START_TYPE_AUTOMATIC START_TYPE_MANUAL START_TYPE_DISABLED )
https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-changeserviceconfiga
type StopServiceRequest ¶
type StopServiceResponse ¶
type StopServiceResponse struct { }
type System ¶
type System struct {
// contains filtered or unexported fields
}
func (*System) GetBIOSSerialNumber ¶
func (s *System) GetBIOSSerialNumber(context context.Context, request *GetBIOSSerialNumberRequest) (*GetBIOSSerialNumberResponse, error)
func (*System) GetService ¶
func (s *System) GetService(context context.Context, request *GetServiceRequest) (*GetServiceResponse, error)
func (*System) StartService ¶
func (s *System) StartService(context context.Context, request *StartServiceRequest) (*StartServiceResponse, error)
func (*System) StopService ¶
func (s *System) StopService(context context.Context, request *StopServiceRequest) (*StopServiceResponse, error)
Click to show internal directories.
Click to hide internal directories.