Documentation ¶
Index ¶
- Constants
- Variables
- func ForWaitLeadership(client Clienter, kvRetriever KvRetriever, p *consul.KVPair, isLeader chan bool, ...)
- func ListenShutdown(c Clienter, kvRetriever KvRetriever, sig chan os.Signal, isLeader chan bool, ...)
- func RenewSession(client Clienter, sessionID string, doneChan chan struct{})
- func WaitLeadership(client Clienter, kvRetriever KvRetriever, p *consul.KVPair, isLeader chan bool, ...)
- type Clienter
- type KeyValuer
- type KvRetriever
Constants ¶
View Source
const ( RenewSessionTime = "5s" NotLeaderPoolInterval = 1 LeaderPoolInterval = 3 )
Variables ¶
View Source
var OsExit = os.Exit
Functions ¶
func ForWaitLeadership ¶
func ListenShutdown ¶
func RenewSession ¶
func WaitLeadership ¶
Types ¶
type KeyValuer ¶
type KeyValuer interface { Acquire(p *consul.KVPair, q *consul.WriteOptions) (bool, *consul.WriteMeta, error) Release(p *consul.KVPair, q *consul.WriteOptions) (bool, *consul.WriteMeta, error) }
func KvFromClient ¶
type KvRetriever ¶
Click to show internal directories.
Click to hide internal directories.