• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang grpc.Codec类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中google/golang.org/grpc.Codec的典型用法代码示例。如果您正苦于以下问题:Golang Codec类的具体用法?Golang Codec怎么用?Golang Codec使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Codec类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
}
开发者ID:richarwu,项目名称:vitess,代码行数:11,代码来源:mysqlctl.pb.go


示例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
}
开发者ID:payintel,项目名称:vitess,代码行数:11,代码来源:automationservice.pb.go


示例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
}
开发者ID:tenywen,项目名称:login-srv,代码行数:11,代码来源:wordfilter.pb.go


示例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
}
开发者ID:herberteuler,项目名称:kythe,代码行数:11,代码来源:storage.pb.go


示例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
}
开发者ID:ruiaylin,项目名称:vitess,代码行数:11,代码来源:vtgateservice.pb.go


示例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
}
开发者ID:pengswift,项目名称:chat,代码行数:11,代码来源:chat.pb.go


示例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
}
开发者ID:herberteuler,项目名称:kythe,代码行数:11,代码来源:storage.pb.go


示例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
}
开发者ID:anders007,项目名称:libs,代码行数:11,代码来源:auth.pb.go


示例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
}
开发者ID:johndmulhausen,项目名称:kubernetes,代码行数:11,代码来源:route_guide.pb.go


示例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
}
开发者ID:sr,项目名称:pachyderm,代码行数:11,代码来源:dockervolume.pb.go


示例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
}
开发者ID:sr,项目名称:pachyderm,代码行数:11,代码来源:dockervolume.pb.go


示例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
}
开发者ID:sr,项目名称:pachyderm,代码行数:11,代码来源:dockervolume.pb.go


示例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
}
开发者ID:plar,项目名称:pachyderm,代码行数:11,代码来源:pps.pb.go


示例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
}
开发者ID:plar,项目名称:pachyderm,代码行数:11,代码来源:pps.pb.go


示例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
}
开发者ID:iamqizhao,项目名称:rpc-bench,代码行数:11,代码来源:echo.pb.go


示例16: _ABitOfEverythingService_Delete_Handler

func _ABitOfEverythingService_Delete_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(IdMessage)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(ABitOfEverythingServiceServer).Delete(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:ZubairNabi,项目名称:grpc-gateway,代码行数:11,代码来源:a_bit_of_everything.pb.go


示例17: _UpdateStream_StreamUpdate_Handler

func _UpdateStream_StreamUpdate_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(binlogdata.StreamUpdateRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(UpdateStreamServer).StreamUpdate(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:yonglehou,项目名称:vitess,代码行数:11,代码来源:binlogservice.pb.go


示例18: _ABitOfEverythingService_Echo_Handler

func _ABitOfEverythingService_Echo_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(gengo_grpc_gateway_examples_sub.StringMessage)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(ABitOfEverythingServiceServer).Echo(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:ZubairNabi,项目名称:grpc-gateway,代码行数:11,代码来源:a_bit_of_everything.pb.go


示例19: _Proto2_Produce_Handler

func _Proto2_Produce_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(Album)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(Proto2Server).Produce(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:gpaul,项目名称:letmegrpc,代码行数:11,代码来源:proto2.pb.go


示例20: _XRefService_Decorations_Handler

func _XRefService_Decorations_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(DecorationsRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(XRefServiceServer).Decorations(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:herberteuler,项目名称:kythe,代码行数:11,代码来源:xref.pb.go



注:本文中的google/golang.org/grpc.Codec类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang grpc.Server类代码示例发布时间:2022-05-28
下一篇:
Golang grpc.ClientConn类代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap