close micro-roadmap/issues/12

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-10-09 12:15:55 +03:00
parent cacd33e84f
commit 24be220f91
2 changed files with 10 additions and 30 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/unistack-org/micro/v3/config"
"github.com/unistack-org/micro/v3/debug/profile"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/network/transport"
"github.com/unistack-org/micro/v3/registry"
"github.com/unistack-org/micro/v3/router"
"github.com/unistack-org/micro/v3/runtime"
@@ -19,7 +20,6 @@ import (
"github.com/unistack-org/micro/v3/server"
"github.com/unistack-org/micro/v3/store"
"github.com/unistack-org/micro/v3/tracer"
"github.com/unistack-org/micro/v3/network/transport"
)
// Options for micro service
@@ -47,14 +47,11 @@ type Options struct {
// Other options for implementations of the interface
// can be stored in a context
Context context.Context
Signal bool
}
func newOptions(opts ...Option) Options {
opt := Options{
Context: context.Background(),
Signal: true,
Server: server.DefaultServer,
Client: client.DefaultClient,
Broker: broker.DefaultBroker,
@@ -113,15 +110,6 @@ func Context(ctx context.Context) Option {
}
}
// HandleSignal toggles automatic installation of the signal handler that
// traps TERM, INT, and QUIT. Users of this feature to disable the signal
// handler, should control liveness of the service through the context.
func HandleSignal(b bool) Option {
return func(o *Options) {
o.Signal = b
}
}
// Profile to be used for debug profile
func Profile(p profile.Profile) Option {
return func(o *Options) {