Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCanceled = errors.New("canceled")
)
View Source
var LockerTypes = []string{
"consul",
}
View Source
var Lockers = map[string]Initializer{}
Functions ¶
func DecodeConfig ¶
func DecodeConfig(src, dst interface{}) error
func Register ¶
func Register(name string, initFn Initializer)
Types ¶
type Initializer ¶
type Initializer func() Locker
type Locker ¶
type Locker interface { Init(context.Context, map[string]interface{}, ...Option) error Lock(context.Context, string, []byte) (bool, error) KeepLock(context.Context, string) (chan struct{}, chan error) IsLocked(context.Context, string) (bool, error) Unlock(context.Context, string) error Register(context.Context, *ServiceRegistration) error Deregister(string) error List(context.Context, string) (map[string]string, error) WatchServices(context.Context, string, []string, chan<- []*Service, time.Duration) error Stop() error SetLogger(*log.Logger) }
Click to show internal directories.
Click to hide internal directories.