github.com/kubearmor/cilium@v1.6.12/api/v1/health/models/connectivity_status.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package models
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	strfmt "github.com/go-openapi/strfmt"
    10  
    11  	"github.com/go-openapi/swag"
    12  )
    13  
    14  // ConnectivityStatus Connectivity status of a path
    15  // swagger:model ConnectivityStatus
    16  type ConnectivityStatus struct {
    17  
    18  	// Round trip time to node in nanoseconds
    19  	Latency int64 `json:"latency,omitempty"`
    20  
    21  	// Human readable status/error/warning message
    22  	Status string `json:"status,omitempty"`
    23  }
    24  
    25  // Validate validates this connectivity status
    26  func (m *ConnectivityStatus) Validate(formats strfmt.Registry) error {
    27  	return nil
    28  }
    29  
    30  // MarshalBinary interface implementation
    31  func (m *ConnectivityStatus) MarshalBinary() ([]byte, error) {
    32  	if m == nil {
    33  		return nil, nil
    34  	}
    35  	return swag.WriteJSON(m)
    36  }
    37  
    38  // UnmarshalBinary interface implementation
    39  func (m *ConnectivityStatus) UnmarshalBinary(b []byte) error {
    40  	var res ConnectivityStatus
    41  	if err := swag.ReadJSON(b, &res); err != nil {
    42  		return err
    43  	}
    44  	*m = res
    45  	return nil
    46  }