Package schedule

import "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/store/schedule"

Overview ▾

func DeleteIncompleteSchedules

func DeleteIncompleteSchedules(es core.ScheduleStore, _ core.EventStore)

DeleteIncompleteSchedules call core.ScheduleStore.DeleteIncompleteSchedules to deletes all incomplete schedules.

func NewStore

func NewStore(db *gorm.DB) core.ScheduleStore

NewStore returns a new ScheduleStore.

type ScheduleStore

type ScheduleStore struct {
    // contains filtered or unexported fields

func (*ScheduleStore) Archive

func (e *ScheduleStore) Archive(_ context.Context, ns, name string) error

Archive implements the core.ScheduleStore.Archive method.

func (*ScheduleStore) Delete

func (e *ScheduleStore) Delete(_ context.Context, exp *core.Schedule) error

Delete deletes the experiment from the datastore.

func (*ScheduleStore) DeleteByFinishTime

func (e *ScheduleStore) DeleteByFinishTime(_ context.Context, ttl time.Duration) error

DeleteByFinishTime deletes schedules whose time difference is greater than the given time from FinishTime.

func (*ScheduleStore) DeleteByUIDs

func (e *ScheduleStore) DeleteByUIDs(_ context.Context, uids []string) error

DeleteByUIDs deletes schedules by the uid list.

func (*ScheduleStore) DeleteIncompleteSchedules

func (e *ScheduleStore) DeleteIncompleteSchedules(_ context.Context) error

DeleteIncompleteSchedules implements the core.ScheduleStore.DeleteIncompleteSchedules method.

func (*ScheduleStore) FindByUID

func (e *ScheduleStore) FindByUID(_ context.Context, uid string) (*core.Schedule, error)

FindByUID implements the core.ScheduleStore.FindByUID method.

func (*ScheduleStore) FindMetaByUID

func (e *ScheduleStore) FindMetaByUID(_ context.Context, uid string) (*core.ScheduleMeta, error)

FindMetaByUID implements the core.ScheduleStore.FindMetaByUID method.

func (*ScheduleStore) ListMeta

func (e *ScheduleStore) ListMeta(_ context.Context, namespace, name string, archived bool) ([]*core.ScheduleMeta, error)

ListMeta implements the core.ScheduleStore.ListMeta method.

func (*ScheduleStore) Set

func (e *ScheduleStore) Set(_ context.Context, schedule *core.Schedule) error

Set implements the core.ScheduleStore.Set method.