Skip to content

Conversation

@moisespsena
Copy link

Add support for dynamic URL with URLFunc Attribute:

func main() {
	overseer.Run(overseer.Config{
		Program: prog,
		Fetcher: &fetcher.HTTP{
			URLFunc: func() (URL string, err ERROR) {
				t := time.Now()
				nows := fmt.Printf(
					"%d-%02d-%02d_%02d%02d%02d",
					t.Year(), t.Month(), t.Day(),
					t.Hour(), t.Minute(), t.Second(),
				)
				return "http://localhost:4000/binaries/myapp-" + nows, nil
			},
		},
	})
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant