Documentation
¶
Index ¶
- Constants
- Variables
- type MetadataProvider
- type Option
- func AppendToMsg(appendToMsg bool) 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 AppendToMsg ¶ added in v0.8.2
the identity metadata is usually transmitted to the cloud via the convey header on connect. optionally append the identity metadata to every wrp message. (temporary workaround for home cloud issues)
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.