init
This commit is contained in:
16
internal/xrpc/services/logger/logger.go
Normal file
16
internal/xrpc/services/logger/logger.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package logger
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
loggerpb "github.com/xtls/xray-core/app/log/command"
|
||||
)
|
||||
|
||||
// RestartLogger triggers the LoggerService restartLogger RPC and waits for completion.
|
||||
func RestartLogger(ctx context.Context, client loggerpb.LoggerServiceClient) error {
|
||||
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||
defer cancel()
|
||||
_, err := client.RestartLogger(ctx, &loggerpb.RestartLoggerRequest{})
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user