|
@@ -535,6 +535,11 @@ func (svr *Service) Shutdown() {
|
|
svr.cancelFunc()
|
|
svr.cancelFunc()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//Context return the service context
|
|
|
|
+func (svr *Service) Context() context.Context {
|
|
|
|
+ return svr.ctx
|
|
|
|
+}
|
|
|
|
+
|
|
func New(opts ...Option) *Service {
|
|
func New(opts ...Option) *Service {
|
|
o := NewOptions()
|
|
o := NewOptions()
|
|
for _, opt := range opts {
|
|
for _, opt := range opts {
|