Merge pull request #5835 from dmcgowan/plugin-events-cleanup
Move plugin context events into separate plugin
This commit is contained in:
@@ -154,9 +154,10 @@ func New(ctx context.Context, config *srvconfig.Config) (*Server, error) {
|
||||
grpcServer: grpcServer,
|
||||
tcpServer: tcpServer,
|
||||
ttrpcServer: ttrpcServer,
|
||||
events: exchange.NewExchange(),
|
||||
config: config,
|
||||
}
|
||||
// TODO: Remove this in 2.0 and let event plugin crease it
|
||||
events = exchange.NewExchange()
|
||||
initialized = plugin.NewPluginSet()
|
||||
required = make(map[string]struct{})
|
||||
)
|
||||
@@ -178,7 +179,7 @@ func New(ctx context.Context, config *srvconfig.Config) (*Server, error) {
|
||||
config.Root,
|
||||
config.State,
|
||||
)
|
||||
initContext.Events = s.events
|
||||
initContext.Events = events
|
||||
initContext.Address = config.GRPC.Address
|
||||
initContext.TTRPCAddress = config.TTRPC.Address
|
||||
|
||||
@@ -254,7 +255,6 @@ type Server struct {
|
||||
grpcServer *grpc.Server
|
||||
ttrpcServer *ttrpc.Server
|
||||
tcpServer *grpc.Server
|
||||
events *exchange.Exchange
|
||||
config *srvconfig.Config
|
||||
plugins []*plugin.Plugin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user