tasks

package
v0.0.0-...-c36d36f Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MEETING_FETCH_DELTA = 30

support for a magic number in seconds

Variables

This section is empty.

Functions

func FindMeetings

func FindMeetings(c *utils.Config) (calendar.MeetItems, error)

findMeetings is invoked via a go-routine which periodically polls the calender to update the meetings for the day.

func GRPCServer

func GRPCServer(ctx context.Context, config *utils.Config, serverReady chan<- struct{})

GRPCServer is launched via a go routine

func GetTasks

func GetTasks(c *utils.Config) (tasks.SequentialTasks, error)

common code to getTasks

func PruneTasks

func PruneTasks(tsks tasks.SequentialTasks) tasks.SequentialTasks

TODO: think of how to do this more efficiently without copies just to know

func TaskWrapper

func TaskWrapper(c calendar.MeetItems) tasks.SequentialTasks

convert the meeting items to meeting tasks

func UpdateCronMeetings

func UpdateCronMeetings(ctx context.Context, cron *tasks.Cron)

keep running a timer in a go-routine to look for new meetings

Types

type MeetTaskImpl

type MeetTaskImpl struct {
	calendar.MeetItem
}

'extend' a meetitem

func (*MeetTaskImpl) End

func (m *MeetTaskImpl) End() time.Time

return the end time

func (*MeetTaskImpl) Execute

func (m *MeetTaskImpl) Execute(config *utils.Config) error

Run the current task from the cron package

func (*MeetTaskImpl) Name

func (m *MeetTaskImpl) Name() string

implement the Interface requried for Cron

func (*MeetTaskImpl) Start

func (m *MeetTaskImpl) Start() time.Time

return the start time

func (*MeetTaskImpl) String

func (m *MeetTaskImpl) String() string

type MeetTasks

type MeetTasks []MeetTaskImpl

collection of meet taks

Jump to

Keyboard shortcuts

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