Documentation ¶
Index ¶
Constants ¶
View Source
const ( APP_LEVEL_SYSTEM = "system" APP_LEVEL_COMMUNICATION = "communication" APP_LEVEL_APPLICATION = "application" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { NodeName string ServiceName string GroupName string // contains filtered or unexported fields }
func NewConsulConfig ¶
func NewConsulConfig() *Config
type DistributedLock ¶
type DistributedLock struct {
// contains filtered or unexported fields
}
func NewDistributedLock ¶
func NewDistributedLock(name string, config *Config, stopLock chan struct{}) *DistributedLock
func (*DistributedLock) GetLock ¶
func (dl *DistributedLock) GetLock(name string) (*api.Lock, error)
func (*DistributedLock) Lock ¶
func (dl *DistributedLock) Lock() (leaderCh <-chan struct{}, err error)
Click to show internal directories.
Click to hide internal directories.