Files
podinfo/pkg/api/grpc/panic.go
Prashant Dwivedi b10c3067c8 Removed the whitespaces
Signed-off-by: Prashant Dwivedi <prashantdwivedi194@gmail.com>
2024-06-23 22:47:58 +05:30

23 lines
421 B
Go

package grpc
import (
"context"
// "log"
"os"
pb "github.com/stefanprodan/podinfo/pkg/api/grpc/panic"
"go.uber.org/zap"
)
type PanicServer struct {
pb.UnimplementedPanicServiceServer
config *Config
logger *zap.Logger
}
func (s *PanicServer) Panic(ctx context.Context, req *pb.PanicRequest) (*pb.PanicResponse, error) {
s.logger.Info("Panic command received")
os.Exit(225)
return &pb.PanicResponse{}, nil
}