package checkpoint
import "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint"
Index ¶
- func EqualCheckpoints(a, b Checkpoint) bool
- func EqualRemoteConfigSources(a, b RemoteConfigSource) bool
- type Checkpoint
- func DecodeCheckpoint(data []byte) (Checkpoint, error)
- func NewConfigMapCheckpoint(cm *apiv1.ConfigMap) (Checkpoint, error)
- type RemoteConfigSource
Functions ¶
func EqualCheckpoints ¶
func EqualCheckpoints(a, b Checkpoint) bool
EqualCheckpoints compares two Checkpoints for equality, if their underlying objects are equal, so are the Checkpoints
func EqualRemoteConfigSources ¶
func EqualRemoteConfigSources(a, b RemoteConfigSource) bool
EqualRemoteConfigSources is a helper for comparing remote config sources by comparing the underlying API objects for semantic equality.
Types ¶
type Checkpoint ¶
type Checkpoint interface {
// UID returns the UID of the config source object behind the Checkpoint
UID() string
// Parse extracts the KubeletConfiguration from the checkpoint, applies defaults, and converts to the internal type
Parse() (*kubeletconfig.KubeletConfiguration, error)
// Encode returns a []byte representation of the config source object behind the Checkpoint
Encode() ([]byte, error)
// contains filtered or unexported methods
}
Checkpoint represents a local copy of a config source (payload) object
func DecodeCheckpoint ¶
func DecodeCheckpoint(data []byte) (Checkpoint, error)
DecodeCheckpoint is a helper for using the apimachinery to decode serialized checkpoints
func NewConfigMapCheckpoint ¶
func NewConfigMapCheckpoint(cm *apiv1.ConfigMap) (Checkpoint, error)
NewConfigMapCheckpoint returns a Checkpoint backed by `cm`. `cm` must be non-nil and have a non-empty ObjectMeta.UID, or an error will be returned.
type RemoteConfigSource ¶
type RemoteConfigSource interface {
// UID returns the UID of the remote config source object
UID() string
// APIPath returns the API path to the remote resource, e.g. its SelfLink
APIPath() string
// Download downloads the remote config source object returns a Checkpoint backed by the object,
// or a sanitized failure reason and error if the download fails
Download(client clientset.Interface) (Checkpoint, string, error)
// Encode returns a []byte representation of the object behind the RemoteConfigSource
Encode() ([]byte, error)
// contains filtered or unexported methods
}
RemoteConfigSource represents a remote config source object that can be downloaded as a Checkpoint
func DecodeRemoteConfigSource ¶
func DecodeRemoteConfigSource(data []byte) (RemoteConfigSource, error)
DecodeRemoteConfigSource is a helper for using the apimachinery to decode serialized RemoteConfigSources; e.g. the objects stored in the .cur and .lkg files by checkpoint/store/fsstore.go
func NewRemoteConfigSource ¶
func NewRemoteConfigSource(source *apiv1.NodeConfigSource) (RemoteConfigSource, string, error)
NewRemoteConfigSource constructs a RemoteConfigSource from a v1/NodeConfigSource object, or returns a sanitized failure reason and an error if the `source` is blatantly invalid. You should only call this with a non-nil config source.
Source Files ¶
checkpoint.go configmap.go download.go
Directories ¶
| Path | Synopsis |
|---|---|
| pkg/kubelet/kubeletconfig/checkpoint/store |
- Version
- v1.10.2-beta.0
- Published
- Apr 12, 2018
- Platform
- windows/amd64
- Imports
- 13 packages
- Last checked
- 2 minutes ago –
Tools for package owners.