Documentation ¶
Overview ¶
Package sync is a distributed synchronization framework
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cron ¶
Cron is a distributed scheduler using leader election and distributed task runners. It uses the leader and task interfaces.
type DB ¶
type DB interface { // Read value with given key Read(key, val interface{}) error // Write value with given key Write(key, val interface{}) error // Delete value with given key Delete(key interface{}) error // Iterate over all key/vals. Value changes are saved Iterate(func(key, val interface{}) error) error }
DB provides synchronized access to key-value storage. It uses the data interface and lock interface to provide a consistent storage mechanism.
type Option ¶
type Option func(o *Options)
func WithLeader ¶
WithLeader sets the leader election implementation opton
Directories ¶
Path | Synopsis |
---|---|
Package data is an interface for key-value storage.
|
Package data is an interface for key-value storage. |
consul
Package consul is a consul implementation of kv
|
Package consul is a consul implementation of kv |
etcd
Package etcd is an etcd v3 implementation of kv
|
Package etcd is an etcd v3 implementation of kv |
Package event provides a distributed log interface
|
Package event provides a distributed log interface |
Package leader provides leader election
|
Package leader provides leader election |
Package lock provides distributed locking
|
Package lock provides distributed locking |
consul
Package consul is a consul implemenation of lock
|
Package consul is a consul implemenation of lock |
etcd
Package etcd is an etcd implementation of lock
|
Package etcd is an etcd implementation of lock |
redis
Package redis is a redis implemenation of lock
|
Package redis is a redis implemenation of lock |
Package task provides an interface for distributed jobs
|
Package task provides an interface for distributed jobs |
broker
Package broker provides a distributed task manager built on the micro broker
|
Package broker provides a distributed task manager built on the micro broker |
local
Package local provides a local task runner
|
Package local provides a local task runner |
Package time provides clock synchronization
|
Package time provides clock synchronization |
local
Package local provides a local clock
|
Package local provides a local clock |
ntp
Package ntp provides ntp synchronized time
|
Package ntp provides ntp synchronized time |
Click to show internal directories.
Click to hide internal directories.