Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Topic default top
Topic = "go.lego.topic.bind.srv"
)
Functions ¶
Types ¶
type ConsulRegistry ¶
type ConsulRegistry struct {
// contains filtered or unexported fields
}
ConsulRegistry consul registry
func NewConsulRegistry ¶
func NewConsulRegistry(address, prefix string) *ConsulRegistry
NewConsulRegistry create new registry
func (*ConsulRegistry) Add ¶
func (r *ConsulRegistry) Add(ns string, els []*Element)
Add binding elements
func (*ConsulRegistry) GetAll ¶
func (r *ConsulRegistry) GetAll() map[string][]*Element
GetAll get all binding elements
type Handler ¶
type Handler struct {
ID string
Service eproto.EventService
Priority int
}
Handler struct
type LocalRegistry ¶
type LocalRegistry struct {
// contains filtered or unexported fields
}
LocalRegistry local registry Use local registry to set event binding mannually for developing purpose (not recommended)
func NewLocalRegistry ¶
func NewLocalRegistry() *LocalRegistry
NewLocalRegistry create new local registry
func (*LocalRegistry) Add ¶
func (r *LocalRegistry) Add(name string, els []*Element)
Add binding elements
func (*LocalRegistry) GetAll ¶
func (r *LocalRegistry) GetAll() map[string][]*Element
GetAll get all binding elements
type RedisRegistry ¶
type RedisRegistry struct {
// contains filtered or unexported fields
}
RedisRegistry redis registry
func NewRedisRegistry ¶
func NewRedisRegistry(address, prefix string) *RedisRegistry
NewRedisRegistry create redis registry
func (*RedisRegistry) Add ¶
func (r *RedisRegistry) Add(ns string, els []*Element)
Add add binding elements
func (*RedisRegistry) GetAll ¶
func (r *RedisRegistry) GetAll() map[string][]*Element
GetAll get all binding elements
Click to show internal directories.
Click to hide internal directories.