Versions in this module Expand all Collapse all v1 v1.0.0 Oct 7, 2025 Changes in this version + const PolicyPathENV + var ErrJSONUnmarshal = errors.New("error during unmarshal") + var ErrNoPolicyPathEnvVar = errors.New("no environment variable set for the maintenance policy path") + var ErrNoWindowFound = errors.New("matches and defaults also failed to provide a window") + var ErrNoWindowInPolicies = errors.New("matched policies did not provide a window") + var ErrPolicyNotExists = errors.New("maintenance policy doesn't exist") + var ErrReadingDirectory = errors.New("error while reading the directory") + var ErrUnknownOption = errors.New("unknown option") + func GetMaintenancePolicyPool() (map[string]*[]byte, error) + type FallbackDefault bool + type FirstMatchOnly bool + type MaintenancePolicyMatch struct + GlobalAccountID Regexp + Plan Regexp + PlatformRegion Regexp + Region Regexp + func (mpm MaintenancePolicyMatch) Match(runtime *Runtime) bool + func (mpm MaintenancePolicyMatch) String() string + type MaintenancePolicyRule struct + Match MaintenancePolicyMatch + Windows MaintenanceWindows + type MaintenanceWindow struct + Begin WindowTime + Days []string + End WindowTime + func (mw *MaintenanceWindow) NextWindow(opts *resolveOptions) *ResolvedWindow + type MaintenanceWindowPolicy struct + Default MaintenanceWindow + Rules []MaintenancePolicyRule + func GetMaintenancePolicy(pool map[string]*[]byte, name string) (*MaintenanceWindowPolicy, error) + func NewMaintenanceWindowPolicyFromJSON(raw []byte) (MaintenanceWindowPolicy, error) + func (mwp *MaintenanceWindowPolicy) Resolve(runtime *Runtime, opts ...interface{}) (*ResolvedWindow, error) + type MaintenanceWindows []MaintenanceWindow + func (mws *MaintenanceWindows) LookupAvailable(opts *resolveOptions) *ResolvedWindow + type MinWindowSize time.Duration + type OngoingWindow bool + type Regexp struct + Regexp *regexp.Regexp + Str string + func NewRegexp(pattern string) Regexp + func (r *Regexp) UnmarshalJSON(data []byte) error + func (r Regexp) IsValid() bool + func (r Regexp) MatchString(s string) bool + func (r Regexp) String() string + type ResolvedWindow struct + Begin time.Time + End time.Time + func (rw ResolvedWindow) String() string + type Runtime struct + GlobalAccountID string + InstanceID string + MaintenanceDays []string + MaintenanceWindowBegin time.Time + MaintenanceWindowEnd time.Time + Plan string + PlatformRegion string + Region string + RuntimeID string + ShootName string + SubAccountID string + type TimeStamp time.Time + type WindowTime time.Time + func (wt *WindowTime) T() time.Time + func (wt *WindowTime) UnmarshalJSON(data []byte) error