Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Awaiter ¶
type Awaiter struct {
// contains filtered or unexported fields
}
Awaiter allows for the encapsulation of the data necessary to handle user-generated cancellations
func CancelOnInterrupt ¶
CancelOnInterrupt ensures that the context cancels when the user-intercept signal is received from the standard input
type KettleContext ¶
type KettleContext struct { Name string Environment string Instance *kettle2.Kettle Logger *utils.Logger // contains filtered or unexported fields }
KettleContext contains data that should be made available to the master function when it is instantiated from Kettle
func NewKettleContext ¶
func NewKettleContext(serviceName string, environment string, expirationSeconds int, logger *utils.Logger) (*KettleContext, error)
NewKettleContext creates a new Kettle context that can be used to run a master function across multiple services
func (*KettleContext) Run ¶
func (kCtx *KettleContext) Run(ctx context.Context, slave KettleFunction, keyers ...*Keyer) error
Run begins a master-slave operation where the master is automatically run by Kettle and the slave is operated manually
type KettleFunction ¶
MasterFunction defines the type of function that will act as the master when Kettle elects this instance of a service as the master