Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OfflineGate ¶
type OfflineGate struct {
// contains filtered or unexported fields
}
OfflineGate is an entity that works similar to a mutex with signaling Only the caller that has Locked a gate can unlock it, otherwise it will be blocked with a call to Lock. Gate provides a passthrough http middleware that will wait for a locked gate to be unlocked. For safety reasons, the middleware will timeout
func (*OfflineGate) Lock ¶
func (o *OfflineGate) Lock() func()
Lock locks readonly gate and returns a function to unlock
func (*OfflineGate) WaitingMiddleware ¶
WaitingMiddleware returns an http handler that waits for the gate to be unlocked before continuing
Click to show internal directories.
Click to hide internal directories.