// checkBinarySizes checks and reports the binary sizes for the containerd compiled binaries to prometheus
778506
func checkBinarySizes() {
	for _, name := range binaries {
		fi, err := os.Stat(filepath.Join("/usr/local/bin", name))
		if err != nil {
			logrus.WithError(err).Error("stat binary")
			continue
		}
		binarySizeGauge.WithValues(name).Set(float64(fi.Size()))
	}
}
86265
func (a Sources) MarshalBinary() ([]byte, error) {
	var pb internal.Measurements
	pb.Items = make([]*internal.Measurement, len(a))
	for i, source := range a {
		pb.Items[i] = encodeMeasurement(source.(*Measurement))
	}
	return proto.Marshal(&pb)
}
266486
func (e EUI64) MarshalBinary() ([]byte, error) {
	out := make([]byte, len(e))
	// little endian
	for i, v := range e {
		out[len(e)-i-1] = v
	}
	return out, nil
}
894892
func (m *SwaggerVersion) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
126748
func (s *StatusCode) MarshalBinary() ([]byte, error) {
	// 2 bytes: status code
	// N bytes: message
	b := buffer.New(nil)
	b.Write16(uint16(s.Code))
	b.WriteBytes([]byte(s.Message))
	return b.Data(), nil
}
20631
func (m *PolicyTraceResult) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1190047
func (m *Status) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1188369
func (m *SwaggerOAuthIntrospectionRequest) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
418714
func (m *Swaggeroauth2TokenResponse) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
123233
func (m *Error) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1066057
func ParseBinaryState(body string) *BinaryState {
	body = strings.TrimSuffix(strings.TrimPrefix(body, "<BinaryState>"), "</BinaryState>")
	if body == "" {
		return nil
	}

	values := strings.Split(body, "|")
	if len(values) < 2 {
		return nil
	}

	onOff, err := strconv.Atoi(values[0])
	if err != nil {
		onOff = 0
	}
	onSince, err := strconv.ParseInt(values[1], 10, 64)
	if err != nil {
		onSince = 0
	}
	state := &BinaryState{
		OnOff:   onOff,
		OnSince: onSince,
	}
	return state
}
227153
func (m *EndpointPolicy) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1287893
func (m *RequestResponseStatistics) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
927025
func (o *AddCommentToTaskBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}
574025
func (m *Policy) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
502807
func (m *ServiceSpecFlags) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1147728
func (m *EndpointStatus) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}