workflows

package
v1.0.1-0...-b16c9cc Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHostPort = "49.235.242.124:7233"
View Source
var NoRetry = &temporal.RetryPolicy{
	MaximumAttempts: 1,
}

Functions

func GetAndSendMessage

func GetAndSendMessage(ctx workflow.Context, url string) error

func PrintFeedToTelegraph

func PrintFeedToTelegraph(feed rss.Feed) string

func RssFeed

func RssFeed(ctx context.Context, lastRunTime, thisRunTime, lastmodified time.Time, etag string) (*rss.Feed, error)

DoSomething is an Activity

func RssWorker

func RssWorker()

func SendMessage

func SendMessage(ctx context.Context, message interface{}) error

Types

type CronResult

type CronResult struct {
	RunTime      time.Time
	Etag         string
	LastModified time.Time
}

CronResult is used to return data from one cron run to the next

func CronRssFeedWorkflow

func CronRssFeedWorkflow(ctx workflow.Context) (*CronResult, error)

SampleCronWorkflow executes on the given schedule The schedule is provided when starting the Workflow

type TgBot

type TgBot struct {
	*tgbotapi.BotAPI
	// contains filtered or unexported fields
}
var Tg *TgBot

func GetTgBot

func GetTgBot() *TgBot

func NewTgBot

func NewTgBot() *TgBot

func (*TgBot) SendMessageToTelegraph

func (tg *TgBot) SendMessageToTelegraph(ctx context.Context, message string) (string, error)

Jump to

Keyboard shortcuts

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