本文整理汇总了Golang中google/golang.org/grpc.Codec类的典型用法代码示例。如果您正苦于以下问题:Golang Codec类的具体用法?Golang Codec怎么用?Golang Codec使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Codec类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: _MysqlCtl_RunMysqlUpgrade_Handler
func _MysqlCtl_RunMysqlUpgrade_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(RunMysqlUpgradeRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(MysqlCtlServer).RunMysqlUpgrade(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例2: _Automation_GetClusterOperationDetails_Handler
func _Automation_GetClusterOperationDetails_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(automation.GetClusterOperationDetailsRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(AutomationServer).GetClusterOperationDetails(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例3: _WordFilterService_Filter_Handler
func _WordFilterService_Filter_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(WordFilter_Text)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(WordFilterServiceServer).Filter(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例4: _SearchService_Search_Handler
func _SearchService_Search_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(SearchRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(SearchServiceServer).Search(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例5: _Vitess_ExecuteBatchShards_Handler
func _Vitess_ExecuteBatchShards_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(vtgate.ExecuteBatchShardsRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(VitessServer).ExecuteBatchShards(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例6: _ChatService_Reg_Handler
func _ChatService_Reg_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(Chat_Id)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(ChatServiceServer).Reg(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例7: _GraphStore_Write_Handler
func _GraphStore_Write_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(WriteRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(GraphStoreServer).Write(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例8: _AuthService_Login_Handler
func _AuthService_Login_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(User_LoginInfo)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(AuthServiceServer).Login(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例9: _RouteGuide_GetFeature_Handler
func _RouteGuide_GetFeature_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(Point)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(RouteGuideServer).GetFeature(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例10: _API_GetEventsByVolume_Handler
func _API_GetEventsByVolume_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(GetEventsByVolumeRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(APIServer).GetEventsByVolume(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例11: _API_ListEvents_Handler
func _API_ListEvents_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(google_protobuf1.Empty)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(APIServer).ListEvents(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例12: _API_Unmount_Handler
func _API_Unmount_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(UnmountRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(APIServer).Unmount(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例13: _Api_GetPipelineRunStatus_Handler
func _Api_GetPipelineRunStatus_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(GetPipelineRunStatusRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(ApiServer).GetPipelineRunStatus(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例14: _Api_GetVersion_Handler
func _Api_GetVersion_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(google_protobuf.Empty)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(ApiServer).GetVersion(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
示例15: _Echo_Echo_Handler
func _Echo_Echo_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
in := new(EchoRequest)
if err := codec.Unmarshal(buf, in); err != nil {
return nil, err
}
out, err := srv.(EchoServer).Echo(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}