scheduler

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlexibleTimeWindow

type FlexibleTimeWindow struct {
	Mode                   string
	MaximumWindowInMinutes int
}

FlexibleTimeWindow configures schedule flexibility.

type InvocationRecord

type InvocationRecord struct {
	Time    time.Time
	Success bool
	Error   string
}

InvocationRecord tracks a schedule invocation.

type Schedule

type Schedule struct {
	ARN                        string
	Name                       string
	GroupName                  string
	Description                string
	ScheduleExpression         string
	ScheduleExpressionTimezone string
	State                      string
	FlexibleTimeWindow         *FlexibleTimeWindow
	Target                     *Target
	StartDate                  *time.Time
	EndDate                    *time.Time
	KmsKeyArn                  string
	CreationDate               time.Time
	LastModificationDate       time.Time
	Tags                       map[string]string
	// Behavioral fields
	InvocationHistory []InvocationRecord
	// contains filtered or unexported fields
}

Schedule represents an EventBridge Scheduler schedule.

type ScheduleGroup

type ScheduleGroup struct {
	ARN                  string
	Name                 string
	State                string
	CreationDate         time.Time
	LastModificationDate time.Time
	Tags                 map[string]string
}

ScheduleGroup represents a schedule group.

type SchedulerService

type SchedulerService struct {
	// contains filtered or unexported fields
}

SchedulerService is the cloudmock implementation of the AWS EventBridge Scheduler API.

func New

func New(accountID, region string) *SchedulerService

New returns a new SchedulerService for the given AWS account ID and region.

func NewWithLocator

func NewWithLocator(accountID, region string, locator ServiceLocator) *SchedulerService

NewWithLocator returns a new SchedulerService with a ServiceLocator for cross-service invocation.

func (*SchedulerService) Actions

func (s *SchedulerService) Actions() []service.Action

Actions returns the list of Scheduler API actions supported by this service.

func (*SchedulerService) HandleRequest

func (s *SchedulerService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)

HandleRequest routes an incoming Scheduler request to the appropriate handler.

func (*SchedulerService) HealthCheck

func (s *SchedulerService) HealthCheck() error

HealthCheck always returns nil (no external dependencies).

func (*SchedulerService) Name

func (s *SchedulerService) Name() string

Name returns the AWS service name used for routing.

func (*SchedulerService) SetLocator

func (s *SchedulerService) SetLocator(locator ServiceLocator)

SetLocator sets the service locator for cross-service calls.

type ServiceLocator

type ServiceLocator interface {
	Lookup(name string) (service.Service, error)
}

ServiceLocator resolves other services for cross-service invocation.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store manages all Scheduler state in memory.

func NewStore

func NewStore(accountID, region string) *Store

NewStore returns a new Store for the given account and region.

func (*Store) CreateSchedule

func (s *Store) CreateSchedule(name, groupName, description, expression, timezone, state string, flexWindow *FlexibleTimeWindow, target *Target, kmsKeyArn string, startDate, endDate *time.Time, tags map[string]string) (*Schedule, bool)

CreateSchedule creates a new schedule.

func (*Store) CreateScheduleGroup

func (s *Store) CreateScheduleGroup(name string, tags map[string]string) (*ScheduleGroup, bool)

CreateScheduleGroup creates a new schedule group.

func (*Store) DeleteSchedule

func (s *Store) DeleteSchedule(name, groupName string) bool

DeleteSchedule removes a schedule.

func (*Store) DeleteScheduleGroup

func (s *Store) DeleteScheduleGroup(name string) bool

DeleteScheduleGroup removes a schedule group and all its schedules.

func (*Store) GetInvocationHistory

func (s *Store) GetInvocationHistory(name, groupName string) []InvocationRecord

GetInvocationHistory returns invocation records for a schedule.

func (*Store) GetSchedule

func (s *Store) GetSchedule(name, groupName string) (*Schedule, bool)

GetSchedule returns a schedule by name and group.

func (*Store) GetScheduleGroup

func (s *Store) GetScheduleGroup(name string) (*ScheduleGroup, bool)

GetScheduleGroup returns a schedule group by name.

func (*Store) ListScheduleGroups

func (s *Store) ListScheduleGroups(namePrefix string) []*ScheduleGroup

ListScheduleGroups returns all schedule groups.

func (*Store) ListSchedules

func (s *Store) ListSchedules(groupName, state, namePrefix string) []*Schedule

ListSchedules returns all schedules in a group.

func (*Store) ListTagsForResource

func (s *Store) ListTagsForResource(arn string) (map[string]string, bool)

ListTagsForResource returns tags for a resource by ARN.

func (*Store) SetLocator

func (s *Store) SetLocator(locator ServiceLocator)

SetLocator sets the service locator for cross-service invocation.

func (*Store) TagResource

func (s *Store) TagResource(arn string, tags map[string]string) bool

TagResource applies tags to a resource by ARN.

func (*Store) UntagResource

func (s *Store) UntagResource(arn string, keys []string) bool

UntagResource removes tags from a resource by ARN.

func (*Store) UpdateSchedule

func (s *Store) UpdateSchedule(name, groupName, description, expression, timezone, state string, flexWindow *FlexibleTimeWindow, target *Target) (*Schedule, bool)

UpdateSchedule updates a schedule.

type Target

type Target struct {
	Arn     string
	RoleArn string
	Input   string
}

Target is the invocation target for a schedule.

Jump to

Keyboard shortcuts

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