Documentation ¶
Overview ¶
Package state provides a store to retrieve and save container lifecycle related information This is typically used by oci-hooks for information that cannot be retrieved / updated otherwise Specifically, the state carries container start time, and transient information about possible failures during hook events processing. All store methods are safe to use concurrently and only write atomically. Since the state is transient and carrying solely informative data, errors returned from here could be treated as soft-failures. Note that locking is done at the container state directory level. state is currently used by ocihooks and for read by dockercompat (to display started-at time)
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLifecycleStore = errors.New("lifecycle-store error")
ErrLifecycleStore will wrap all errors here
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { // StartedAt reflects the time at which we received the oci-hook onCreateRuntime event StartedAt time.Time `json:"started_at"` CreateError bool `json:"create_error"` // contains filtered or unexported fields }
Store exposes methods to retrieve and transform state information about containers.
func New ¶
New will return a lifecycle struct for the container which stateDir is passed as argument