move memory implementations to core micro repo

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-02-12 16:33:16 +03:00
parent ef664607b4
commit 6751060d05
21 changed files with 2094 additions and 531 deletions

View File

@@ -46,7 +46,17 @@ type noopServer struct {
// NewServer returns new noop server
func NewServer(opts ...Option) Server {
return &noopServer{opts: NewOptions(opts...)}
n := &noopServer{opts: NewOptions(opts...)}
if n.handlers == nil {
n.handlers = make(map[string]Handler)
}
if n.subscribers == nil {
n.subscribers = make(map[*subscriber][]broker.Subscriber)
}
if n.exit == nil {
n.exit = make(chan chan error)
}
return n
}
func (n *noopServer) newCodec(contentType string) (codec.Codec, error) {