Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EventAdd is the add event. EventAdd = EventType(iota + 1) // EventUpdate is the update event. EventUpdate // EventDelete is the delete event EventDelete )
View Source
const ( // BackendBTree indicates the btree-based backend. BackendBTree = BackendKind(iota) // BackendMySQL indicates the mysql-based backend. BackendMySQL )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface {
// EventCh returns a send-only channel to the users, so that users
// can feed events to Etcd Adapter. Note this is a non-buffered channel.
EventCh() chan<- []*Event
// Serve accepts a net.Listener object and starts the Etcd V3 server.
Serve(context.Context, net.Listener) error
// Shutdown shuts the etcd adapter down.
Shutdown(context.Context) error
}
func NewEtcdAdapter ¶
func NewEtcdAdapter(opts *AdapterOptions) Adapter
NewEtcdAdapter new an etcd adapter instance.
type AdapterOptions ¶
type AdapterOptions struct {
Backend server.Backend
// etcdserver.EtcdServer and KVServerBridge is an implementation of EtcdServerRegister
EtcdServer EtcdServerRegister
}
type EtcdServerRegister ¶
Click to show internal directories.
Click to hide internal directories.