923f84722a
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
34 lines
632 B
Go
34 lines
632 B
Go
package control
|
|
|
|
import (
|
|
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
|
|
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
|
)
|
|
|
|
type requestWrapper struct {
|
|
message.Message
|
|
m grpc.Message
|
|
}
|
|
|
|
func (w *requestWrapper) ToGRPCMessage() grpc.Message {
|
|
return w.m
|
|
}
|
|
|
|
type healthCheckResponseWrapper struct {
|
|
m *HealthCheckResponse
|
|
}
|
|
|
|
func (w *healthCheckResponseWrapper) ToGRPCMessage() grpc.Message {
|
|
return w.m
|
|
}
|
|
|
|
func (w *healthCheckResponseWrapper) FromGRPCMessage(m grpc.Message) error {
|
|
var ok bool
|
|
|
|
w.m, ok = m.(*HealthCheckResponse)
|
|
if !ok {
|
|
return message.NewUnexpectedMessageType(m, w.m)
|
|
}
|
|
|
|
return nil
|
|
}
|