Documentation ¶
Index ¶
Constants ¶
const ImplementedVersion = 1
ImplementedVersion contains implemented version of the store file layout
Variables ¶
var (
ErrCorruptData = errors.New("data corrupted, checksum mismatch")
)
Functions ¶
This section is empty.
Types ¶
type Checksum ¶
type Checksum uint32
Checksum is the data to be stored as checkpoint
func NewChecksum ¶
NewChecksum returns the Checksum of the object
type PoolReservations ¶
type PoolReservations struct { Name string `json:"name"` // key is container_id + _ + interface_name Entries map[string]Reservation `json:"entries"` // contains pool config from the latest store update LastPoolConfig string `json:"last_pool_config"` LastReservedIP net.IP `json:"last_reserved_ip"` }
PoolReservations is object which used to store IP reservations for the IP pool
func NewPoolReservations ¶
func NewPoolReservations(name string) *PoolReservations
NewPoolReservations returns initialized PoolReservations object
func (*PoolReservations) DeepCopy ¶
func (in *PoolReservations) DeepCopy() *PoolReservations
DeepCopy is a deepcopy function for the PoolReservations struct
type Reservation ¶
type Reservation struct { ContainerID string `json:"container_id"` InterfaceName string `json:"interface_name"` IPAddress net.IP `json:"ip_address"` Metadata ReservationMetadata `json:"metadata"` }
Reservation is used to store Reservation in a checkpoint file
func (*Reservation) DeepCopy ¶
func (in *Reservation) DeepCopy() *Reservation
DeepCopy is a deepcopy function for the Reservation struct
func (*Reservation) String ¶
func (in *Reservation) String() string
String returns string representation of the Reservation
type ReservationMetadata ¶
type ReservationMetadata struct { CreateTime string `json:"create_time"` PodUUID string `json:"pod_uuid"` PodName string `json:"pod_name"` PodNamespace string `json:"pod_namespace"` DeviceID string `json:"device_id"` PoolConfigSnapshot string `json:"pool_config_snapshot"` }
ReservationMetadata contains meta information for reservation
func (*ReservationMetadata) DeepCopy ¶
func (in *ReservationMetadata) DeepCopy() *ReservationMetadata
DeepCopy is a deepcopy function for the ReservationMetadata struct