Skip to content

Commit 484b664

Browse files
committed
platform: Add OOM Report
1 parent 82b8cd7 commit 484b664

20 files changed

Lines changed: 491 additions & 223 deletions

daemon/instance.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,17 @@ func (s *StartedService) newInstance(profileContent string, overrideOptions *Ove
8787
}
8888
}
8989
}
90-
if s.oomKiller && C.IsIos {
90+
if s.oomKillerEnabled {
9191
if !common.Any(options.Services, func(it option.Service) bool {
9292
return it.Type == C.TypeOOMKiller
9393
}) {
94+
oomOptions := &option.OOMKillerServiceOptions{
95+
KillerDisabled: s.oomKillerDisabled,
96+
MemoryLimitOverride: s.oomMemoryLimit,
97+
}
9498
options.Services = append(options.Services, option.Service{
95-
Type: C.TypeOOMKiller,
99+
Type: C.TypeOOMKiller,
100+
Options: oomOptions,
96101
})
97102
}
98103
}

daemon/started_service.go

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/sagernet/sing-box/experimental/deprecated"
1515
"github.com/sagernet/sing-box/log"
1616
"github.com/sagernet/sing-box/protocol/group"
17+
"github.com/sagernet/sing-box/service/oomkiller"
1718
"github.com/sagernet/sing/common"
1819
"github.com/sagernet/sing/common/batch"
1920
E "github.com/sagernet/sing/common/exceptions"
@@ -34,10 +35,12 @@ var _ StartedServiceServer = (*StartedService)(nil)
3435
type StartedService struct {
3536
ctx context.Context
3637
// platform adapter.PlatformInterface
37-
handler PlatformHandler
38-
debug bool
39-
logMaxLines int
40-
oomKiller bool
38+
handler PlatformHandler
39+
debug bool
40+
logMaxLines int
41+
oomKillerEnabled bool
42+
oomKillerDisabled bool
43+
oomMemoryLimit uint64
4144
// workingDirectory string
4245
// tempDirectory string
4346
// userID int
@@ -66,10 +69,12 @@ type StartedService struct {
6669
type ServiceOptions struct {
6770
Context context.Context
6871
// Platform adapter.PlatformInterface
69-
Handler PlatformHandler
70-
Debug bool
71-
LogMaxLines int
72-
OOMKiller bool
72+
Handler PlatformHandler
73+
Debug bool
74+
LogMaxLines int
75+
OOMKillerEnabled bool
76+
OOMKillerDisabled bool
77+
OOMMemoryLimit uint64
7378
// WorkingDirectory string
7479
// TempDirectory string
7580
// UserID int
@@ -81,10 +86,12 @@ func NewStartedService(options ServiceOptions) *StartedService {
8186
s := &StartedService{
8287
ctx: options.Context,
8388
// platform: options.Platform,
84-
handler: options.Handler,
85-
debug: options.Debug,
86-
logMaxLines: options.LogMaxLines,
87-
oomKiller: options.OOMKiller,
89+
handler: options.Handler,
90+
debug: options.Debug,
91+
logMaxLines: options.LogMaxLines,
92+
oomKillerEnabled: options.OOMKillerEnabled,
93+
oomKillerDisabled: options.OOMKillerDisabled,
94+
oomMemoryLimit: options.OOMMemoryLimit,
8895
// workingDirectory: options.WorkingDirectory,
8996
// tempDirectory: options.TempDirectory,
9097
// userID: options.UserID,
@@ -710,6 +717,21 @@ func (s *StartedService) TriggerDebugCrash(ctx context.Context, request *DebugCr
710717
return &emptypb.Empty{}, nil
711718
}
712719

720+
func (s *StartedService) TriggerOOMReport(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) {
721+
if !s.debug {
722+
return nil, status.Error(codes.PermissionDenied, "OOM report trigger unavailable")
723+
}
724+
instance := s.Instance()
725+
if instance == nil {
726+
return nil, status.Error(codes.FailedPrecondition, "service not started")
727+
}
728+
reporter := service.FromContext[oomkiller.OOMReporter](instance.ctx)
729+
if reporter == nil {
730+
return nil, status.Error(codes.Unavailable, "OOM reporter not available")
731+
}
732+
return &emptypb.Empty{}, reporter.WriteReport(memory.Total())
733+
}
734+
713735
func (s *StartedService) SubscribeConnections(request *SubscribeConnectionsRequest, server grpc.ServerStreamingServer[ConnectionEvents]) error {
714736
err := s.waitForStarted(server.Context())
715737
if err != nil {

daemon/started_service.pb.go

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ const file_daemon_started_service_proto_rawDesc = "" +
20082008
"\x13ConnectionEventType\x12\x18\n" +
20092009
"\x14CONNECTION_EVENT_NEW\x10\x00\x12\x1b\n" +
20102010
"\x17CONNECTION_EVENT_UPDATE\x10\x01\x12\x1b\n" +
2011-
"\x17CONNECTION_EVENT_CLOSED\x10\x022\xaf\f\n" +
2011+
"\x17CONNECTION_EVENT_CLOSED\x10\x022\xf5\f\n" +
20122012
"\x0eStartedService\x12=\n" +
20132013
"\vStopService\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\x12?\n" +
20142014
"\rReloadService\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\x12K\n" +
@@ -2026,7 +2026,8 @@ const file_daemon_started_service_proto_rawDesc = "" +
20262026
"\x0eSetGroupExpand\x12\x1d.daemon.SetGroupExpandRequest\x1a\x16.google.protobuf.Empty\"\x00\x12K\n" +
20272027
"\x14GetSystemProxyStatus\x12\x16.google.protobuf.Empty\x1a\x19.daemon.SystemProxyStatus\"\x00\x12W\n" +
20282028
"\x15SetSystemProxyEnabled\x12$.daemon.SetSystemProxyEnabledRequest\x1a\x16.google.protobuf.Empty\"\x00\x12H\n" +
2029-
"\x11TriggerDebugCrash\x12\x19.daemon.DebugCrashRequest\x1a\x16.google.protobuf.Empty\"\x00\x12Y\n" +
2029+
"\x11TriggerDebugCrash\x12\x19.daemon.DebugCrashRequest\x1a\x16.google.protobuf.Empty\"\x00\x12D\n" +
2030+
"\x10TriggerOOMReport\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12Y\n" +
20302031
"\x14SubscribeConnections\x12#.daemon.SubscribeConnectionsRequest\x1a\x18.daemon.ConnectionEvents\"\x000\x01\x12K\n" +
20312032
"\x0fCloseConnection\x12\x1e.daemon.CloseConnectionRequest\x1a\x16.google.protobuf.Empty\"\x00\x12G\n" +
20322033
"\x13CloseAllConnections\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12M\n" +
@@ -2114,35 +2115,37 @@ var file_daemon_started_service_proto_depIdxs = []int32{
21142115
31, // 26: daemon.StartedService.GetSystemProxyStatus:input_type -> google.protobuf.Empty
21152116
19, // 27: daemon.StartedService.SetSystemProxyEnabled:input_type -> daemon.SetSystemProxyEnabledRequest
21162117
20, // 28: daemon.StartedService.TriggerDebugCrash:input_type -> daemon.DebugCrashRequest
2117-
21, // 29: daemon.StartedService.SubscribeConnections:input_type -> daemon.SubscribeConnectionsRequest
2118-
26, // 30: daemon.StartedService.CloseConnection:input_type -> daemon.CloseConnectionRequest
2119-
31, // 31: daemon.StartedService.CloseAllConnections:input_type -> google.protobuf.Empty
2120-
31, // 32: daemon.StartedService.GetDeprecatedWarnings:input_type -> google.protobuf.Empty
2121-
31, // 33: daemon.StartedService.GetStartedAt:input_type -> google.protobuf.Empty
2122-
31, // 34: daemon.StartedService.StopService:output_type -> google.protobuf.Empty
2123-
31, // 35: daemon.StartedService.ReloadService:output_type -> google.protobuf.Empty
2124-
4, // 36: daemon.StartedService.SubscribeServiceStatus:output_type -> daemon.ServiceStatus
2125-
7, // 37: daemon.StartedService.SubscribeLog:output_type -> daemon.Log
2126-
8, // 38: daemon.StartedService.GetDefaultLogLevel:output_type -> daemon.DefaultLogLevel
2127-
31, // 39: daemon.StartedService.ClearLogs:output_type -> google.protobuf.Empty
2128-
9, // 40: daemon.StartedService.SubscribeStatus:output_type -> daemon.Status
2129-
10, // 41: daemon.StartedService.SubscribeGroups:output_type -> daemon.Groups
2130-
17, // 42: daemon.StartedService.GetClashModeStatus:output_type -> daemon.ClashModeStatus
2131-
16, // 43: daemon.StartedService.SubscribeClashMode:output_type -> daemon.ClashMode
2132-
31, // 44: daemon.StartedService.SetClashMode:output_type -> google.protobuf.Empty
2133-
31, // 45: daemon.StartedService.URLTest:output_type -> google.protobuf.Empty
2134-
31, // 46: daemon.StartedService.SelectOutbound:output_type -> google.protobuf.Empty
2135-
31, // 47: daemon.StartedService.SetGroupExpand:output_type -> google.protobuf.Empty
2136-
18, // 48: daemon.StartedService.GetSystemProxyStatus:output_type -> daemon.SystemProxyStatus
2137-
31, // 49: daemon.StartedService.SetSystemProxyEnabled:output_type -> google.protobuf.Empty
2138-
31, // 50: daemon.StartedService.TriggerDebugCrash:output_type -> google.protobuf.Empty
2139-
23, // 51: daemon.StartedService.SubscribeConnections:output_type -> daemon.ConnectionEvents
2140-
31, // 52: daemon.StartedService.CloseConnection:output_type -> google.protobuf.Empty
2141-
31, // 53: daemon.StartedService.CloseAllConnections:output_type -> google.protobuf.Empty
2142-
27, // 54: daemon.StartedService.GetDeprecatedWarnings:output_type -> daemon.DeprecatedWarnings
2143-
29, // 55: daemon.StartedService.GetStartedAt:output_type -> daemon.StartedAt
2144-
34, // [34:56] is the sub-list for method output_type
2145-
12, // [12:34] is the sub-list for method input_type
2118+
31, // 29: daemon.StartedService.TriggerOOMReport:input_type -> google.protobuf.Empty
2119+
21, // 30: daemon.StartedService.SubscribeConnections:input_type -> daemon.SubscribeConnectionsRequest
2120+
26, // 31: daemon.StartedService.CloseConnection:input_type -> daemon.CloseConnectionRequest
2121+
31, // 32: daemon.StartedService.CloseAllConnections:input_type -> google.protobuf.Empty
2122+
31, // 33: daemon.StartedService.GetDeprecatedWarnings:input_type -> google.protobuf.Empty
2123+
31, // 34: daemon.StartedService.GetStartedAt:input_type -> google.protobuf.Empty
2124+
31, // 35: daemon.StartedService.StopService:output_type -> google.protobuf.Empty
2125+
31, // 36: daemon.StartedService.ReloadService:output_type -> google.protobuf.Empty
2126+
4, // 37: daemon.StartedService.SubscribeServiceStatus:output_type -> daemon.ServiceStatus
2127+
7, // 38: daemon.StartedService.SubscribeLog:output_type -> daemon.Log
2128+
8, // 39: daemon.StartedService.GetDefaultLogLevel:output_type -> daemon.DefaultLogLevel
2129+
31, // 40: daemon.StartedService.ClearLogs:output_type -> google.protobuf.Empty
2130+
9, // 41: daemon.StartedService.SubscribeStatus:output_type -> daemon.Status
2131+
10, // 42: daemon.StartedService.SubscribeGroups:output_type -> daemon.Groups
2132+
17, // 43: daemon.StartedService.GetClashModeStatus:output_type -> daemon.ClashModeStatus
2133+
16, // 44: daemon.StartedService.SubscribeClashMode:output_type -> daemon.ClashMode
2134+
31, // 45: daemon.StartedService.SetClashMode:output_type -> google.protobuf.Empty
2135+
31, // 46: daemon.StartedService.URLTest:output_type -> google.protobuf.Empty
2136+
31, // 47: daemon.StartedService.SelectOutbound:output_type -> google.protobuf.Empty
2137+
31, // 48: daemon.StartedService.SetGroupExpand:output_type -> google.protobuf.Empty
2138+
18, // 49: daemon.StartedService.GetSystemProxyStatus:output_type -> daemon.SystemProxyStatus
2139+
31, // 50: daemon.StartedService.SetSystemProxyEnabled:output_type -> google.protobuf.Empty
2140+
31, // 51: daemon.StartedService.TriggerDebugCrash:output_type -> google.protobuf.Empty
2141+
31, // 52: daemon.StartedService.TriggerOOMReport:output_type -> google.protobuf.Empty
2142+
23, // 53: daemon.StartedService.SubscribeConnections:output_type -> daemon.ConnectionEvents
2143+
31, // 54: daemon.StartedService.CloseConnection:output_type -> google.protobuf.Empty
2144+
31, // 55: daemon.StartedService.CloseAllConnections:output_type -> google.protobuf.Empty
2145+
27, // 56: daemon.StartedService.GetDeprecatedWarnings:output_type -> daemon.DeprecatedWarnings
2146+
29, // 57: daemon.StartedService.GetStartedAt:output_type -> daemon.StartedAt
2147+
35, // [35:58] is the sub-list for method output_type
2148+
12, // [12:35] is the sub-list for method input_type
21462149
12, // [12:12] is the sub-list for extension type_name
21472150
12, // [12:12] is the sub-list for extension extendee
21482151
0, // [0:12] is the sub-list for field type_name

daemon/started_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ service StartedService {
2727
rpc GetSystemProxyStatus(google.protobuf.Empty) returns(SystemProxyStatus) {}
2828
rpc SetSystemProxyEnabled(SetSystemProxyEnabledRequest) returns(google.protobuf.Empty) {}
2929
rpc TriggerDebugCrash(DebugCrashRequest) returns(google.protobuf.Empty) {}
30+
rpc TriggerOOMReport(google.protobuf.Empty) returns(google.protobuf.Empty) {}
3031

3132
rpc SubscribeConnections(SubscribeConnectionsRequest) returns(stream ConnectionEvents) {}
3233
rpc CloseConnection(CloseConnectionRequest) returns(google.protobuf.Empty) {}

daemon/started_service_grpc.pb.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const (
3232
StartedService_GetSystemProxyStatus_FullMethodName = "/daemon.StartedService/GetSystemProxyStatus"
3333
StartedService_SetSystemProxyEnabled_FullMethodName = "/daemon.StartedService/SetSystemProxyEnabled"
3434
StartedService_TriggerDebugCrash_FullMethodName = "/daemon.StartedService/TriggerDebugCrash"
35+
StartedService_TriggerOOMReport_FullMethodName = "/daemon.StartedService/TriggerOOMReport"
3536
StartedService_SubscribeConnections_FullMethodName = "/daemon.StartedService/SubscribeConnections"
3637
StartedService_CloseConnection_FullMethodName = "/daemon.StartedService/CloseConnection"
3738
StartedService_CloseAllConnections_FullMethodName = "/daemon.StartedService/CloseAllConnections"
@@ -60,6 +61,7 @@ type StartedServiceClient interface {
6061
GetSystemProxyStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SystemProxyStatus, error)
6162
SetSystemProxyEnabled(ctx context.Context, in *SetSystemProxyEnabledRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
6263
TriggerDebugCrash(ctx context.Context, in *DebugCrashRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
64+
TriggerOOMReport(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
6365
SubscribeConnections(ctx context.Context, in *SubscribeConnectionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ConnectionEvents], error)
6466
CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
6567
CloseAllConnections(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
@@ -290,6 +292,16 @@ func (c *startedServiceClient) TriggerDebugCrash(ctx context.Context, in *DebugC
290292
return out, nil
291293
}
292294

295+
func (c *startedServiceClient) TriggerOOMReport(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
296+
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
297+
out := new(emptypb.Empty)
298+
err := c.cc.Invoke(ctx, StartedService_TriggerOOMReport_FullMethodName, in, out, cOpts...)
299+
if err != nil {
300+
return nil, err
301+
}
302+
return out, nil
303+
}
304+
293305
func (c *startedServiceClient) SubscribeConnections(ctx context.Context, in *SubscribeConnectionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ConnectionEvents], error) {
294306
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
295307
stream, err := c.cc.NewStream(ctx, &StartedService_ServiceDesc.Streams[5], StartedService_SubscribeConnections_FullMethodName, cOpts...)
@@ -370,6 +382,7 @@ type StartedServiceServer interface {
370382
GetSystemProxyStatus(context.Context, *emptypb.Empty) (*SystemProxyStatus, error)
371383
SetSystemProxyEnabled(context.Context, *SetSystemProxyEnabledRequest) (*emptypb.Empty, error)
372384
TriggerDebugCrash(context.Context, *DebugCrashRequest) (*emptypb.Empty, error)
385+
TriggerOOMReport(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
373386
SubscribeConnections(*SubscribeConnectionsRequest, grpc.ServerStreamingServer[ConnectionEvents]) error
374387
CloseConnection(context.Context, *CloseConnectionRequest) (*emptypb.Empty, error)
375388
CloseAllConnections(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
@@ -453,6 +466,10 @@ func (UnimplementedStartedServiceServer) TriggerDebugCrash(context.Context, *Deb
453466
return nil, status.Error(codes.Unimplemented, "method TriggerDebugCrash not implemented")
454467
}
455468

469+
func (UnimplementedStartedServiceServer) TriggerOOMReport(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
470+
return nil, status.Error(codes.Unimplemented, "method TriggerOOMReport not implemented")
471+
}
472+
456473
func (UnimplementedStartedServiceServer) SubscribeConnections(*SubscribeConnectionsRequest, grpc.ServerStreamingServer[ConnectionEvents]) error {
457474
return status.Error(codes.Unimplemented, "method SubscribeConnections not implemented")
458475
}
@@ -764,6 +781,24 @@ func _StartedService_TriggerDebugCrash_Handler(srv interface{}, ctx context.Cont
764781
return interceptor(ctx, in, info, handler)
765782
}
766783

784+
func _StartedService_TriggerOOMReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
785+
in := new(emptypb.Empty)
786+
if err := dec(in); err != nil {
787+
return nil, err
788+
}
789+
if interceptor == nil {
790+
return srv.(StartedServiceServer).TriggerOOMReport(ctx, in)
791+
}
792+
info := &grpc.UnaryServerInfo{
793+
Server: srv,
794+
FullMethod: StartedService_TriggerOOMReport_FullMethodName,
795+
}
796+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
797+
return srv.(StartedServiceServer).TriggerOOMReport(ctx, req.(*emptypb.Empty))
798+
}
799+
return interceptor(ctx, in, info, handler)
800+
}
801+
767802
func _StartedService_SubscribeConnections_Handler(srv interface{}, stream grpc.ServerStream) error {
768803
m := new(SubscribeConnectionsRequest)
769804
if err := stream.RecvMsg(m); err != nil {
@@ -902,6 +937,10 @@ var StartedService_ServiceDesc = grpc.ServiceDesc{
902937
MethodName: "TriggerDebugCrash",
903938
Handler: _StartedService_TriggerDebugCrash_Handler,
904939
},
940+
{
941+
MethodName: "TriggerOOMReport",
942+
Handler: _StartedService_TriggerOOMReport_Handler,
943+
},
905944
{
906945
MethodName: "CloseConnection",
907946
Handler: _StartedService_CloseConnection_Handler,

experimental/libbox/command_client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,13 @@ func (c *CommandClient) TriggerNativeCrash() error {
558558
return err
559559
}
560560

561+
func (c *CommandClient) TriggerOOMReport() error {
562+
_, err := callWithResult(c, func(client daemon.StartedServiceClient) (*emptypb.Empty, error) {
563+
return client.TriggerOOMReport(context.Background(), &emptypb.Empty{})
564+
})
565+
return err
566+
}
567+
561568
func (c *CommandClient) GetDeprecatedNotes() (DeprecatedNoteIterator, error) {
562569
return callWithResult(c, func(client daemon.StartedServiceClient) (DeprecatedNoteIterator, error) {
563570
warnings, err := client.GetDeprecatedWarnings(context.Background(), &emptypb.Empty{})

experimental/libbox/command_server.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ func NewCommandServer(handler CommandServerHandler, platformInterface PlatformIn
5858
server.StartedService = daemon.NewStartedService(daemon.ServiceOptions{
5959
Context: ctx,
6060
// Platform: platformWrapper,
61-
Handler: (*platformHandler)(server),
62-
Debug: sDebug,
63-
LogMaxLines: sLogMaxLines,
64-
OOMKiller: memoryLimitEnabled,
61+
Handler: (*platformHandler)(server),
62+
Debug: sDebug,
63+
LogMaxLines: sLogMaxLines,
64+
OOMKillerEnabled: sOOMKillerEnabled,
65+
OOMKillerDisabled: sOOMKillerDisabled,
66+
OOMMemoryLimit: uint64(sOOMMemoryLimit),
6567
// WorkingDirectory: sWorkingPath,
6668
// TempDirectory: sTempPath,
6769
// UserID: sUserID,

experimental/libbox/config.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/sagernet/sing-box/include"
1313
"github.com/sagernet/sing-box/log"
1414
"github.com/sagernet/sing-box/option"
15+
"github.com/sagernet/sing-box/service/oomkiller"
1516
tun "github.com/sagernet/sing-tun"
1617
"github.com/sagernet/sing/common/control"
1718
E "github.com/sagernet/sing/common/exceptions"
@@ -22,6 +23,8 @@ import (
2223
"github.com/sagernet/sing/service/filemanager"
2324
)
2425

26+
var sOOMReporter oomkiller.OOMReporter
27+
2528
func baseContext(platformInterface PlatformInterface) context.Context {
2629
dnsRegistry := include.DNSTransportRegistry()
2730
if platformInterface != nil {
@@ -33,6 +36,9 @@ func baseContext(platformInterface PlatformInterface) context.Context {
3336
}
3437
ctx := context.Background()
3538
ctx = filemanager.WithDefault(ctx, sWorkingPath, sTempPath, sUserID, sGroupID)
39+
if sOOMReporter != nil {
40+
ctx = service.ContextWith[oomkiller.OOMReporter](ctx, sOOMReporter)
41+
}
3642
return box.Context(ctx, include.InboundRegistry(), include.OutboundRegistry(), include.EndpointRegistry(), dnsRegistry, include.ServiceRegistry(), include.CertificateProviderRegistry())
3743
}
3844

0 commit comments

Comments
 (0)