expiry

package
v0.0.0-...-e7c744b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "expiry"

Variables

This section is empty.

Functions

func CalculateDuration

func CalculateDuration(now time.Time, tillDate string) (time.Duration, error)

func NewExpiryServiceManager

func NewExpiryServiceManager(specBinderFn binderFunc) expiryServiceManager

func NewExpiryServiceOperator

func NewExpiryServiceOperator(expiryService ExpiryService, binderFn binderFunc, logger common.Logger) expiryServiceOperator

Types

type Expirer

type Expirer interface {
	Expire(ctx context.Context, clusterID uint, expiryDate string) error
}

type ExpiryCanceller

type ExpiryCanceller interface {
	CancelExpiry(ctx context.Context, clusterID uint) error
}

type ExpiryService

type ExpiryService interface {
	Expirer
	ExpiryCanceller
}

type ServiceSpec

type ServiceSpec struct {
	Date string `json:"date" mapstructure:"date"`
}

func (ServiceSpec) Validate

func (s ServiceSpec) Validate() error

https://www.ietf.org/rfc/rfc3339.txt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL