-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
I have a use-case where I need to run logic on the master before I kick off the bigslice session, which then goes and runs the workers. The specific use-case is that I have a single binary that must capture and dump a state file (in this case Kafka offsets) before the bigslice session, for correctness.
Is there a simple way to distinguish the master from the workers? I've looked through the various bigslice packages, and haven't found anything. Ideally I'd have something like this:
package main
func main() {
if bigslice.IsMaster() {
// Do master-only stuff, before running the bigslice session
}
fn := bigslice.Func(...)
exec.Must(...)
}
Metadata
Metadata
Assignees
Labels
No labels