Documentation
¶
Index ¶
- Constants
- Variables
- type MetadataProvider
- type Option
- func BootRetryWaitOpt(bootTimeRetryDelay time.Duration) Option
- func BootTimeOpt(bootTime string) Option
- func FieldsOpt(fields []string) Option
- func FirmwareOpt(firmware string) Option
- func HardwareModelOpt(hardwareModel string) Option
- func InterfaceUsedOpt(interfaceUsed string) Option
- func LastRebootReasonOpt(lastRebootReason string) Option
- func ManufacturerOpt(manufacturer string) Option
- func NetworkServiceOpt(networkService net.NetworkServicer) Option
- func SerialNumberOpt(serialNumber string) Option
- func XmidtProtocolOpt(protocol string) Option
Constants ¶
View Source
const ( Firmware = "fw-name" Hardware = "hw-model" Manufacturer = "hw-manufacturer" SerialNumber = "hw-serial-number" LastRebootReason = "hw-last-reboot-reason" Protocol = "webpa-protocol" BootTime = "boot-time" BootTimeRetryDelay = "boot-time-retry-wait" InterfaceUsed string = "webpa-interface-used" InterfacesAvailable = "interfaces-available" )
View Source
const (
HeaderName = "X-Webpa-Convey"
)
Variables ¶
View Source
var (
ErrInvalidInput = errors.New("invalid input")
)
Functions ¶
This section is empty.
Types ¶
type MetadataProvider ¶
type MetadataProvider struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) (*MetadataProvider, error)
func (*MetadataProvider) DecorateMsg ¶
func (c *MetadataProvider) DecorateMsg(msg *wrp.Message) error
func (*MetadataProvider) GetMetadata ¶
func (c *MetadataProvider) GetMetadata() map[string]interface{}
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func BootRetryWaitOpt ¶
func BootTimeOpt ¶
func FirmwareOpt ¶
func HardwareModelOpt ¶
func InterfaceUsedOpt ¶
if we want websocket to populate this value, pass in InterfaceUsedProvider instead
func LastRebootReasonOpt ¶
func ManufacturerOpt ¶
func NetworkServiceOpt ¶
func NetworkServiceOpt(networkService net.NetworkServicer) Option
func SerialNumberOpt ¶
func XmidtProtocolOpt ¶
Click to show internal directories.
Click to hide internal directories.